Tinker Caching & CDNs

by Kondasamy Jayaraman · drawn with Colorfigures by April Zhu

12:30, mid-sale. Today: 82% hit rate, 162 trips, 324 stale reads.39 from shelves · 6 to the depot · 6 trips · 36 stale

Chapter 7 of 7

Set Larkspur’s cache policy

Everything is on the bench: a TTL per kind, purge and versioned names. The owner has set how stale each kind may be.

This chapter: Which policy keeps the most requests on the shelves within the limits?

About this chapter

You will learn

  • How TTLs, purges and versioned names work together
  • How to read a day of traffic kind by kind
  • Why more than one policy can be equally good

Words you’ll meet

Cache policy
The rules for each kind of content: how long to keep it, and how changes reach the shelves.

Step 1 of 2

The owner’s limits: no stale prices or photos, and stock stale on at most 15% of reads.

Set the best .

82% hit rate OVER A LIMIT

Each kind against the owner’s limit
KindHit rateStale readsLimit
Prices82%33%0%
Photos80%2%0%
Stock counts82%73%15%

Request coalescing stays on, from chapter 5.

A simulated day: Larkspur’s own traffic and planning numbers, not a measurement of any real network or CDN.