Code Farming
Author

Code Farming

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

38
Articles
0
Likes
132
Views
0
Comments
Recent Articles

Latest from Code Farming

38 recent articles
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.

High Concurrencybackend designcaching
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.

DDDDomain-Driven DesignRefactoring
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 GatewayAuthenticationcaching
0 likes · 6 min read
How the Right API Gateway Can Halve Development Costs
Code Farming
Code Farming
Jul 30, 2026 · Backend Development

Can Your System Survive a Sudden 500K Live Viewers? 4 Proven Traffic‑Splitting Techniques

When a live broadcast suddenly attracts 500,000 viewers, the system faces 100,000 QPS likes and rapid reward transactions; this article breaks down a battle‑tested traffic‑splitting architecture—room‑based sharding, queue buffering, multi‑layer write caching, and consistent‑hash sharding—showing how each component controls load, ensures consistency, and enables seamless scaling.

High ConcurrencySystem Designconsistent hashing
0 likes · 6 min read
Can Your System Survive a Sudden 500K Live Viewers? 4 Proven Traffic‑Splitting Techniques
Code Farming
Code Farming
Jul 29, 2026 · Backend Development

Billions of Logs in Seconds: How Elasticsearch Makes It Possible

The article explains how Elasticsearch achieves sub‑second search over billions of log entries by combining sharding, immutable segment writes, a three‑layer inverted index, and a two‑phase query‑then‑fetch process that distributes work across nodes.

Distributed SearchElasticsearchinverted index
0 likes · 6 min read
Billions of Logs in Seconds: How Elasticsearch Makes It Possible
Code Farming
Code Farming
Jul 26, 2026 · Backend Development

How Is a Red Envelope System Designed for High‑Concurrency?

This article breaks down the end‑to‑end design of a high‑traffic red‑envelope service, covering its three‑stage lifecycle, a fair double‑mean allocation algorithm, the need to separate grabbing from settlement, and how Redis, Lua scripts, and message queues handle massive concurrent requests.

BackendDistributed LockRedis
0 likes · 7 min read
How Is a Red Envelope System Designed for High‑Concurrency?