← All companies

Cloudflare

7 design problems known to be asked at Cloudflare.

Medium4
Hard3

Design a Distributed Rate Limiter

Picking token bucket vs sliding window is the easy part. The real interview is what happens when the limiter runs on fifty machines: where the counter lives, why 'local counters' quietly lets 50× your limit through, and how to enforce one global cap without a round-trip on every request.

Asked at Stripe, Cloudflare, GitHub +2
·17 min read

Storage Engines: LSM-Trees vs B-Trees

Every database makes one foundational choice — how to lay bytes on disk. B-trees update in place; LSM-trees never overwrite, they append and compact. That single decision sets your write throughput, read latency, and space usage. Drive an LSM write path — memtable, flush, compaction — and see the tradeoff for yourself.

Asked at Google, Meta, Amazon +3
·14 min read