Skip to content

Part 11 of 18

Common Design Patterns

8 pages · 8 written

  1. 1.Pattern: Scaling ReadsIntermediate

    Serve read-heavy traffic step by step: tune queries and indexes, scale up, add replicas, layer caches and CDNs, precompute views, handle lag and hot keys.

  2. 2.Pattern: Scaling WritesIntermediate

    Handle heavy write load: optimise one node, choose write-friendly stores, shard well, batch and buffer, write behind, split hot keys and shed load.

  3. 3.Pattern: Pushing Realtime UpdatesAdvanced

    Push changes to users as they happen: pick a protocol, route events to connection servers, track presence, keep order, resume after drops and scale out.

  4. 4.Pattern: Managing Long-Running TasksIntermediate

    Split slow work into a fast acknowledgement and background processing: queue jobs, return an ID, run worker pools, retry safely and report progress.

  5. 5.Pattern: Dealing with ContentionAdvanced

    Stop many users claiming the same seat, item or bid: atomic writes, locks, optimistic checks, TTL holds, single-writer queues and waiting rooms.

  6. 6.Pattern: Multi-Step Processes and WorkflowsAdvanced

    Run flows that span services, hours and humans without losing their place: sagas, state machines in the DB, workflow engines and durable execution.

  7. 7.Pattern: Handling Large Files and BlobsIntermediate

    Move big files without choking your servers: presigned URLs, multipart and resumable uploads, chunk dedupe, metadata sync, events and signed CDN delivery.

  8. 8.Choosing the Right PatternIntermediate

    Read the signals in a problem statement, map them to the right patterns, combine them safely, and escalate from simple to complex only on evidence.