No coalescing vs request coalescing
Without coalescing, every reader that misses a key starts its own fill from the database. With request coalescing, one reader fills the key and the others wait. When a hot key expires at 5,000 reads/s, database CPU demand reaches 10 times capacity without it and passes the 70 percent limit with it.
No coalescing · database reads after one expiry: 5,000
Coalescing · database reads after one expiry: 1
Case 1
5,000 reads/s reach a cache. At 0:20 every reader asks for one expired key. Database CPU must stay below 70 percent and p99 below 150 ms.
| Measure | Goal | No coalescing | Request coalescing |
|---|---|---|---|
| p99 latency | under 150 ms | 24 ms Pass | 24 ms Pass |
| Error rate | under 0.01% | 0% Pass | 0% Pass |
| CPU use | under 70% | 1,000% Fail | 41% Pass |
| Monthly cost | 8 USD/mo | 8 USD/mo |