May we use cookies so Meta, Google, LinkedIn and ChatGPT see your visit and we learn which ads work? PrivacyMay we use cookies to see which pages help, and let Meta, Google, LinkedIn and ChatGPT see your visit, so we know which of our ads work? That way we spend less on ads that do not work. We do not sell your data, and the site works the same if you decline. You can change your answer at any time under Cookie settings at the foot of the page. Privacy policy
Loading...
System Design and AI Engineering, by Roni Das. 989 interactive lessons in two courses.: 770 in System Design and 219 in AI Engineering.
Start LearningSystem design interview guide
in this guide
7 parts open to everyone · 3 with a free account · 3 with the course
You can read 7 of 13 parts. A free account opens the deep dive; the course opens all of it.
Interviewers like Tinder because it forces you off the well-worn news-feed template and into geospatial retrieval, which most candidates have never partitioned before. It tests whether you can reason about sharding by a continuous dimension (location) rather than by user id, and whether you understand why a naive uniform grid creates hot shards over dense cities. It also probes the write path: billions of swipes is a throughput problem, mutual-like detection is a concurrency problem, and the double-swipe match is an idempotency problem. A strong candidate separates the read path (deck generation) from the write path (swipe ingestion and match detection) and shows how each scales independently.
This page is the free part.
₹1,111 in India$35 everywhere elseonce, for the whole course
The System Design course covers the Tinder design across a run of lessons, not one page. These 4 alone are about 109 minutes of step-by-step reading, every one with a quiz.
Always clarify these in the first 5 minutes of the interview. Do not start drawing boxes until both lists are agreed.
This guide is built on these 5 lessons. Each one teaches one piece of the Tinder design above, step by step.
Lifetime access for ₹1,111 in India or $35 elsewhere. Interactive diagrams, quizzes, and 20 capstone projects to practise on.
This one question is not enough for the interview.
Each question has why it is asked, a full answer, what the interviewer listens for, the follow-ups, the common mistakes and a diagram (268 diagrams in all). A PDF you keep, junior to staff level.
Two courses by the author of this page:
770 lessons · 18 free to read
₹1,111 in India · $35 elsewhere, once
Get System DesignYou own this course
219 lessons · 10 free to read
₹1,333 in India · $35 elsewhere, once
Get Generative AI and Agentic AIYou own this course
Save your progress and get the interview checklist PDF
Tinder has reported on the order of 1.6 to 2 billion swipes per day and tens of millions of matches created daily (company and press figures, treat exact daily counts as estimates). Every swipe is a durable write, and a right swipe has to be checked against the other person's history in milliseconds to decide if a match just happened. The hard part is not the UI. It is finding the right few hundred nearby candidates out of a global user base and recording a firehose of swipes without losing any.
Tinder is a location-based dating app where each user is shown a deck of nearby candidate profiles, swipes right (like) or left (pass) on each, and a mutual right swipe creates a match that opens a chat. The design has three genuinely hard subsystems. First, recommendation retrieval: given a user's location and distance filter, return candidates ranked by relevance, which Tinder solves with geosharding using Google's S2 library so a query touches only a handful of shards instead of a global index. Second, the swipe pipeline: billions of swipes per day are ingested as an ordered stream, left swipes are archived cheaply while right swipes are checked against a likes store to detect the reciprocal like. Third, match detection has to be idempotent and race-free so a simultaneous double right swipe produces exactly one match. Around these sit profile and photo storage on object storage plus a CDN, a match and chat service backed by a durable message store with real-time delivery over persistent connections, and push notifications. The recurring themes are geo-partitioning, write-heavy stream processing, and cache-backed reciprocal lookups.
Where it shows up
Asked at Match Group, Bumble, Hinge, and broadly at Meta, Amazon, and Uber as a proximity-search and write-heavy-stream variant. It is a favorite because dating apps map cleanly to geospatial indexing plus an idempotent write path.
Spec sheetTinder
worked through below, with the maths
The hard parts of this design are taught step by step in the System Design course: Geospatial Indexing, WebSockets and Message Queues.
Splitting a database across multiple servers, the nuclear option for scaling writes, and the architecture behind Instagram, Uber, and YouTube.
Routing on where a client appears to be, why speed and data residency are two different problems, and how wrong the inference actually is.
Safely retry failed API requests without causing duplicate side effects.
Process data as it arrives, real-time analytics, fraud detection, and event-driven architectures.
all part of
System Design Masterclass
770 lessons · about 290 hours · 18 free to read
₹1,111in India, by UPI
$35everywhere else, by card or PayPal
You own this course
Continue with Database Shardingpay once,
yours for life
Live from the course bench
Real interview questions, live diagrams and measured lab results, pulled at random from the lessons. A new set every time you come back.
Show your math. Pulling numbers from thin air signals you have not thought about the load.
Daily swipes
~1.6 to 2 billion per day (estimate)
Company and press figures put swipe volume in the low billions per day. Taking 1.6 billion over 86,400 seconds gives about 18,500 swipes per second on average, with peak evening traffic several times higher. Derived average.
Swipe write throughput at peak
~50k to 100k writes/sec (estimate)
Average is ~18.5k/sec; dating traffic is heavily diurnal and clusters in evenings, so a 3x to 5x peak factor gives roughly 55k to 90k swipes/sec. Derived estimate, drives the choice of a streaming ingest layer over synchronous DB writes.
Matches created daily
tens of millions/day (estimate)
Only reciprocal right swipes match, and right-swipe rates are a minority of swipes. If a few percent of swipes are right swipes and a fraction of those are reciprocated, the daily match count lands in the tens of millions. Derived, consistent with reported figures.
Likes storage growth
billions of rows/day, hundreds of billions retained (estimate)
Each swipe is one like/pass row of roughly 50 to 100 bytes (swiper id, target id, direction, timestamp). At ~1.6 billion/day that is ~80 to 160 GB/day of raw swipe records before compression. Left swipes can be archived cheaply; right swipes are kept hot for reciprocal checks. Derived.
Geoshards worldwide
~40 to 100 shards (published range)
Tinder's engineering blog reports that 40 to 100 geoshards balanced P50/P90/P99 latency in their testing. Cells are grouped along the S2 Hilbert curve so each shard holds a contiguous, load-balanced region.
Shards touched per deck query
~3 of ~55 shards (published example)
Tinder's example shows a 100-mile search circle mapping to S2 cells that resolve to only about 3 geoshards out of 55, so a deck query fans out to a small fraction of the fleet instead of scanning a global index.
A swipe or a deck request enters through an API gateway that authenticates the session and routes to the right backend service. For the read path, a recommendations service takes the user's current location and distance filter, uses the S2 library to convert the search circle into a set of covering cells, looks up which geoshards those cells belong to, and queries only those shards of a geosharded Elasticsearch cluster for candidate profiles. Candidates are filtered by age, gender, and distance, scored by a relevance model, cross-checked against the set of people this user has already swiped, and returned as an ordered deck that the client caches locally. For the write path, each swipe is published to an ordered stream (Kinesis or Kafka style) partitioned so that a given user's swipes are processed in order. A swipe processor archives left swipes to cheap object storage for analytics and writes right swipes to a likes store plus a likes cache. A match worker consuming the right-swipe stream checks whether the target has already liked the swiper; if so it creates a single match record and pushes a real-time match event to both clients over their persistent connections, which also triggers push notifications. Once matched, chat messages flow through a messaging service with a durable per-conversation message store and real-time fanout. Profiles live in a key-value store, photos live in object storage fronted by a CDN, and an indexer keeps each user's searchable document in the correct geoshard, migrating it when the user's location crosses shard boundaries.
In a real interview, sketch this on the whiteboard before diving into any single box.
Walk through each service. The interviewer wants to hear what each one owns, not just the names.
Single entry point that terminates TLS, authenticates the session token, applies rate limits, and routes to backend services. It shields internal services from the public internet and centralizes authorization for the roughly hundreds of microservices behind it.
Turns a location plus distance filter into a set of S2 cells, maps those to geoshards, and queries a geosharded Elasticsearch cluster for nearby candidates. It applies hard filters (age, gender, distance), a relevance ranking, and an already-seen exclusion before returning a deck.
An Elasticsearch cluster partitioned by geography, with an abstraction microservice that hides the shard math from callers. Cells are grouped along the S2 Hilbert curve into 40 to 100 load-balanced shards, and replicas are spread randomly across hosts to smooth out timezone-driven hot spots.
A partitioned, ordered stream that absorbs the swipe firehose so the app never blocks on a synchronous database write. Left swipes are archived to object storage; right swipes are routed to the likes store and the match worker for reciprocal checks.
The durable record of who liked whom, plus a fast cache used to answer the has-target-already-liked-me question during match detection. The cache absorbs the read-heavy reciprocal lookups so the match path stays within milliseconds.
Creates the single match record on a mutual like, then backs the conversation with a durable per-match message store and real-time delivery over persistent WebSocket connections. It handles unmatch, message read state, and ordering within a conversation.
Stores structured profile fields in a key-value database and photos in object storage fronted by a CDN for fast global delivery. New photos and profile text pass through automated and human moderation before they can appear in anyone's deck.
users. Profile store, typically a key-value database like DynamoDB for fast single-key reads. last_lat_lng and preferences drive which geoshard the user is indexed in and what…
Every table for Tinder, its keys, and which store fits it and why.
Geosharding candidate retrieval with S2 cells. The core read problem is proximity search: return people within, say, 100 miles, ranked by relevance. A single global index does not scale, and sharding by user id would…
7 deep dives on the parts that break at scale: Geosharding candidate retrieval with S2 cells; The write-heavy swipe pipeline; Mutual-like detection and the double-swipe race.
Geosharding by location versus sharding by user id. Sharding by user id spreads writes evenly but forces every proximity query to scan all shards. Geosharding keeps a deck query on a handful of contiguous shards, at the…
6 decisions an interviewer expects you to defend, each with the alternative and why it loses here.
A user flies from Delhi to London. When do they see London profiles, and when do Londoners see them?
3 follow-up questions with model answers, the interview scorecard for this question, and a mock interview on Design Tinder with the AI tutor.
Tinder's engineering team published a two-part Geosharded Recommendations series describing exactly this design: using Google's S2 library and its Hilbert-curve cell ids, choosing S2 levels 7 and 8, balancing cells into 40 to 100 geoshards by load rather than by area, and running the whole thing on a single multi-index Elasticsearch cluster behind an abstraction microservice, with replicas spread randomly across hosts to smooth timezone-driven hot spots. They reported the geosharded system handling roughly 20 times more computations than the prior single-index setup and a typical 100-mile query resolving to about 3 of 55 geoshards. Independent architecture write-ups describe the swipe path as a Kinesis or Kafka style ordered stream feeding match workers that consult a likes cache, with left swipes archived to S3, profiles in DynamoDB, and match notifications delivered over WebSockets. Match Group's public filings put Tinder in the tens of millions of monthly active users, which is the scale these subsystems are built for. Exact daily swipe and match counts vary by source and should be treated as estimates.
Sources
If any of these topics are fuzzy, the interviewer will catch it. Each lesson is 15 to 60 minutes with diagrams, code, and a quiz.
interview readiness
Three questions from this guide. Answer them without scrolling up, the way you would have to in the room.
Pay by UPI, cards or netbanking through Razorpay. Pay by card or PayPal, in US dollars. Download at once from My packs.
NEWSystem Design Hands-On
Postgres Sharding: Complete Hands-On (PgBouncer + Citus). 2 h 36 min and 20 chapters: one PostgreSQL loaded until it breaks, then four shards behind a router you write, PgBouncer and Citus, with the 139-page slide deck. The first 15 minutes are free to watch.
Free PDF · 79 pages
25 real tech interview questions, answered in full
Five from each of our AI, GenAI, Inference, Maths for ML and Forward Deployed packs. Each with a diagram and a model answer. Free by email.
free tool
Check these numbers yourself
Put in your own guesses for Tinder and see requests per second, storage, bandwidth and servers, with every sum written out.
Open the Capacity EstimatorIt is really nice and good Please join the course