No shedding vs load shedding

Without shedding, a sale spike queues every request at the API. Load shedding rejects part of the low-priority browsing so checkout still finishes. Checkout reaches 600 requests/s and browsing 1,000. Without shedding, p99 passes 10 s and availability is 84 percent. With it, p99 is 44.5 ms.

Play the level

A buffer with a valveDrag or use arrow keys to change the buffer size

Buffer 1,000 jobs · last job waits 1.0 s · 17% turned away

Case 1

A sale starts at 0:20. Checkout rises to 600 requests/s and browsing to 1,000. The shop API serves about 1,000 requests/s. Checkout needs 99.9 percent availability and p99 below 300 ms. Browsing must keep 45 percent.

Case 1
Measure Goal No load shedding Rate limit on browsing
p99 latency (Checkout) under 300 ms 10.1 s Fail 45 ms Pass
Availability (Checkout) at least 99.9% 84.4% Fail 100% Pass
Availability (Browse) at least 45% 82% Pass 53.7% Pass
Monthly cost 8 USD/mo 9 USD/mo
Error rate 15.6% 0%
HTTP/2HTTP/2UsersUsersNode API2 vCPU · 2 GB
HTTP/2HTTP/2UsersUsersNode API2 vCPU · 2 GB
No load shedding: misses a goal
HTTP/2HTTP/2UsersUsersRate limiterNode API2 vCPU · 2 GB
HTTP/2HTTP/2HTTP/2UsersUsersRate limiterNode API2 vCPU · 2 GB
Rate limit on browsing: meets the goals