Keep a live WebSocket per user for instant delivery, persist every message, track sent-delivered-read ticks, and queue messages for offline users.
Back every wallet balance with an idempotent, double-entry, append-only ledger, protect updates with optimistic locking, enforce limits, detect fraud, and reconcile against the gateway.
Persist jobs durably, pick due ones by time or priority, guarantee at-least-once with deduplication, retry with backoff, and isolate tenants.
Split files into chunks for resumable uploads, dedupe chunks by hash, keep metadata separate from blobs, enforce access control, version files, and serve downloads via CDN.
Push posts into follower feeds at write time for fast reads, pull on read for celebrities, rank instead of pure time order, and cache feeds with cursor pagination.
Decouple producers from delivery with a queue, pick channels from user preferences, render from templates, and retry failed sends with priority handling.
Make payments idempotent, prevent double-spend with atomic checks, authorize before capture, and record every movement in an append-only double-entry ledger.
Index driver locations geospatially for fast nearest-driver matching, estimate arrival with routing, price by live supply and demand, and move every trip through a strict state machine.
Index queries in a trie by prefix, precompute top-K popular completions at each node, cache hot prefixes, and refresh rankings from query logs.
Partition by item so each has one owner, count in rolling event-time windows, dedupe and handle hot keys, then publish atomic versioned snapshots the serving layer reads with freshness info.
Transcode uploads into many bitrates asynchronously, serve segments from a CDN with adaptive bitrate streaming, recommend by behaviour, and count views approximately at scale.
Turn one long URL into a tiny base62 key, store the mapping, and redirect fast using a cache because reads vastly outnumber writes.
Count requests per client per time window and reject the excess : token bucket for bursts, sliding window for smoothness, shared in Redis for distributed consistency.