When a mobile push notification spikes `/v1/telemetry/events` from 2,000 to 35,000 RPS against a 20,000 RPS fleet (, tag requests with criticality tiers at ingress, enforce priority-aware LIFO/adaptive load shedding, and isolate thread/connection pools via bulkheads.
TL;DR30-second simplified summary▾
Core Mechanics: When a mobile push notification spikes /v1/telemetry/events from 2,000 to 35,000 RPS against a 20,000 RPS fleet (20 pods, 200 threads/pod), every endpoint shares the same ingress and worker pools.
Visual & Structural Flow: Depicts 35k RPS Telemetry Flood vs. Priority Admission (Telemetry (35k) -> Checkout (500) -> Envoy Edge -> Fleet (20k cap)); Edge Classification, AIMD Limiter, and Tier-0 Bulkhead (Envoy Classifier -> AIMD Limiter -> Tier-0 Bulkhead -> 20-Pod Backend Fleet (20,000 RPS)).
Trade-Offs & Production: Static global rate limits either reject legitimate telemetry when the cluster has spare off-peak capacity, or still allow Tier-3 bursts to exhaust the shared cap before Tier-0 arrives. Criticality-tiered admission control is a core pattern in high-scale gateways and storage engines: API Gateways & BFFs: Protect login, checkout, and payment webhooks during bot or push-notification storms.
Failure Modes & Application: Criticality-tiered admission control is a core pattern in high-scale gateways and storage engines: API Gateways & BFFs: Protect login, checkout, and payment webhooks during bot or push-notification storms.
Why priority-blind load shedding drops revenue-critical traffic.
Why this matters: The mechanism: understand how Why priority-blind load shedding drops revenue-critical traffic works from first principles.
Think of Why priority-blind load shedding drops revenue-critical traffic as the intuition layer for Priority-Aware Load Shedding Under Overload: The mechanism: understand how Why priority-blind load shedding drops revenue-critical traffic works from first principles.
When a mobile push notification spikes /v1/telemetry/events from 2,000 to 35,000 RPS against a 20,000 RPS fleet (20 pods, 200 threads/pod), every endpoint shares the same ingress and worker pools. Without criticality classification, a $500 /v1/checkout/confirm request competes 1:1 for threads with replaceable analytics pings.
How shared queues and global rate limits cause 42% checkout failure.
Why this matters: The problem: see what breaks without How shared queues and global rate limits cause 42% checkout failure under real concurrency or scale.
Under 15x telemetry overload, priority-blind defenses fail in two ways:
- Indiscriminate 503 Drops: Telemetry consumes ~90% of worker threads, dropping 42% of
/v1/checkout/confirm(500 RPS) and/v1/auth/token(1,500 RPS). - Large FIFO Queue Timeouts: Tomcat's default
acceptCount=100queues requests for seconds; by the time a checkout request reaches a thread, the client has already timed out.
35k RPS Telemetry Flood vs. Priority Admission
Shedding Tier-3 telemetry at the Envoy edge in <1 ms preserves 99.99% availability for Tier-0 checkout and auth.
- Problem
- How to implement Priority-Aware Load Shedding Under Overload without hitting unbounded tail latency, state divergence, or operational fragility.
- Naive Solution
- Use a single unpartitioned path with unbounded retries and synchronous global coordination.
- Why It Fails
- Global coordination serializes throughput under load, while unbounded retries amplify transient stalls into full outages.
- Alternatives
- Compare synchronous strict-consistency paths against bounded asynchronous replication, local caching, or partitioned ownership.
- Engineering Decision
- When a mobile push notification spikes
/v1/telemetry/eventsfrom 2,000 to 35,000 RPS against a 20,000 RPS fleet (, tag requests with criticality tiers at ingress, enforce priority-aware LIFO/adaptive load shedding, and isolate thread/connection pools via bulkheads. - Trade-Offs
- Gains predictable p99 latency and fault isolation in exchange for explicit bounding, observability, and slightly higher implementation complexity.
When Priority-Aware Load Shedding Under Overload experiences a sudden 5x traffic spike alongside a slow downstream dependency, which engineering choice best protects system stability?
Why static global RPS caps and large FIFO queues break.
Why this matters: The problem: see what breaks without Why static global RPS caps and large FIFO queues break under real concurrency or scale.
Think of Why static global RPS caps and large FIFO queues break as the intuition layer for Priority-Aware Load Shedding Under Overload: The problem: see what breaks without Why static global RPS caps and large FIFO queues break under real concurrency or scale.
Static global rate limits either reject legitimate telemetry when the cluster has spare off-peak capacity, or still allow Tier-3 bursts to exhaust the shared cap before Tier-0 arrives. Similarly, raising Tomcat acceptCount or thread counts just adds queueing delay and context-switching overhead.
Why static global RPS caps and large FIFO queues break
Enterprise solution: Criticality Tiers, AIMD Concurrency, and Bulkheads.
Why this matters: Operational control: configure bounds, failure handling, and safe production defaults.
Combine edge classification, adaptive concurrency, and pool isolation:
- 4 Criticality Tiers at Ingress: Tag routes at Envoy with
X-Priority-Tier:CRITICAL_PLUS(Tier 0:/checkout,/auth),CRITICAL(Tier 1),SHEDDABLE_PLUS(Tier 2), andSHEDDABLE(Tier 3:/telemetry). - Adaptive Concurrency (AIMD / Gradient): Measure
p95RTT vs. baselinemin_rttrather than static RPS; when concurrency approaches saturation, shed Tier 3 first (429+Retry-After), then Tier 2. - LIFO Short Queues + Thread Bulkheads: Reserve dedicated connection/thread pools for Tier 0 and process short burst queues LIFO so fresh requests succeed before deadlines expire.
Edge Classification, AIMD Limiter, and Tier-0 Bulkhead
1.Criticality Tagging: Assign Tier-0 to /checkout and /auth at the gateway; tag /telemetry as Tier-3 SHEDDABLE.
2.Adaptive Concurrency: Envoy gradient controller shrinks concurrency limit as p95 RTT rises above min_rtt.
3.Fast-Fail <1ms: Shed Tier-3 at the edge with HTTP 429 + Retry-After before touching backend threads or DB.
Priority-aware shedding uses 100% of spare capacity during normal traffic and drops only low-priority tiers under overload.
# Envoy Adaptive Concurrency + Route Header Tagging
http_filters:
- name: envoy.filters.http.adaptive_concurrency
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.adaptive_concurrency.v3.AdaptiveConcurrency
gradient_controller_config:
sample_aggregate_percentile:
value: 95
concurrency_limit_params:
max_concurrency_limit: 4000
min_rtt_calc_params:
interval: 60s
Where priority-aware load shedding protects production SLAs.
Why this matters: Scope boundary: identify where this pattern fits best and where simpler or async alternatives win.
Criticality-tiered admission control is a core pattern in high-scale gateways and storage engines:
- API Gateways & BFFs: Protect login, checkout, and payment webhooks during bot or push-notification storms.
- Multi-Tenant SaaS Backends: Shed background exports and analytics before interactive UI queries.
- Distributed Queues & Microservices: Propagate priority headers so downstream databases also shed low-priority batch work.
Practice: Make the trade-off yourself.
Why is adaptive concurrency (AIMD / gradient control) paired with criticality tiers superior to a static global RPS cap?