Backend Development 8 min read

High‑Concurrency Techniques for the Baige Traffic Operations Platform

This article outlines a comprehensive set of high‑concurrency strategies—including caching, rate limiting, circuit breaking, asynchronous processing, pooling, code optimization, JVM tuning, horizontal scaling, warm‑up, data heterogeneity, and sharding—applied to the Baige traffic platform to handle tens of thousands of QPS during peak loads.

JD Tech
JD Tech
JD Tech
High‑Concurrency Techniques for the Baige Traffic Operations Platform

The Baige traffic operations platform supports core resource slots for JD Finance APP and JD APP, handling peak QPS of over 100,000 and stress‑test peaks of 200,000, representing a typical high‑concurrency C‑end read‑path scenario.

1. Caching (Redis and local cache) – Using Redis as a distributed cache to increase capacity and performance, while local cache mitigates hot‑key issues and further improves speed.

2. Rate Limiting – Protects the system by controlling request rates, using algorithms such as token bucket, leaky bucket, or sliding windows, implemented via JSF configuration or Sentinel.

3. Circuit Breaking and Degradation – Prevents cascading failures when downstream services become slow or unavailable; Sentinel can trigger circuit breaking based on slow‑call or exception ratios, with a half‑open recovery phase.

4. Asynchronous Processing (CompletableFuture, MQ) – Decouples services by publishing events to message queues and uses CompletableFuture for parallel RPC calls, reducing overall latency for user‑visible operations.

5. Pooling Techniques – Employs connection pools for databases and custom thread pools for business logic, reducing creation overhead and improving concurrency.

6. Code Optimization – Streamlines call chains, reorders validation logic, optimizes data structures and queries, and reduces I/O operations.

7. JVM Tuning – Uses the G1 garbage collector with recommended parameters. Example configuration:

-Xms4096m -Xmx4096m -XX:MaxMetaspaceSize=256m -XX:MetaspaceSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=80

8. Horizontal Scaling (Sharding) – Designs services as stateless, allowing the addition of instances to handle traffic spikes and splitting business domains across deployments.

9. Warm‑up – Pre‑loads data into memory via scheduled jobs or initialization scripts (e.g., cache or Elasticsearch warm‑up) and gradually ramps traffic after a restart to avoid sudden load spikes.

10. Data Heterogeneity – Replicates relational data to Elasticsearch via binlog for complex queries, leveraging ES’s performance for large‑scale analytics.

11. Sharding and Database Optimization – Splits large tables (sharding) and distributes data across multiple databases (partitioning) to improve query speed and handle massive concurrent loads; also includes SQL tuning and index usage.

Summary – The Baige system combines these techniques to build a resilient, high‑throughput architecture, emphasizing careful research, evaluation, and incremental evolution rather than over‑design.

BackendCachinghigh concurrencyJVM TuningRate Limitingcircuit breaking
JD Tech
Written by

JD Tech

Official JD technology sharing platform. All the cutting‑edge JD tech, innovative insights, and open‑source solutions you’re looking for, all in one place.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.