Cloudflare

We made Workers KV up to 3x faster — here’s the data

Sep 26, 2024Thomas Gauvin, Rob Sutter, Andrew Plunk
We made Workers KV up to 3x faster — here’s the data
SummaryAI, from the source post

This post details the architectural changes made to Cloudflare Workers KV to improve read latency. Key optimizations include: 1. Bypassing the Front Line (FL) layer between Workers and KV services, saving ~20ms per operation by enabling direct connections. 2. Implementing Tiered Cache to resolve cache misses regionally, reducing requests to central storage backends by ~30%. 3. Introducing an in-memory cache within the KV Worker process for the hottest keys (less than 0.03% of keys accounting for nearly half of requests), resolving these reads in under a millisecond. These changes resulted in up to 3x faster hot reads and up to 20ms reduction in latency per operation.

More from the Cache Management trail