Live ranking vs nightly scores

Live ranking scores 500 items on a CPU for each page view. Nightly scoring computes the picks once and stores them for a key lookup. At 3,000 views/s, live ranking fails 88 percent of views and p99 passes 10 s. Nightly scores give p99 4.1 ms for 24 USD/mo against 40 USD/mo.

Play the level

A batch shares one read of the weightsDrag or use arrow keys to change the batch size

Batch 32 · 2,500 tokens/s · a 200 token answer takes 2.6 s

A faster runtime needs fewer hostsArrow keys change the load. Tap or Space changes the runtime

1,500 req/s · Node API · 3 hosts · 18 USD/mo

Case 1

A shop shows 20 picks per user at up to 3,000 views/s. The picks use only yesterday's orders. p99 must stay below 50 ms and cost below 60 USD/mo.

Case 1
Measure Goal Rank 500 items on CPU per view Score all users each night
p99 latency under 50 ms 10.1 s Fail 4.1 ms Pass
Error rate under 0.1% 88.4% Fail 0% Pass
Monthly cost 40 USD/mo 24 USD/mo
HTTP/2gRPCUsersAPI server2 vCPU · 2 GBModel (CPU)8 vCPU · 8 GB
HTTP/2gRPCUsersAPI server2 vCPU · 2 GBModel (CPU)8 vCPU · 8 GB
Rank 500 items on CPU per view: misses a goal
HTTP/2gRPCUsersAPI server2 vCPU · 2 GBKey-value s…1 vCPU · 4 GB
HTTP/2gRPCUsersAPI server2 vCPU · 2 GBKey-value s…1 vCPU · 4 GB
Score all users each night: meets the goals