LeetDesign

Community

Community designs

Published system design solutions from the community. Upvote the strongest architectures and learn from how others approached each problem.

Design a Key-Value Store

Look-aside cache in front of quorum-replicated shards

by @cache_invalidator (Cache Invalidator)
36 points5 comments
Design a Key-Value Store

Sharded cache up front, 3-way replicated store behind

by @priya_nair (Priya Nair)
31 points5 comments
Design a Key-Value Store

Three AZs, three replicas, nothing fancy

by @yuki_tanaka (Yuki Tanaka)
27 points4 comments
Design a URL Shortener

Serve redirects from the edge

by @p99_andy (p99 Andy)
22 points4 comments
Design a Key-Value Store

Write-through cache for a read-your-writes feel

by @quorum_queen (Quorum Queen)
21 points7 comments
Design a Key-Value Store

Big DB, big cache, no surprises

by @marcus_lee (Marcus Lee)
18 points4 comments
Design a URL Shortener

The 100:1 math, worked end to end

by @tom_schneider (Tom Schneider)
17 points4 comments
Design a Key-Value Store

Cache the hot 0.1%, scale app wide and shallow

by @p99_andy (p99 Andy)
15 points5 comments
Design a URL Shortener

Three shards because the disk says so

by @raft_raccoon (Raft Raccoon)
14 points3 comments
Design a URL Shortener

Two shards and a prayer

by @mei_lin (Mei Lin)
10 points4 comments
Design a Ticket Booking System

Read capacity is shards × copies, that's the whole problem

by @quorum_queen (Quorum Queen)
9 points3 comments
Design an Image Hosting Service

1.2 petabytes served for two dollars an hour

by @kenji_watanabe (Kenji Watanabe)
8 points4 comments
Design a Social Feed

There is no cache line for a feed only you can see

by @fan_out_fred (Fan-out Fred)
8 points4 comments
Design a Pastebin

The whole thing costs less than a coffee per hour

by @omar_farouk (Omar Farouk)
8 points4 comments
Design a Key-Value Store

No cache, just fatter shards

by @shard_lord (Shard Lord)
8 points5 comments
Design a Chat Message Store

Writes set the shard count. Reads ride along free

by @amara_diallo (Amara Diallo)
7 points4 comments
Design a URL Shortener

One xlarge shard, no sharding theater

by @aisha_khan (Aisha Khan)
7 points4 comments
Design a View Counter

Sized by the write ceiling, priced by the contract

by @ingrid_solberg (Ingrid Solberg)
6 points5 comments
Design a Ticket Booking System

Sized for the second the gates open

by @hannah_berg (Hannah Berg)
6 points2 comments
Design a Product Catalog

The cache is the database, the database is the backup

by @page_cache (Page Cache)
6 points4 comments
Design a Key-Value Store

Async acks to protect PUT p99 (and why it's wrong)

by @backpressure_bo (Backpressure Bo)
6 points5 comments
Design a Chat Message Store

Cache the scrollback, it literally cannot change

by @liam_oconnor (Liam O'Connor)
5 points3 comments
Design a Product Catalog

In-line cache, TTL 2, identical numbers. Prove me wrong

by @katya_volkov (Katya Volkov)
5 points3 comments
Design a Key-Value Store

Design a Key-Value Store

by @repsweet080303 (repsweet080303)
5 points5 comments