Skip to content
Code Farming
Author

Code Farming

Senior engineer at a top internet giant, sharing Java, AI, tech knowledge, growth insights, and interview experiences.

41
Articles
0
Likes
250
Views
0
Comments
Recent Articles

Latest from Code Farming

41 recent articles
Code Farming
Code Farming
Aug 19, 2026 · Databases

Applying DDD to Database Design in 4 Practical Steps

The article explains how to translate domain‑driven design into concrete database schemas by first shifting focus from tables to domain models, then mapping the four relationship types, choosing an inheritance strategy, and finally adapting the approach for NoSQL databases.

DDDDatabase DesignDomain Model
0 likes · 7 min read
Applying DDD to Database Design in 4 Practical Steps
Code Farming
Code Farming
Aug 17, 2026 · Backend Development

How DDD Handles Four E‑Commerce Payment Changes Step‑by‑Step

The article walks through a real e‑commerce payment case, showing how Domain‑Driven Design models entities, uses two key questions to split responsibilities, and continuously evolves the model to accommodate discounts, VIP features, and new payment adapters, reducing code churn.

DDDMicroservicesSingle Responsibility Principle
0 likes · 6 min read
How DDD Handles Four E‑Commerce Payment Changes Step‑by‑Step
Code Farming
Code Farming
Aug 14, 2026 · Backend Development

How Weibo Handles 100k QPS During Viral Peaks: Architectural Secrets

The article breaks down how Weibo’s backend was engineered to sustain 100,000 queries per second during traffic surges by first quantifying load, then using a push‑pull hybrid feed, a four‑tier cache funnel, and user‑ID sharding with write throttling.

CachingHigh ConcurrencySharding
0 likes · 8 min read
How Weibo Handles 100k QPS During Viral Peaks: Architectural Secrets
Code Farming
Code Farming
Aug 13, 2026 · Databases

Redis vs MySQL for Shopping Carts: Why I Chose the Option That Can Lose Data

The article explains that a shopping cart can tolerate loss of recent writes but not accumulated items, outlines the data model with seven fields and a unique key, compares client‑side storage options, details merge strategies for guest and logged‑in carts, and evaluates Redis, MySQL, and hybrid solutions with concrete trade‑offs.

Data ConsistencyMySQLRedis
0 likes · 13 min read
Redis vs MySQL for Shopping Carts: Why I Chose the Option That Can Lose Data
Code Farming
Code Farming
Aug 11, 2026 · Backend Development

Can DDD’s Six‑Step Method Rescue a Broken Microservices Architecture?

The article presents a real‑world case of a ride‑hailing system whose microservices became tangled, and shows how applying Domain‑Driven Design—through strategic design, a six‑step refactoring roadmap, tactical four‑layer architecture, and context mapping—can systematically restore clean, business‑driven services.

DDDMicroservicesRefactoring
0 likes · 6 min read
Can DDD’s Six‑Step Method Rescue a Broken Microservices Architecture?
Code Farming
Code Farming
Aug 9, 2026 · Backend Development

How a System Handles 30 Million Simultaneous Video Views

The article breaks down how QuickTok supports 30 million concurrent video streams by calculating QPS, storage and bandwidth needs, then applying HDFS with HBase indexing and aggressive CDN pre‑warming to shrink traffic from 88 Tbps to under 4 Tbps.

CDNHDFSHigh Concurrency
0 likes · 5 min read
How a System Handles 30 Million Simultaneous Video Views
Code Farming
Code Farming
Aug 5, 2026 · Backend Development

How to Generate Billions of Conflict‑Free Short URLs

The article breaks down a real‑world architecture for a short‑URL service that must handle 12 billion entries and 40 k QPS, showing how to calculate capacity, compare generation algorithms, use Bloom filters for offline de‑duplication, and employ a three‑layer cache‑plus‑storage design to meet performance goals.

Bloom FilterHBaseHigh Concurrency
0 likes · 7 min read
How to Generate Billions of Conflict‑Free Short URLs
Code Farming
Code Farming
Aug 4, 2026 · Backend Development

Why 50,000 Simultaneous Registrations Crashed the System—and How Isolation Prevents It

When an education company faced 50,000 concurrent re‑registration requests, its monolithic internal‑external architecture collapsed, but by physically separating networks, enforcing gateway rate‑limiting and circuit‑breaking, pre‑loading data into Redis, and using one‑way Kafka streams, the system remained stable.

Circuit BreakingHigh ConcurrencyKafka
0 likes · 6 min read
Why 50,000 Simultaneous Registrations Crashed the System—and How Isolation Prevents It
Code Farming
Code Farming
Jul 31, 2026 · Backend Development

How the Right API Gateway Can Halve Development Costs

By consolidating authentication, caching, and fault‑tolerance logic into a properly chosen API gateway, teams can eliminate duplicated SDK changes, cut backend QPS dramatically, and turn costly release windows into seamless upgrades, effectively reducing development effort by up to 50%.

API gatewayCachingFault Tolerance
0 likes · 6 min read
How the Right API Gateway Can Halve Development Costs