Tinker Rate limits

by Samy (Kondasamy Jayaraman)

0:25. Sale day, every partner at once.barrel 0/10 · 5 served · 58 turned away

Chapter 7 of 7

Set the limits

Everything is on the bench: barrel size, drip, and one barrel per key. Tomorrow’s sale brings every partner at once.

This chapter: Which limits keep the API up and every quiet partner whole?

About this chapter

You will learn

  • Size the barrel for honest bursts
  • Set the drip for the busiest steady pace
  • Why more than one setting can work

Words you’ll meet

Workbench
Every setting at once, run over the whole sale day, checked against the team’s rule.

Step 1 of 2

The runs sale day: Oakmoor, the web shop’s rush, Birchfield’s bursts and Quickfix’s runaway script.

Meet the team’s rule.

RULE BROKEN

The stock API never falls over, and no quiet partner loses a single request on sale day.

Birchfield sends its orders in bursts of 15.

The web shop’s lunchtime rush doubles its pace.

Quickfix’s script runs away for 35 seconds.

Sale day, 0:00 to 1:00
CaseToday
The stock APIstayed up
Busiest second (it takes 50)7
Oakmoor Builders lost111
Larkspur’s web shop lost229
Birchfield Hardware lost39
Quickfix served173

A simulated stock API over hand-made traffic: Larkspur’s partners, small barrels and a hand-set server limit of 50 a second, not recorded traffic.