TL;DR
- An A–Z reference of every system design term used in this guide, each explained in plain English in one to three sentences.
- Wherever it helps, each entry includes an Instagram example showing where the idea appears in the architecture.
- Every entry ends with a → lesson link to the lesson that explains it in full depth.
- Use the letter bar below to jump around. Each term has its own anchor (e.g.
glossary.html#term-cap-theorem), so other pages can link straight to it.
Jump to: A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
💡 How to use this page
Skim a letter when a word in another lesson is unfamiliar, or read it top to bottom as revision before an interview. If you can explain each term and say where it shows up in Instagram, you know the vocabulary of system design.
A
- ACID
- The four guarantees of a classic database transaction. Atomicity: all or nothing. Consistency: rules and constraints hold. Isolation: concurrent transactions don't see each other's half-done work. Durability: committed data survives crashes. Instagram's User DB (PostgreSQL) relies on ACID for things like unique usernames. → Databases
- Active-active
- A multi-region setup where every region serves live traffic at the same time. Capacity is used efficiently and failover is fast, but writes in different regions can conflict. → Multi-region
- Active-passive
- One region (or server) handles traffic while a standby copy waits to take over on failure. It's simpler than active-active, but the standby capacity sits idle and failover takes longer. → Multi-region
- Adaptive bitrate streaming (ABR)
- Video is encoded at several qualities and cut into short segments, and the player switches quality segment by segment based on measured bandwidth. Reels and Stories play smoothly on both 5G and weak 3G because of ABR. → Media processing
- Anycast
- Many servers in different locations announce the same IP address, and internet routing (BGP) delivers each user's packets to the nearest one. CDNs and DNS providers use it for low latency and to spread DDoS traffic. → CDN
- API (Application Programming Interface)
- The contract that defines how software components talk to each other: endpoints, parameters, responses and errors. The Instagram app talks to the backend only through its API, for example
GET /v1/feed. → API design - API Gateway
- The single front door for all API calls. It terminates TLS, authenticates tokens, applies rate limits and routes each request to the right internal service. In the Instagram diagram it sits between the Load Balancer and the application services. → API gateway
- APNs (Apple Push Notification service)
- Apple's service for delivering push notifications to iPhones. Instagram's Notification Service sends to APNs, which wakes the phone even when the app isn't running. → Notifications
- Asynchronous processing
- Doing work after responding to the user, usually by putting a message on a queue for background workers. Instagram returns "posted" immediately and does resizing, fan-out and indexing asynchronously. → Message queues
- At-least-once delivery
- A messaging guarantee that every message is delivered, but possibly more than once (e.g. after a consumer crash). Consumers must therefore be idempotent. This is Kafka's usual mode. → Message queues
- At-most-once delivery
- A message is delivered zero or one times: no duplicates, but it can be lost. It's acceptable for things like low-value metrics. → Message queues
- Authentication (AuthN)
- Verifying who a user or service is, using a password, token, certificate or similar. Instagram's User/Auth Service authenticates logins and issues tokens. → Authentication
- Deciding what an authenticated identity may do. Examples: can this user see that private account's posts, or delete this comment? → Authentication
- Autoscaling
- Automatically adding or removing servers based on load (CPU, QPS, queue lag). Fan-out workers scale out when Kafka consumer lag grows. → Core principles
- Availability
- The fraction of time a system works correctly, often expressed in "nines". 99.99% allows about 52 minutes of downtime a year. → Core principles
- Availability zone (AZ)
- An isolated data center (or group of them) within a region, with independent power and networking. Replicating across AZs survives a single building failing. → Multi-region
B
- Backpressure
- A way for a slow consumer to signal producers to slow down, instead of being overwhelmed or dropping data. Queues provide a natural form of it: work waits in Kafka until workers catch up. → Message queues
- BASE
- "Basically Available, Soft state, Eventually consistent". It describes many NoSQL systems that favour availability over strict consistency. It's the counterpart to ACID; Cassandra-style stores are BASE. → Databases
- Batch processing
- Processing large volumes of accumulated data at once, e.g. a nightly Spark job over yesterday's events. Instagram trains ranking models from batch jobs over the data warehouse. → Analytics & ML
- BFF (Backend for Frontend)
- A dedicated API layer tailored to one client type (iOS, Android, web) that aggregates calls to many services into the shape that client needs. → API gateway
- Blob (Binary Large Object)
- An unstructured chunk of bytes such as a photo or video file. Blobs belong in object storage, not in a database. → Object storage
- Bloom filter
- A compact probabilistic data structure that answers "definitely not in the set" or "probably in the set". Databases like Cassandra use one to skip files that can't contain a key, and it can quickly rule out "has this user liked this post?". → Indexing
- B-tree
- A balanced tree structure used by most relational databases for indexes. It gives fast lookups and range scans with few disk reads, at the cost of in-place updates on writes. PostgreSQL indexes are B-trees by default. → Indexing
- Broker
- A server in a messaging system that stores messages and hands them to consumers. A Kafka cluster is made of many brokers, each holding some partitions. → Message queues
- Bucket
- A top-level container in object storage (e.g. an S3 bucket) with its own access policies and lifecycle rules. Instagram-style systems might keep raw uploads, renditions and story media in separate buckets or prefixes. → Object storage
- Bulkhead
- Isolating resources (thread pools, connection pools, clusters) per feature or dependency, so one failing part can't sink the whole ship. If search is slow, it must not exhaust the threads that serve the feed. → Resilience patterns
C
- Cache
- A fast, usually in-memory copy of data kept close to where it's needed, to avoid repeating slow work. Instagram caches at every layer: on the phone, in the CDN, and in Redis/Memcache. → Caching
- Cache-aside (lazy loading)
- The application checks the cache first. On a miss it reads the database and writes the result into the cache. This is how the News Feed Service hydrates post objects. → Caching
- Cache hit ratio
- The fraction of requests served from the cache. Going from 90% to 99% cuts backend load by 10×, which is why it's the key CDN and cache metric. → CDN
- Cache invalidation
- Removing or updating cached data when the source changes, so users don't see stale values. It's famously hard; deleting the entry on update and using versioned keys are common strategies. → Caching
- Cache stampede
- Many requests miss the same expired key at once and all hit the database together. Fixed with request coalescing, locks or leases, and early refresh. → Caching
- CAP theorem
- During a network partition, a distributed system must choose between consistency (everyone sees the same latest data) and availability (every request gets an answer). Instagram's feed chooses availability. → CAP & consistency
- Cassandra
- A distributed, leaderless wide-column database built for very high write throughput and linear horizontal scaling, with tunable consistency and built-in TTL. Instagram publicly describes using it for write-heavy data; in this guide it stores post, comment and story metadata and messages. → Databases
- CDC (Change Data Capture)
- Streaming every change committed to a database (from its log) to other systems, e.g. into Kafka. It's a reliable way to keep search indexes and caches in sync without dual writes. → Message queues
- CDN (Content Delivery Network)
- A worldwide network of edge cache servers that serve static content, such as photos and video segments, from locations near users. Instagram media is served from CDN edges that origin-pull from object storage. → CDN
- Celebrity (hot user) problem
- Accounts with enormous followings break naive designs: pushing one post to 400M timelines is too slow, and their posts become hot keys. The solution is to pull celebrities at read time and replicate their hot data. → News feed
- Circuit breaker
- A wrapper around calls to a dependency that "trips open" after repeated failures and fails fast for a while instead of piling on more requests, then tests recovery with a few calls. It stops one failing service from cascading into a site-wide outage. → Resilience patterns
- Clustering key
- In wide-column databases, the part of the primary key that sorts rows within a partition. In
posts_by_user,post_id DESCkeeps a user's posts newest-first. → Databases - Compaction
- A background process in LSM-tree databases that merges sorted files and discards overwritten or deleted (tombstoned) data. Expired Stories rows in Cassandra are physically removed during compaction. → Indexing
- Consistency (models)
- The rules for what a read may return after a write. They range from strong (always the latest) through read-your-writes and causal to eventual (converges later). → CAP & consistency
- Consistent hashing
- A way to map keys to servers on a hash "ring" so that adding or removing a server moves only a small fraction of keys. Used by Cassandra, caches and load balancers. → Consistent hashing
- Consumer group
- A set of consumers that share the work of reading a Kafka topic, with each partition read by exactly one member. Separate groups (fan-out, search indexer, notifications) each get their own full copy of the stream. → Message queues
- Counter sharding
- Splitting one hot counter into N sub-counters that are incremented randomly and summed on read, so millions of likes on one post don't all hit one key. → Likes & counters
- CQRS (Command Query Responsibility Segregation)
- Using separate models, and often separate stores, for writes (commands) and reads (queries). Instagram's precomputed feeds are a CQRS-style read model built from write events. → Microservices
- CRDT (Conflict-free Replicated Data Type)
- A data structure, such as a counter or set, designed so that replicas updated independently can always be merged automatically into the same result. It's useful for multi-region counters and collaborative state. → CAP & consistency
- Cursor pagination
- Paging through results using an opaque pointer to the last item seen, instead of page numbers. It stays correct while new items are inserted, so the Instagram feed and comments use cursors. → API design
D
- DAU / MAU
- Daily / Monthly Active Users, the starting point for every capacity estimate. This guide assumes ~500M DAU and ~2B MAU for Instagram. → Capacity estimation
- Data residency
- Legal requirements that certain users' data be stored or processed within specific countries or regions, e.g. the EU. It influences where a user's home region is. → Multi-region
- Data warehouse
- A large analytical database optimised for scanning and aggregating historical data (columnar storage, SQL). Instagram's events land there for metrics and ML training. → Analytics & ML
- DDoS (Distributed Denial of Service)
- An attack that floods a service with traffic from many machines to knock it offline. It's mitigated at the edge with Anycast, CDNs, scrubbing and rate limits. → Security
- Dead-letter queue (DLQ)
- A side queue where messages that repeatedly fail processing are parked for inspection, so one "poison" message can't block the whole stream. A corrupt upload that crashes the transcoder ends up here. → Message queues
- Debouncing
- Waiting until input pauses (e.g. 100 ms after the last keystroke) before acting. Instagram's search typeahead debounces to avoid sending a request per letter. → Search
- Deep link
- A URL that opens a specific screen inside an app, such as
instagram://media?id=…. Tapping a notification follows a deep link to the liked post. → Notifications - Denormalization
- Deliberately duplicating data so each query can be answered from one place, trading storage and update complexity for read speed. Storing follow edges in both
followingandfollowerstables is denormalization. → Databases - Distributed tracing
- Following one request across many services by propagating a trace ID and recording timed "spans" for each hop. It shows exactly which hop made a feed load slow. → Observability
- DNS (Domain Name System)
- The internet's phone book. It translates names like
i.instagram.cominto IP addresses, with caching controlled by TTLs. → DNS - Durability
- The guarantee that data, once acknowledged, won't be lost. Object stores advertise "eleven nines" (99.999999999%) annual durability for each object. → Object storage
E
- Edge n-gram
- An indexing technique that stores every prefix of a word ("s", "se", "sel"…) as a searchable token, so prefix queries become fast exact lookups. It powers typeahead in Elasticsearch. → Search
- Edge server
- A CDN cache server located in a Point of Presence close to users. It terminates connections and serves cached content. → CDN
- Elasticsearch
- A distributed search engine built on Lucene inverted indexes, offering full-text, prefix and aggregation queries with near-real-time updates. It's the Search Index in the Instagram diagram. → Search
- Encryption at rest / in transit
- In transit: data is encrypted while moving over the network (TLS). At rest: data is encrypted on disk, so stolen drives are useless. Instagram traffic uses TLS end to end, and stored media and databases are encrypted. → Security
- Erasure coding
- Splitting data into k pieces plus m parity pieces, so any k of the k+m pieces can rebuild it. It gives durability similar to 3× replication at ~1.4–1.5× storage cost, which is ideal for petabytes of photos. → Object storage
- ETag
- An HTTP header carrying a version fingerprint of a resource. Caches revalidate with
If-None-Matchand receive a cheap304 Not Modifiedif nothing changed. → CDN - Event-driven architecture
- A style where services publish events ("post created") and other services react to them, instead of calling each other directly. Instagram's Kafka-centred async layer is event-driven. → Message queues
- Eventual consistency
- If no new writes happen, all replicas will eventually return the same value, but reads may briefly be stale. A new post appearing in followers' feeds a few seconds later is eventual consistency. → CAP & consistency
- Exactly-once processing
- Each message affects the result exactly once. True exactly-once delivery is very hard, so systems usually achieve the same effect with at-least-once delivery plus idempotent processing (or Kafka transactions). → Message queues
- Exponential backoff
- Waiting progressively longer between retries (e.g. 100 ms, 200 ms, 400 ms…), usually with random jitter, so retries don't hammer a struggling service. The app uses it when a like request fails. → Resilience patterns
F
- Failover
- Automatically switching to a standby component (replica, server or region) when the primary fails. Examples: promoting a PostgreSQL replica, or GeoDNS moving users to another region. → Multi-region
- Fan-out on read (pull)
- Building a user's feed at request time by fetching recent posts from everyone they follow. Writes are cheap and reads are expensive. Instagram uses it for celebrity accounts. → News feed
- Fan-out on write (push)
- When someone posts, the post ID is written into every follower's precomputed timeline. Reads are cheap and writes are amplified. Instagram's Feed Fan-out Workers do this for normal accounts. → News feed
- FCM (Firebase Cloud Messaging)
- Google's push notification service for Android (and others), the Android counterpart to APNs. → Notifications
- Feature store
- A system that computes, stores and serves ML features (e.g. "how often Alice likes Bob's posts") consistently for both training and real-time ranking. → Analytics & ML
- Follower (replica)
- In leader-follower replication, a copy of the database that applies the leader's changes and can serve reads. Not to be confused with an Instagram follower! → Replication
G
- GeoDNS
- A DNS server that returns different IP addresses depending on where the request comes from, steering users to their nearest healthy region or PoP. → DNS
- Gossip protocol
- Nodes periodically exchange state with a few random peers, so information (membership, failures) spreads through the cluster like a rumour. Cassandra uses gossip to know which nodes are alive. → Replication
- Graceful degradation
- Continuing to serve a reduced but useful experience when parts of the system fail. If ranking is down, Instagram can show a chronological feed instead of an error. → Resilience patterns
- GraphQL
- A query language for APIs where the client specifies exactly which fields it needs in one request. Meta created it to reduce over-fetching on mobile. → API design
- gRPC
- A high-performance RPC framework that uses HTTP/2 and Protocol Buffers (compact binary messages), with deadlines and streaming. It's a common choice for service-to-service calls. → API design
H
- Hash partitioning
- Assigning each key to a shard by hashing it, which spreads data evenly but makes range scans across keys expensive. Cassandra hash-partitions by partition key. → Sharding
- Health check
- A periodic probe (e.g.
GET /health) that a load balancer uses to decide whether a server should receive traffic. Failing servers are removed from rotation automatically. → Load balancing - Heartbeat
- A small periodic "I'm alive" message. DM clients send heartbeats over their WebSocket; if they stop, the presence entry expires and the user is treated as offline. → Direct messaging
- Hedged request
- Sending a duplicate request to a second replica if the first hasn't answered within a short delay, then using whichever responds first. It cuts tail (p99) latency at a small cost in extra load. → Resilience patterns
- HLS / DASH
- HTTP-based adaptive streaming formats. Video is split into short segments listed in a manifest (
.m3u8for HLS,.mpdfor DASH) that the player downloads from the CDN. → Media processing - Horizontal scaling (scale out)
- Handling more load by adding more machines rather than bigger ones. Stateless services and sharded stores make Instagram scale horizontally. → Core principles
- Hot key
- A single cache or database key receiving a disproportionate share of traffic, e.g. a celebrity's new post object or like counter. Mitigated by replicating, splitting and caching locally. → Caching
- Hot partition / hotspot
- A shard or partition that receives far more load than others because of skewed keys, overloading one machine while others idle. → Sharding
- HTTP/2 and HTTP/3
- HTTP/2 multiplexes many requests over one TCP connection with header compression. HTTP/3 runs over QUIC (UDP), avoiding TCP head-of-line blocking and enabling faster connection setup. Both make mobile apps snappier. → Networking basics
- Hydration
- Turning a list of IDs into full objects by fetching their details, usually with a batched cache multi-get. The feed service hydrates the top 20 post IDs into post objects. → News feed
- HyperLogLog
- A probabilistic algorithm that estimates the number of distinct items (e.g. unique viewers of a Reel) using only kilobytes of memory, with ~1% error. → Analytics & ML
I
- Idempotency
- An operation is idempotent if doing it twice has the same effect as doing it once. Liking a post (keyed by post + user) is idempotent, so retries are safe. → API design
- Idempotency key
- A unique client-generated ID sent with a non-idempotent request (like "create post"), so the server can recognise retries and return the original result instead of acting twice. → API design
- Index (database)
- An auxiliary data structure (B-tree, LSM, hash) that lets a database find rows without scanning everything. Every index speeds up reads but slows writes and uses storage. → Indexing
- Inverted index
- A map from each word (term) to the list of documents containing it, like the index at the back of a book. It's how searching "#sunset" finds posts instantly. → Search
- Isolation level
- How much concurrent transactions can see of each other: read committed, repeatable read, snapshot or serializable. Stronger levels prevent more anomalies but reduce concurrency. → Databases
J
- Jitter
- Random variation added to retry delays or timers so that many clients don't act in lockstep. After an outage, jitter prevents millions of phones reconnecting at the same instant. → Resilience patterns
- JWT (JSON Web Token)
- A signed token containing claims (user ID, expiry) that any service can verify with a public key, without calling the auth server. Instagram-style gateways validate short-lived JWTs on every request. → Authentication
K
- Kafka
- A distributed, durable, partitioned commit log used as an event bus. Producers append events; many independent consumer groups read them at their own pace and can replay history. It's the backbone of Instagram's async layer in this guide. → Message queues
- Keep-alive (persistent connection)
- Reusing one TCP/TLS connection for many requests instead of opening a new one each time, which saves handshake round trips. → Networking basics
- Key-value store
- The simplest database model: store and fetch a value by its key, with very high speed and easy scaling. Redis and DynamoDB are examples. → Databases
L
- L4 / L7 load balancing
- L4 balancers route by IP and port (TCP/UDP), which is fast and protocol-agnostic. L7 balancers understand HTTP, so they can route by path or header, terminate TLS and retry. Instagram-style stacks put L4 in front of L7 proxies and gateways. → Load balancing
- Latency
- The time one operation takes, e.g. 85 ms for a feed request. Usually reported as percentiles (p50, p99) because averages hide slow outliers. → Core principles
- Leader election
- The process by which nodes in a cluster agree on which one acts as leader (e.g. a new database primary after a failure), usually via a consensus system like ZooKeeper, etcd or Raft. → Replication
- Leader-follower replication
- One node (the leader or primary) accepts writes and streams them to followers (replicas), which serve reads. Instagram's sharded PostgreSQL works this way. → Replication
- Lease
- A time-limited permission. In caching, a lease lets only one client refill a missing key (preventing stampedes and stale sets), an idea described in Facebook's Memcache paper. → Caching
- Least connections
- A load-balancing algorithm that sends each new request to the server with the fewest active connections, which adapts to uneven request costs. → Load balancing
- Load balancer
- A component that spreads incoming traffic across many servers and removes unhealthy ones. In the Instagram diagram it sits between DNS and the API Gateway. → Load balancing
- Load shedding
- Deliberately rejecting some requests (lowest priority first) when overloaded, so the rest still succeed. For example, Instagram might drop prefetch requests before feed requests. → Resilience patterns
- Logical shard
- A virtual partition, many of which live on each physical database server. Moving whole logical shards between machines makes resharding easy. Instagram publicly described thousands of logical shards in PostgreSQL. → Sharding
- Long polling
- The client makes an HTTP request that the server holds open until there's new data (or a timeout), then the client immediately asks again. It's a fallback for real-time updates when WebSockets aren't available. → Direct messaging
- LRU (Least Recently Used)
- A cache eviction policy that removes the entry unused for the longest time when space runs out. It's a good default for feeds and post objects. → Caching
- LSM tree (Log-Structured Merge tree)
- A storage engine that buffers writes in memory and flushes them as sorted immutable files, merged later by compaction. Writes are very fast, which is why Cassandra, RocksDB and HBase use it. → Indexing
M
- Manifest (video)
- A small file listing a video's available bitrates and the URLs of its segments, which a player reads first to start adaptive streaming. → Media processing
- Materialized view
- A precomputed, stored result of a query that's kept up to date as data changes. A user's precomputed home timeline is effectively a materialized view of "recent posts by people I follow". → Databases
- Memcached
- A simple, very fast, distributed in-memory key-value cache. Facebook famously runs it at enormous scale, and Instagram has publicly described using it. → Caching
- Message queue
- A buffer where producers put messages and consumers take them off to process, decoupling the two in time and speed. Kafka (a log), RabbitMQ and SQS are examples. → Message queues
- Microservice
- A small, independently deployable service that owns one business capability and its data, such as the Like & Comment service or the Search Service. → Microservices
- Content moderation
- Detecting and removing content that breaks policy, using ML classifiers, hash matching against known-bad content and human review. It runs in Instagram's media processing pipeline. → Media processing
- Monolith
- An application built and deployed as one unit. It's simple to start with, but harder to scale teams and components independently. Instagram began as a Django monolith. → Microservices
- mTLS (mutual TLS)
- TLS where both sides present certificates, so services authenticate each other as well as encrypting traffic. It's a standard for zero-trust service-to-service calls. → Security
- Multi-leader replication
- Several nodes, often in different regions, accept writes and replicate to each other. Writes are local and fast, but conflicting concurrent writes must be resolved. → Replication
- Multipart / resumable upload
- Uploading a large file in independent chunks that can be retried individually and resumed after a disconnect. It's essential for Reels uploads on mobile networks. → Media upload
N
- Network partition
- A network failure that splits nodes into groups that can't talk to each other, though each group is still running. It's the "P" in CAP. → CAP & consistency
- Normalization
- Structuring relational data so each fact is stored once (no duplication), which avoids update anomalies but needs joins to read. It's the opposite of denormalization. → Databases
- NoSQL
- An umbrella term for non-relational databases (key-value, document, wide-column, graph) that typically trade joins and rich transactions for horizontal scale and flexible schemas. → Databases
- News feed / timeline
- The personalised, scrollable list of posts a user sees on the home screen. In Instagram it's built from precomputed timelines in Redis plus pulled celebrity posts, then ranked by ML. → News feed
O
- OAuth 2.0
- A standard for delegated authorization: a user lets an app access their data on another service via tokens, without sharing their password. "Log in with Facebook" builds on it. → Authentication
- Object storage
- Storage for immutable blobs addressed by a key in a flat namespace (e.g. S3). It's massively scalable, very durable and cheap. All Instagram photos and videos live here. → Object storage
- Observability
- How well you can understand a system's internal state from its outputs, mainly metrics, logs and traces. → Observability
- Offset (Kafka)
- A message's position number within a Kafka partition. Consumers commit offsets to record how far they've processed, so after a crash they resume from there. → Message queues
- Optimistic UI
- Updating the interface immediately as if an action succeeded, then reconciling when the server responds. The red heart on a like appears before the server confirms. → Clients
- Origin
- The authoritative source of content behind a cache or CDN. For Instagram media, the origin is object storage. → CDN
- Origin shield
- A middle caching tier between CDN edges and the origin, so many edge misses become a single origin request. It protects object storage when a post goes viral. → CDN
- Outbox pattern (transactional outbox)
- Writing an event to an "outbox" table in the same database transaction as the business change, then having a relay publish it to Kafka. It avoids the dual-write bug where the DB commit succeeds but the event is lost. → Message queues
P
- p50 / p95 / p99 (percentile latency)
- The latency below which 50%, 95% or 99% of requests complete. p99 captures the "tail" that heavy users hit constantly, so SLOs usually target p99, e.g. a feed p99 under 300 ms. → Observability
- PACELC
- An extension of CAP: if there's a Partition, choose Availability or Consistency; Else (normal operation), choose Latency or Consistency. Cassandra is PA/EL by default. → CAP & consistency
- Pagination
- Returning large result sets in pages. Offset pagination (
page=3) is simple but breaks on changing data; cursor pagination is robust. → API design - Partition
- A subset of a dataset stored together. In databases it's a shard, or a Cassandra partition (all rows sharing a partition key). In Kafka it's an ordered log that's a slice of a topic and the unit of parallelism. → Sharding
- Partition key (shard key)
- The field whose value decides which partition or shard a row lives on. Choosing it well (e.g.
user_idfor posts,thread_idfor messages) makes common queries hit one partition. → Sharding - PoP (Point of Presence)
- A CDN or network location in a city, containing many edge servers. Large CDNs operate hundreds to thousands of PoPs. → CDN
- PostgreSQL
- A powerful open-source relational database with strong ACID guarantees and rich indexing. Instagram's engineering blog describes running it sharded, with its ID generation done in PL/pgSQL. → Databases
- Pre-signed URL
- A URL to object storage that embeds a time-limited signature granting one specific operation (e.g. PUT this key). Clients upload media directly to storage without app servers handling the bytes. → Media upload
- Presence
- Tracking which users are online and which connection server holds each one's socket, usually in Redis with heartbeat TTLs. DMs use it to decide between WebSocket delivery and push. → Direct messaging
- Primary key
- The column(s) that uniquely identify a row. Choosing natural keys like
(post_id, user_id)for likes makes writes naturally idempotent. → Indexing - Pub/Sub (publish-subscribe)
- A messaging pattern where publishers send messages to a topic and every subscriber to that topic receives a copy. → Message queues
- Push CDN vs pull CDN
- A push CDN is loaded with content in advance by you. A pull CDN fetches from the origin on the first miss. Instagram's long-tail media suits pull. → CDN
- Push notification
- A message delivered to a device by the OS push service (APNs or FCM) even when the app is closed, e.g. "alice liked your photo". It's best-effort and not guaranteed. → Notifications
Q
- QPS (Queries Per Second)
- The number of requests a system handles each second; also RPS or TPS. Assuming 500M DAU each loading the feed 10×/day gives ~58k feed QPS on average. → Capacity estimation
- QUIC
- A transport protocol over UDP with built-in TLS 1.3, faster handshakes, connection migration (Wi-Fi to cellular) and no TCP head-of-line blocking. HTTP/3 runs on it. → Networking basics
- Quorum
- The minimum number of replicas that must acknowledge a read or write. With N replicas, choosing R + W > N (e.g. N=3, W=2, R=2) guarantees that reads overlap the latest write. → Replication
R
- Ranking (feed ranking)
- Ordering candidate posts by predicted interest using ML models over features like affinity, recency and engagement. Instagram moved its feed from chronological to ranked in 2016. → Analytics & ML
- Rate limiting
- Capping how many requests a client may make per time window, to stop abuse and protect capacity. Login attempts, follows and searches are all rate-limited at Instagram's API Gateway. → Rate limiting
- Read replica
- A follower database copy used to serve reads and scale read throughput. It may lag slightly behind the primary. → Replication
- Read-your-writes consistency
- A guarantee that a user always sees their own updates, even if others see them later. Your new post must appear on your own profile instantly. → CAP & consistency
- Redis
- An in-memory data-structure store (strings, hashes, sorted sets, sets) with optional persistence and clustering. It's the Feed Cache in the Instagram diagram, holding timelines and counters. → Caching
- Refresh token
- A long-lived credential used only to obtain new short-lived access tokens, and revocable on the server. It keeps users logged in for weeks without long-lived JWTs. → Authentication
- Region
- A geographic area containing one or more data centers (availability zones). Instagram-scale systems run in several regions for latency and disaster recovery. → Multi-region
- Rendition
- One processed version of a media file at a specific size, format or bitrate, e.g. the 640 px WebP of a photo. Media workers create several renditions of every upload. → Media processing
- Replication
- Keeping copies of the same data on multiple machines for availability, durability and read scaling. → Replication
- Replication factor (RF)
- How many copies of each piece of data are stored. RF=3 is the common default for Cassandra and Kafka. → Replication
- Replication lag
- The delay between a write on the leader and its appearance on a replica. Lag causes stale reads, e.g. a user not seeing a profile edit they just made if the read hits a lagging replica. → Replication
- Resharding
- Changing how data is split across shards (adding shards, moving data) as the system grows. Logical shards and consistent hashing make it far less painful. → Sharding
- REST
- An API style built on HTTP resources (nouns like
/posts/{id}) and standard methods (GET, POST, PUT, DELETE). It's simple, cacheable and universal. → API design - Retry
- Repeating a failed request in the hope that the failure was transient. Retries need backoff, jitter, budgets and idempotent operations, or they make outages worse. → Resilience patterns
- Reverse proxy
- A server that sits in front of backend servers and forwards client requests to them, adding TLS termination, caching, compression or routing. NGINX and Envoy are common examples. → API gateway
- Round robin
- The simplest load-balancing algorithm: send each request to the next server in turn. → Load balancing
- RPO / RTO
- Recovery Point Objective: how much data loss (in time) is acceptable after a disaster. Recovery Time Objective: how quickly service must be restored. Example: RPO 5 s, RTO 5 min for a regional failover. → Multi-region
S
- Saga
- A way to run a multi-step operation across services without a distributed transaction. Each step is a local transaction with a matching compensating action that undoes it if a later step fails. → Microservices
- Scalability
- The ability to handle growing load by adding resources while keeping performance acceptable. → Core principles
- Secondary index
- An index on a non-primary-key column, e.g. finding users by email. In sharded systems it is often maintained as a separate lookup table, such as
usernames → user_id. → Indexing - Service discovery
- How services find the current network addresses of the instances of other services, via a registry (Consul, etcd, ZooKeeper) or DNS. → Microservices
- Sharding
- Splitting a dataset horizontally across many database servers by a shard key, so no single machine holds or serves everything. Instagram shards users and posts by
user_id. → Sharding - Signed URL (download)
- A media URL carrying an expiry and an HMAC signature that the CDN edge verifies, so links can't be forged and leaked links stop working. Instagram media URLs carry such parameters. → CDN
- SLA / SLI / SLO
- SLI: a measured indicator (e.g. the fraction of feed requests under 300 ms). SLO: the internal target for it (99.9%). SLA: a contractual promise to customers, with penalties. → Observability
- Sliding window (rate limiting)
- A rate-limiting algorithm that counts requests over a rolling time window. It's smoother and fairer than fixed windows, which allow bursts at window boundaries. → Rate limiting
- Snowflake ID
- Twitter's 64-bit, time-sortable ID format: timestamp + machine ID + sequence, generated without coordination. Instagram's variant packs 41 bits of time, 13 bits of logical shard and 10 bits of sequence. → ID generation
- The network of relationships between users (who follows whom), stored as adjacency lists in both directions. Its size and skew drive feed design. → Social graph
- SPOF (Single Point of Failure)
- Any component whose failure takes the whole system down. It's eliminated with redundancy at every layer: paired LBs, stateless service fleets and replicated stores. → Core principles
- SQL / relational database
- A database that stores data in tables with schemas and relations, queried with SQL, and offering joins and ACID transactions. Examples are PostgreSQL and MySQL. → Databases
- Stateless service
- A service that keeps no per-user data in memory between requests (state lives in databases and caches), so any instance can serve any request and instances can be added or killed freely. → Microservices
- Sticky session (session affinity)
- A load balancer routing all of a client's requests to the same server. It's needed for stateful connections like DM WebSockets, and avoided for stateless HTTP APIs. → Load balancing
- Storage tiering
- Moving data between storage classes (hot SSD, warm HDD, cold archive) according to access frequency, to cut cost. Old, rarely viewed photos can live on cheaper tiers. → Object storage
- Stream processing
- Processing events continuously as they arrive (with Flink, Kafka Streams or Spark Streaming), e.g. real-time view counts or abuse detection. It's the counterpart to batch processing. → Analytics & ML
- Strong consistency (linearizability)
- Every read returns the most recent completed write, as if there were a single copy of the data. It's needed for username uniqueness and block lists. → CAP & consistency
T
- TAO
- Facebook's geographically distributed graph data store and cache (described in a public paper) that serves objects and associations, such as users, likes and friendships, at massive read rates. → Social graph
- TCP
- The reliable, ordered, connection-based transport protocol under HTTP/1.1 and HTTP/2. It needs a handshake before data flows. → Networking basics
- Thundering herd
- A large number of clients or processes waking up and hitting the same resource at once, e.g. after a cache expiry, a restart or a viral post. Mitigated with jitter, request coalescing and origin shields. → Caching
- Throughput
- How much work a system completes per unit of time (requests/s, MB/s). It's distinct from latency: a system can have high throughput and still be slow per request. → Core principles
- Timeout / deadline
- The maximum time a caller waits for a response before giving up. Every network call needs one, and deadlines should shrink as they propagate down the call chain. → Resilience patterns
- TLS (Transport Layer Security)
- The protocol that encrypts and authenticates connections (the "S" in HTTPS). TLS 1.3 needs only one round trip to set up. → Networking basics
- Token bucket
- A rate-limiting algorithm. A bucket refills with tokens at a fixed rate up to a maximum; each request spends a token, and requests are rejected when it's empty. It allows short bursts while enforcing an average rate. → Rate limiting
- Tombstone
- A marker written to record a deletion in LSM-based stores like Cassandra. The data is physically removed later during compaction. Many expiring Stories rows create many tombstones. → Stories
- Transcoding
- Converting video or audio from one encoding, resolution or bitrate to another, e.g. turning an uploaded Reel into several HLS renditions. It's CPU- or GPU-heavy, so it runs asynchronously. → Media processing
- Trie (prefix tree)
- A tree where each path from the root spells a prefix, making "all words starting with sel" fast to find. It's a classic structure for typeahead. → Search
- TTL (Time To Live)
- How long a piece of data stays valid before it expires: a DNS record, a cache entry, a CDN object, or a 24-hour Story row in Cassandra. → Stories
- Two-phase commit (2PC)
- A protocol for atomic commits across multiple databases. A coordinator asks every participant to prepare, then tells all of them to commit. It's correct but slow, and it blocks if the coordinator fails, so large web systems usually prefer sagas and idempotent retries. → Microservices
- Typeahead (autocomplete)
- Suggesting results while the user types each character. It needs very low latency, prefix indexes and caching of popular prefixes. → Search
U
- UDP
- A lightweight, connectionless transport with no delivery or ordering guarantees. It's used for DNS, real-time media and as the base for QUIC. → Networking basics
- Upsert
- A write that inserts a row if it doesn't exist or updates it if it does. In Cassandra every write is effectively an upsert, which makes retries idempotent. → Databases
- UUID
- A 128-bit identifier that can be generated anywhere without coordination. Random UUIDv4 isn't time-sortable and indexes poorly; UUIDv7 and ULID add time ordering. → ID generation
V
- Vector clock
- A list of per-node counters attached to a value that lets a system tell whether two versions are causally ordered or truly concurrent (a conflict). It's used in Dynamo-style databases. → Replication
- Vector search (embeddings)
- Finding items whose ML embedding vectors are closest to a query vector, i.e. semantically or visually similar. It powers recommendation candidate retrieval for Explore-style surfaces. → Analytics & ML
- Vertical scaling (scale up)
- Handling more load by using a bigger machine (more CPU, RAM, disk). It's simple, but has a hard ceiling and remains a single point of failure. → Core principles
- VIP (Virtual IP)
- An IP address not tied to one physical machine, which can move between load balancers on failure, so clients always have a working address. → Load balancing
- Virtual nodes (vnodes)
- Placing each physical server at many points on a consistent-hash ring. Load spreads more evenly, and when a node joins or leaves, its data moves to or from many peers instead of just one neighbour. → Consistent hashing
W
- WAF (Web Application Firewall)
- A filter at the edge that blocks malicious HTTP traffic (injection attacks, bad bots, known exploits) before it reaches your servers. → Security
- WAL (Write-Ahead Log)
- An append-only log where a database records every change before applying it, enabling crash recovery and streaming replication. PostgreSQL replicas follow the primary's WAL. → Replication
- WebSocket
- A protocol that upgrades an HTTP connection into a persistent, two-way channel, so the server can push messages instantly. Instagram-style DMs use it. → Direct messaging
- Wide-column store
- A NoSQL model where rows are grouped into partitions and each partition holds many sorted columns or rows, e.g. Cassandra, HBase, Bigtable. It's great for time-ordered, per-entity data like a user's posts or a conversation's messages. → Databases
- Write amplification
- One logical write causing many physical writes, e.g. one post fanned out to 10,000 timelines, or one row rewritten repeatedly during LSM compaction. → News feed
- Write-around
- Writes go straight to the database and skip the cache, which is filled only on later reads. This avoids polluting the cache with data that's never read. → Caching
- Write-back (write-behind)
- Writes go to the cache first and are flushed to the database asynchronously later. It's fast, but data can be lost if the cache dies. Like counters batched in Redis use this pattern. → Caching
- Write-through
- Every write updates the cache and the database together, so the cache is always fresh, at the cost of slower writes. Fan-out workers writing timelines into Redis behave like write-through for the feed. → Caching
X
- XSS (Cross-Site Scripting)
- An attack that injects malicious script into pages viewed by other users, e.g. via an unescaped comment or bio. It's prevented by output encoding and Content Security Policy. → Security
Z
- Zero-downtime deployment
- Releasing new code without interrupting users, using rolling, blue-green or canary deployments behind load balancers, plus backward-compatible schema and API changes. → Microservices
- ZooKeeper
- A coordination service offering consistent configuration storage, distributed locks, service registration and leader election. It's historically used by Kafka, HBase and many others; newer systems use etcd or built-in Raft. → Replication
🎯 Key takeaways
- Most system design vocabulary falls into a few families: scaling (sharding, replication, caching), consistency (CAP, quorum, eventual), async (Kafka, fan-out, outbox), reliability (timeouts, retries, circuit breakers) and edge (DNS, CDN, load balancing).
- For any term, practise saying what it is, why it exists, and where it appears in Instagram's architecture.
- When a term is fuzzy, follow its → lesson link. Each lesson explains the idea from scratch with diagrams and worked examples.
Related lessons
- How to approach a system design problem: where to start if you're new
- End-to-end request flows: see most of these terms working together
- Full interview walkthrough: use the vocabulary under time pressure
- Core principles and CAP & consistency: the foundational terms in depth