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.
Last year an education company launched a re‑registration campaign that attracted 50,000 users at once. The surge piled up server requests, exhausted resources, and caused the entire site to stop.
Step 1: Physical Separation of Internal and External Networks
Many teams share a single cluster for both internal and external services. When the external side is overwhelmed, the internal side suffers the same fate. The correct approach is to run two independent clusters—one for external traffic and one for internal traffic—each with its own gateway and database. External services must access internal services only through the gateway, and direct connections are prohibited. Data synchronization is performed asynchronously via Kafka instead of real‑time calls.
Step 2: Gateways with Real Rate Limiting and Circuit Breaking
The external gateway performs two functions: rate limiting and queuing. When traffic exceeds the limit, requests are not outright rejected; they are placed in a queue, improving user experience. The internal gateway handles authentication and circuit breaking: unauthorized external services cannot call internal APIs, and under heavy load the internal side cuts off dependencies to protect its core.
A critical rule is that external services must be able to operate independently for at least one hour even if the internal gateway fails. This implements the three‑pronged "circuit breaking, degradation, rate limiting" strategy directly in code.
Step 3: Pre‑Push Data Before the Event
During peak periods the biggest risk is that every external transaction queries the internal system for inventory availability. The solution is to push product and inventory data to an external Redis cache before the activity starts, lock the data to prevent modifications, and let the external side own the decision‑making during the event.
If the backend needs to adjust inventory, it must first obtain confirmation from the external service and then synchronize the change back in a one‑way manner. The core principle is a single source of decision‑making and prohibition of bidirectional synchronization, which can cause chaotic conflicts.
Step 4: One‑Way Kafka Backflow with Order Preservation
After an order is created, the external side pushes events (creation, payment, refund, closure) to the internal side via a one‑way Kafka stream. Ordering is guaranteed by partitioning on the order ID, ensuring all events for the same order land in the same partition and remain sequential.
Idempotency is achieved by making the consumer side idempotent, so replayed messages do not cause errors. Rate control is handled by dynamically adjusting the number of internal consumer threads—during peaks consumption can be throttled or paused, then resumed once the backlog eases.
In this scenario Kafka acts not just as a message queue but as a buffering dam between the external and internal networks.
Isolation Formula
Physical separation → Gateway authentication → Rate limiting & queuing → Circuit breaking → Pre‑push data → One‑way decision → Queue flow control → Ordered consumption → Idempotent replay.
After applying these nine steps, the external side can be overwhelmed while the internal side remains stable, and other business lines stay unaffected. This demonstrates the true weight of "system isolation".
Architecture design should not wait for incidents; implementing isolation early is cheaper than firefighting after a massive traffic spike.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Code Farming
Senior engineer at a top internet giant, sharing Java, AI, tech knowledge, growth insights, and interview experiences.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
