<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: mseada</title>
    <description>The latest articles on DEV Community by mseada (@mseada).</description>
    <link>https://dev.to/mseada</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F591919%2F7d3412df-ee51-4627-ac3b-9845a4fae750.png</url>
      <title>DEV Community: mseada</title>
      <link>https://dev.to/mseada</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mseada"/>
    <language>en</language>
    <item>
      <title>Designing data-intensive applications: replication, partitioning, quorums</title>
      <dc:creator>mseada</dc:creator>
      <pubDate>Thu, 22 Oct 2026 06:13:33 +0000</pubDate>
      <link>https://dev.to/mseada/designing-data-intensive-applications-replication-partitioning-quorums-10kk</link>
      <guid>https://dev.to/mseada/designing-data-intensive-applications-replication-partitioning-quorums-10kk</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 4 of 8 · week 4 of the learning path&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When data volume, speed or complexity is the main challenge, the design comes down to four choices: how data is stored, copied, split and kept consistent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning objectives&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose a storage engine and data model for a workload.&lt;/li&gt;
&lt;li&gt;Reason about replication, partitioning and the anomalies they create.&lt;/li&gt;
&lt;li&gt;Pick transaction and consistency levels, and decide between batch and stream processing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Storage&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Choice&lt;/th&gt;
&lt;th&gt;Strength&lt;/th&gt;
&lt;th&gt;Used by&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;B-tree&lt;/td&gt;
&lt;td&gt;Updates in place, fast reads, mature indexing&lt;/td&gt;
&lt;td&gt;Most relational databases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LSM-tree&lt;/td&gt;
&lt;td&gt;Fast writes through sequential appends and background compaction&lt;/td&gt;
&lt;td&gt;Cassandra, RocksDB and similar&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Row store&lt;/td&gt;
&lt;td&gt;Whole-record reads and writes (OLTP)&lt;/td&gt;
&lt;td&gt;Application databases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Column store&lt;/td&gt;
&lt;td&gt;Scanning a few columns over many rows (OLAP)&lt;/td&gt;
&lt;td&gt;Warehouses and analytics&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Replication&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Leader and followers:&lt;/strong&gt; writes go to the leader and copy to followers, synchronously or asynchronously; simple and common.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-leader:&lt;/strong&gt; several leaders accept writes, useful across regions, but conflicts must be resolved.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leaderless with quorums:&lt;/strong&gt; with N replicas, a write needs W acknowledgements and a read asks R; when R plus W is greater than N, a read overlaps the latest write.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replication lag&lt;/strong&gt; causes anomalies: reading your own write from a lagging follower, or seeing data go backwards. Route a user's reads to the leader after a write, or track versions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Partitioning&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;By key range:&lt;/strong&gt; keeps related keys together and supports range scans, but sequential keys such as timestamps create hot spots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By hash:&lt;/strong&gt; spreads load evenly, but loses range scans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rebalancing:&lt;/strong&gt; use many more partitions than nodes, or consistent hashing, so adding a node moves little data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identifiers:&lt;/strong&gt; avoid a single auto-increment counter at scale; use IDs that combine a timestamp, a shard or machine part and a sequence so they are unique and roughly sortable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Transactions and consistency&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ACID transactions protect against partial failure; &lt;strong&gt;isolation levels&lt;/strong&gt; trade safety for speed: read committed, snapshot isolation and serializable.&lt;/li&gt;
&lt;li&gt;Know the anomalies: dirty reads, lost updates and write skew, where two transactions each read the same data and write different rows so that together they break a rule.&lt;/li&gt;
&lt;li&gt;Distributed transactions with two-phase commit are slow and fragile; prefer sagas where the business allows.&lt;/li&gt;
&lt;li&gt;Consistency ranges from linearizable (acts like one copy) to eventual. Choose the weakest level a feature can tolerate, and the strongest for money and inventory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Batch and stream:&lt;/strong&gt; batch jobs (Spark, MapReduce) process bounded data cheaply and accurately; stream processors (Flink, Kafka Streams) handle unbounded data with low latency and must deal with windows and late events. Design stream jobs to be idempotent so replays give the same result.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Worked numbers:&lt;/strong&gt; 1 billion users at 1 KB each is about 1 TB. With three replicas that is 3 TB; at 500 GB per node you need about six nodes before growth and headroom. With N=3, W=2 and R=2 a read always overlaps the latest acknowledged write.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-world examples&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Dynamo (2007):&lt;/strong&gt; a published design for a highly available key-value store using leaderless replication and quorums; it inspired many later databases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Spanner (2012):&lt;/strong&gt; a globally distributed database that offers strong consistency by using tightly synchronized clocks, showing that the trade-off can be pushed with specialized hardware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instagram IDs:&lt;/strong&gt; the team documented generating sortable IDs from a timestamp, a shard ID and a sequence, so each shard creates unique IDs with no central counter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Design exercise:&lt;/strong&gt; design the storage for a chat history store holding 100 billion messages. Choose the engine, the partition key, the replication setting and the consistency level, and explain how you would serve the latest 50 messages of a conversation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quiz 4&lt;/strong&gt; (5 questions, pass mark 4)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Why are LSM-trees good for write-heavy workloads?

&lt;ul&gt;
&lt;li&gt;A) They give faster random reads than B-trees in every case&lt;/li&gt;
&lt;li&gt;B) Writes are sequential appends merged later by compaction&lt;/li&gt;
&lt;li&gt;C) They need no disk&lt;/li&gt;
&lt;li&gt;D) They give transactions across nodes&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;With N=3 replicas, which setting makes a read overlap the latest acknowledged write?

&lt;ul&gt;
&lt;li&gt;A) W=1, R=1&lt;/li&gt;
&lt;li&gt;B) W=1, R=2&lt;/li&gt;
&lt;li&gt;C) W=2, R=2&lt;/li&gt;
&lt;li&gt;D) W=0, R=3&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;What causes the read-your-writes anomaly?

&lt;ul&gt;
&lt;li&gt;A) Too many indexes&lt;/li&gt;
&lt;li&gt;B) Clock skew in browsers&lt;/li&gt;
&lt;li&gt;C) Encrypted disks&lt;/li&gt;
&lt;li&gt;D) Reading from a follower that has not yet received your recent write&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Why hash-partition a table keyed by timestamp instead of using key ranges?

&lt;ul&gt;
&lt;li&gt;A) All current writes hit one range partition, a hot spot, while hashing spreads them&lt;/li&gt;
&lt;li&gt;B) Timestamps are sensitive data&lt;/li&gt;
&lt;li&gt;C) Range queries become faster&lt;/li&gt;
&lt;li&gt;D) It removes the need for replicas&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Two on-call doctors each see the other on call and both go off call. What is this and what prevents it?

&lt;ul&gt;
&lt;li&gt;A) A dirty read, fixed by a cache&lt;/li&gt;
&lt;li&gt;B) Write skew, fixed by serializable isolation or explicit locking&lt;/li&gt;
&lt;li&gt;C) A network partition, fixed by retries&lt;/li&gt;
&lt;li&gt;D) A deadlock, fixed by more replicas&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;/p&gt;
  Quiz 4 answers
  &lt;ol&gt;
&lt;li&gt;&lt;strong&gt;B&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C&lt;/strong&gt; with N=3, W=2 and R=2, R plus W is 4, which is greater than N, so a read overlaps the latest write.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;D&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;B&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources and further reading&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dataintensive.net/" rel="noopener noreferrer"&gt;Designing Data-Intensive Applications&lt;/a&gt; by Martin Kleppmann, the main reference for this module.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://courses.cs.washington.edu/courses/cse444/21wi/papers/p205-decandia.pdf" rel="noopener noreferrer"&gt;Dynamo: Amazon's highly available key-value store&lt;/a&gt;, the 2007 paper (hosted copy).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://research.google/pubs/pub39966/" rel="noopener noreferrer"&gt;Spanner: Google's globally distributed database&lt;/a&gt;, the OSDI 2012 paper.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://instagram-engineering.com/sharding-ids-at-instagram-1cf5a71e5a5c" rel="noopener noreferrer"&gt;Sharding and IDs at Instagram&lt;/a&gt;, on time-sortable 64-bit IDs per shard.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Part 4 of 8 in the System Design Learning Path series. Next: part 5.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>database</category>
      <category>architecture</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Event-driven architecture: events, outbox and idempotency</title>
      <dc:creator>mseada</dc:creator>
      <pubDate>Thu, 22 Oct 2026 06:12:58 +0000</pubDate>
      <link>https://dev.to/mseada/event-driven-architecture-events-outbox-and-idempotency-n00</link>
      <guid>https://dev.to/mseada/event-driven-architecture-events-outbox-and-idempotency-n00</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 3 of 8 · week 3 of the learning path&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In an event-driven system a service records a fact that has happened and others react to it on their own time, which absorbs spikes and lets you add consumers without touching the producer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning objectives&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tell events, commands and queries apart and name them correctly.&lt;/li&gt;
&lt;li&gt;Choose between a queue and a log, and design for duplicates and ordering.&lt;/li&gt;
&lt;li&gt;Apply the outbox, idempotent consumer, dead-letter and CQRS patterns.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Concepts&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Example name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Event&lt;/td&gt;
&lt;td&gt;A fact that already happened, named in the past tense&lt;/td&gt;
&lt;td&gt;OrderPlaced&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Command&lt;/td&gt;
&lt;td&gt;A request to a specific service to do something&lt;/td&gt;
&lt;td&gt;ChargeCard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Query&lt;/td&gt;
&lt;td&gt;A request for data&lt;/td&gt;
&lt;td&gt;GetOrder&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Queue&lt;/td&gt;
&lt;td&gt;Each message goes to one consumer and is removed&lt;/td&gt;
&lt;td&gt;Work distribution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Log&lt;/td&gt;
&lt;td&gt;Ordered, retained stream that many consumers read at their own pace&lt;/td&gt;
&lt;td&gt;Event streaming, replay&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consumer group&lt;/td&gt;
&lt;td&gt;Instances that share the partitions of a topic&lt;/td&gt;
&lt;td&gt;Scale out a consumer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Delivery and ordering&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Most systems deliver at least once, so a message can arrive twice. Make handlers &lt;strong&gt;idempotent&lt;/strong&gt;, for example by recording processed event IDs, so duplicates do no harm.&lt;/li&gt;
&lt;li&gt;Ordering is only guaranteed within a partition. Use a key such as the order ID so all events for one order land in the same partition.&lt;/li&gt;
&lt;li&gt;Move messages that keep failing to a &lt;strong&gt;dead-letter queue&lt;/strong&gt; after limited retries, and alert on it.&lt;/li&gt;
&lt;li&gt;Version event schemas, keep changes backward compatible and register them so consumers can evolve safely.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Patterns&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Outbox:&lt;/strong&gt; write the data change and the event in one database transaction, then a relay publishes the event, so you never update data without publishing or the reverse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Saga:&lt;/strong&gt; coordinate multi-step workflows through events, with compensating events on failure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CQRS:&lt;/strong&gt; keep the write model separate from one or more read-optimized models that are updated from events.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Event sourcing:&lt;/strong&gt; store the sequence of events as the source of truth and rebuild state from it; powerful for audit, but adds complexity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Worked example, order flow.&lt;/strong&gt; The Order service saves the order and writes OrderPlaced to its outbox. Inventory reacts and emits StockReserved. Payment reacts and emits PaymentCaptured. Shipping starts only after that. Later the team adds an email service and an analytics pipeline as new consumers of the same events, with no change to Order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pitfalls:&lt;/strong&gt; treating events as remote calls that expect a reply, event chains nobody can follow without tracing, breaking schema changes, assuming global ordering, and putting huge payloads in events instead of references.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-world examples&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn and Kafka:&lt;/strong&gt; LinkedIn built Kafka around 2010 to move activity and operational data between systems at scale, and open sourced it; it became the standard log for event streaming.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stripe webhooks:&lt;/strong&gt; Stripe tells merchants about payments by sending events to their endpoint, retrying on failure, so merchants must handle duplicates and out-of-order delivery. It is a public example of at-least-once delivery.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Netflix:&lt;/strong&gt; it streams very large volumes of operational and viewing events through a central pipeline for monitoring and analytics, decoupling the producers from the many teams consuming them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Design exercise:&lt;/strong&gt; design the events for a food delivery order (placed, accepted, picked up, delivered, refunded). Choose partition keys, say where you need an outbox, and describe what a consumer does on a duplicate and on an out-of-order event.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quiz 3&lt;/strong&gt; (5 questions, pass mark 4)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Which of these is a command rather than an event?

&lt;ul&gt;
&lt;li&gt;A) OrderPlaced&lt;/li&gt;
&lt;li&gt;B) PaymentCaptured&lt;/li&gt;
&lt;li&gt;C) ChargeCard&lt;/li&gt;
&lt;li&gt;D) UserRegistered&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;What does at-least-once delivery mean for a consumer?

&lt;ul&gt;
&lt;li&gt;A) A message may arrive more than once, so handlers must be idempotent&lt;/li&gt;
&lt;li&gt;B) Duplicates never happen&lt;/li&gt;
&lt;li&gt;C) Messages may be lost&lt;/li&gt;
&lt;li&gt;D) Exactly one copy is always delivered&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;What does the outbox pattern guarantee?

&lt;ul&gt;
&lt;li&gt;A) Messages are encrypted&lt;/li&gt;
&lt;li&gt;B) Ordering across all topics&lt;/li&gt;
&lt;li&gt;C) Faster consumers&lt;/li&gt;
&lt;li&gt;D) The data change and the event are committed together and the event is then published reliably&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;How do you keep all events for one order in order on a partitioned log?

&lt;ul&gt;
&lt;li&gt;A) Use a random key&lt;/li&gt;
&lt;li&gt;B) Use the order ID as the key so they share a partition&lt;/li&gt;
&lt;li&gt;C) Create a topic per event&lt;/li&gt;
&lt;li&gt;D) Make messages bigger&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;What is CQRS?

&lt;ul&gt;
&lt;li&gt;A) A type of queue&lt;/li&gt;
&lt;li&gt;B) A database index&lt;/li&gt;
&lt;li&gt;C) Separating the write model from one or more read-optimized models, often updated by events&lt;/li&gt;
&lt;li&gt;D) A caching protocol&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;/p&gt;
  Quiz 3 answers
  &lt;ol&gt;
&lt;li&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;D&lt;/strong&gt; the outbox writes the data change and the event in one transaction, so neither can be lost without the other.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;B&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources and further reading&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://kafka.apache.org/documentation/" rel="noopener noreferrer"&gt;Apache Kafka documentation&lt;/a&gt;, starting with the introduction to event streaming.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying" rel="noopener noreferrer"&gt;The Log: what every software engineer should know about real-time data's unifying abstraction&lt;/a&gt; by Jay Kreps of LinkedIn, on why a log underlies messaging and replication.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://microservices.io/patterns/data/transactional-outbox" rel="noopener noreferrer"&gt;Transactional outbox pattern&lt;/a&gt; on microservices.io.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.stripe.com/webhooks" rel="noopener noreferrer"&gt;Stripe webhooks documentation&lt;/a&gt;, a public example of at-least-once event delivery with retries and signatures.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter" rel="noopener noreferrer"&gt;Amazon Builders' Library: timeouts, retries, and backoff with jitter&lt;/a&gt;, for safe retries and idempotent APIs.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Part 3 of 8 in the System Design Learning Path series. Next: part 4.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>architecture</category>
      <category>eventdriven</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Microservices: boundaries, sagas and failure</title>
      <dc:creator>mseada</dc:creator>
      <pubDate>Thu, 22 Oct 2026 06:11:51 +0000</pubDate>
      <link>https://dev.to/mseada/microservices-boundaries-sagas-and-failure-769</link>
      <guid>https://dev.to/mseada/microservices-boundaries-sagas-and-failure-769</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 2 of 8 · week 2 of the learning path&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Microservices let many teams release and scale parts of a system independently, but they trade simple code for a distributed system, so use them when the organization needs the independence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning objectives&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decide between a modular monolith and microservices for a given team and product.&lt;/li&gt;
&lt;li&gt;Draw service boundaries, own data per service and choose how services communicate.&lt;/li&gt;
&lt;li&gt;Keep multi-service workflows consistent and resilient.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Principles&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Boundaries follow business capabilities, so a change usually touches one service.&lt;/li&gt;
&lt;li&gt;Each service owns its data; others reach it only through its API or events.&lt;/li&gt;
&lt;li&gt;Services deploy independently, and the team that builds a service runs it.&lt;/li&gt;
&lt;li&gt;Start with a well-structured modular monolith and split out services when a real need appears.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Communication&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Style&lt;/th&gt;
&lt;th&gt;Use it for&lt;/th&gt;
&lt;th&gt;Watch out for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Synchronous (REST, gRPC)&lt;/td&gt;
&lt;td&gt;Queries and steps where the caller needs an answer now&lt;/td&gt;
&lt;td&gt;Latency adds up, failures cascade&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Asynchronous (events, queues)&lt;/td&gt;
&lt;td&gt;Notifying others, long steps, absorbing spikes&lt;/td&gt;
&lt;td&gt;Harder to follow, needs idempotency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API gateway&lt;/td&gt;
&lt;td&gt;One entry point for clients: auth, limits, routing&lt;/td&gt;
&lt;td&gt;Keep business logic out of it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Service discovery&lt;/td&gt;
&lt;td&gt;Finding healthy instances&lt;/td&gt;
&lt;td&gt;Needs health checks and fast failover&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Keeping workflows consistent:&lt;/strong&gt; a single database transaction cannot span services, so use a &lt;strong&gt;saga&lt;/strong&gt;: a sequence of local steps where each step has a compensating action if a later step fails. A saga can be orchestrated by one coordinator or choreographed through events.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Worked example, checkout.&lt;/strong&gt; Cart, Order, Inventory, Payment and Shipping are separate services. The order saga reserves stock, charges the card, then books shipping. If the charge fails, the compensating action releases the reserved stock and marks the order failed. Each step is idempotent so a retry does no harm.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resilience patterns:&lt;/strong&gt; timeouts on every call; retries with exponential backoff and jitter; circuit breakers that stop calling a failing service for a while; bulkheads that isolate resources per dependency. Be careful with retries: if three layers each try a call three times in total, one user action can become 27 calls to the bottom service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Delivery:&lt;/strong&gt; one repository or several, but each service has its own pipeline, containers, canary releases and rollback. Use contract tests so teams can change services without breaking each other, and pass a trace ID through every call.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-world examples&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon and Netflix:&lt;/strong&gt; both moved from large applications to many small services owned by single teams, which let them release thousands of times a day, at the cost of heavy investment in tooling and operations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Segment (2018):&lt;/strong&gt; the company published that it moved a set of tightly coupled microservices back into one service because the operational cost outweighed the benefits at its team size.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shopify:&lt;/strong&gt; it runs a very large modular monolith with enforced internal boundaries, showing that good structure matters more than the number of deployables.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Design exercise:&lt;/strong&gt; take the checkout example and write the saga as a table of steps, compensating actions and events. Then list two reasons you would keep it as a modular monolith for a team of eight.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quiz 2&lt;/strong&gt; (5 questions, pass mark 4)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When are microservices a good choice?

&lt;ul&gt;
&lt;li&gt;A) A team of three building a simple app&lt;/li&gt;
&lt;li&gt;B) You want fewer deployments&lt;/li&gt;
&lt;li&gt;C) Many teams need independent releases and parts of the system scale differently&lt;/li&gt;
&lt;li&gt;D) You want to share one database across services&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;What is a compensating action in a saga?

&lt;ul&gt;
&lt;li&gt;A) Releasing reserved stock when the payment step fails&lt;/li&gt;
&lt;li&gt;B) Adding a cache&lt;/li&gt;
&lt;li&gt;C) Rolling back one database transaction across services&lt;/li&gt;
&lt;li&gt;D) Locking all tables&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;What does a circuit breaker do?

&lt;ul&gt;
&lt;li&gt;A) Encrypts calls&lt;/li&gt;
&lt;li&gt;B) Caches responses&lt;/li&gt;
&lt;li&gt;C) Balances load&lt;/li&gt;
&lt;li&gt;D) Stops calling a failing dependency for a while so failure does not cascade&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;What do the Segment and Shopify examples show?

&lt;ul&gt;
&lt;li&gt;A) Monoliths are obsolete&lt;/li&gt;
&lt;li&gt;B) Microservices bring operational cost, and a well-structured modular monolith can be the better choice&lt;/li&gt;
&lt;li&gt;C) You should always use microservices&lt;/li&gt;
&lt;li&gt;D) You should never split a system&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Three layers each try a call three times in total. How many calls can reach the bottom service from one user action?

&lt;ul&gt;
&lt;li&gt;A) 3&lt;/li&gt;
&lt;li&gt;B) 9&lt;/li&gt;
&lt;li&gt;C) 27&lt;/li&gt;
&lt;li&gt;D) 1&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;/p&gt;
  Quiz 2 answers
  &lt;ol&gt;
&lt;li&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;D&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;B&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C&lt;/strong&gt; three layers each making three attempts give 3 times 3 times 3, which is 27 calls.&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources and further reading&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://martinfowler.com/articles/microservices.html" rel="noopener noreferrer"&gt;Microservices&lt;/a&gt; by James Lewis and Martin Fowler, the article that defined the style and its characteristics.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://microservices.io/patterns/data/saga.html" rel="noopener noreferrer"&gt;Saga pattern&lt;/a&gt; on microservices.io, for orchestration versus choreography.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter" rel="noopener noreferrer"&gt;Timeouts, retries, and backoff with jitter&lt;/a&gt; from the Amazon Builders' Library, the source for the retry pitfalls above.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.infoq.com/news/2018/07/segment-microservices" rel="noopener noreferrer"&gt;Why Segment returned to a monolith&lt;/a&gt; on InfoQ, summarizing Segment's own write-up.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://shopify.engineering/deconstructing-monolith-designing-software-maximizes-developer-productivity" rel="noopener noreferrer"&gt;Deconstructing the monolith&lt;/a&gt; from Shopify Engineering, on the modular monolith.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90" rel="noopener noreferrer"&gt;Prime Video: scaling up the monitoring service and reducing costs by 90%&lt;/a&gt;, with an &lt;a href="https://infoq.com/news/2023/05/prime-ec2-ecs-saves-costs" rel="noopener noreferrer"&gt;InfoQ summary&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Amazon and Netflix history in this module is from general knowledge and has no cited source here; add one if you want it referenced.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Part 2 of 8 in the System Design Learning Path series. Next: part 3.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>microservices</category>
      <category>architecture</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>System design fundamentals: estimate, scale and trade off</title>
      <dc:creator>mseada</dc:creator>
      <pubDate>Thu, 22 Oct 2026 05:29:19 +0000</pubDate>
      <link>https://dev.to/mseada/system-design-fundamentals-estimate-scale-and-trade-off-1ggm</link>
      <guid>https://dev.to/mseada/system-design-fundamentals-estimate-scale-and-trade-off-1ggm</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 1 of 8 · week 1 of the learning path&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every large design is the same few building blocks combined to meet numbers, so learn the blocks and learn to estimate before drawing any boxes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning objectives&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Turn a product request into functional and non-functional requirements.&lt;/li&gt;
&lt;li&gt;Do back-of-envelope estimates for traffic, storage and bandwidth.&lt;/li&gt;
&lt;li&gt;Explain what each core building block does and when to use it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Requirements first&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Functional:&lt;/strong&gt; what the system does (send a message, upload a video, charge a card).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-functional:&lt;/strong&gt; how well it does it: scale, latency, availability, durability, consistency, security and cost.&lt;/li&gt;
&lt;li&gt;Ask about scope and priorities before designing; a design for 1,000 users and one for 100 million are different systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Estimation cheat sheet&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Fact&lt;/th&gt;
&lt;th&gt;Rule of thumb&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Seconds in a day&lt;/td&gt;
&lt;td&gt;About 86,400, so requests per day divided by 86,400 gives average QPS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Peak versus average&lt;/td&gt;
&lt;td&gt;Plan for 2 to 3 times average, more for spiky products&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory read&lt;/td&gt;
&lt;td&gt;About 100 nanoseconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SSD random read&lt;/td&gt;
&lt;td&gt;About 100 microseconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Round trip inside one datacenter&lt;/td&gt;
&lt;td&gt;About 0.5 milliseconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Round trip across continents&lt;/td&gt;
&lt;td&gt;About 150 milliseconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage&lt;/td&gt;
&lt;td&gt;Records per day times record size times retention&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Worked example:&lt;/strong&gt; 10 million daily users each make 20 reads and 2 writes a day. Reads are 200 million a day, about 2,300 per second on average and about 7,000 at a 3x peak. Writes are 20 million a day, about 230 per second and about 700 at peak. At 1 KB per write, that is 20 GB a day, or about 7.3 TB a year before replication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building blocks&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Block&lt;/th&gt;
&lt;th&gt;Job&lt;/th&gt;
&lt;th&gt;Key choices&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Load balancer&lt;/td&gt;
&lt;td&gt;Spreads requests across instances&lt;/td&gt;
&lt;td&gt;Layer 4 or layer 7, health checks, algorithm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cache&lt;/td&gt;
&lt;td&gt;Serves hot data from memory&lt;/td&gt;
&lt;td&gt;Cache-aside versus write-through, eviction, expiry, stampede protection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CDN&lt;/td&gt;
&lt;td&gt;Serves static and cacheable content near users&lt;/td&gt;
&lt;td&gt;What to cache, expiry, invalidation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Relational database&lt;/td&gt;
&lt;td&gt;Structured data with transactions&lt;/td&gt;
&lt;td&gt;Indexes, replicas, sharding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NoSQL store&lt;/td&gt;
&lt;td&gt;Scale and flexible models&lt;/td&gt;
&lt;td&gt;Key-value, document, wide-column, graph&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Queue or log&lt;/td&gt;
&lt;td&gt;Decouples producers and consumers, absorbs spikes&lt;/td&gt;
&lt;td&gt;Ordering, retention, delivery guarantees&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Object storage&lt;/td&gt;
&lt;td&gt;Cheap durable storage for large files&lt;/td&gt;
&lt;td&gt;Lifecycle, access control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Search index&lt;/td&gt;
&lt;td&gt;Full text and filtered queries&lt;/td&gt;
&lt;td&gt;Refresh lag, relevance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rate limiter&lt;/td&gt;
&lt;td&gt;Protects services from abuse and overload&lt;/td&gt;
&lt;td&gt;Token bucket, per-user or per-key limits&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Scaling basics:&lt;/strong&gt; make services stateless so any instance can serve any request; scale out behind a load balancer; cache reads; replicate data for reads and safety; shard data when one node cannot hold or write it all. When the network splits, a distributed store must choose consistency or availability, so decide per feature which matters more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design exercise:&lt;/strong&gt; a URL shortener gets 100 million new links a month with ten reads per write. Estimate write and read QPS, storage over five years and cache size for the hottest 20% of links, then list the blocks you would use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quiz 1&lt;/strong&gt; (5 questions, pass mark 4)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;About what is the average QPS for 86.4 million requests a day?

&lt;ul&gt;
&lt;li&gt;A) 100&lt;/li&gt;
&lt;li&gt;B) 1,000&lt;/li&gt;
&lt;li&gt;C) 10,000&lt;/li&gt;
&lt;li&gt;D) 86,400&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Why is a stateless service easy to scale?

&lt;ul&gt;
&lt;li&gt;A) It uses sticky sessions&lt;/li&gt;
&lt;li&gt;B) It keeps sessions in local memory&lt;/li&gt;
&lt;li&gt;C) Any instance can serve any request, so you add instances behind a load balancer&lt;/li&gt;
&lt;li&gt;D) It needs a single large server&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;What is cache-aside?

&lt;ul&gt;
&lt;li&gt;A) The cache is the only store&lt;/li&gt;
&lt;li&gt;B) Reads bypass the cache&lt;/li&gt;
&lt;li&gt;C) The database pushes every write into the cache&lt;/li&gt;
&lt;li&gt;D) The app checks the cache first and, on a miss, reads the database and fills the cache&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;What does a CDN mainly do?

&lt;ul&gt;
&lt;li&gt;A) Serves static and cacheable content from locations near users, cutting latency and origin load&lt;/li&gt;
&lt;li&gt;B) Stores financial transactions&lt;/li&gt;
&lt;li&gt;C) Runs SQL queries&lt;/li&gt;
&lt;li&gt;D) Encrypts the database&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;How should you size for traffic peaks?

&lt;ul&gt;
&lt;li&gt;A) Use the average only&lt;/li&gt;
&lt;li&gt;B) Ignore peaks&lt;/li&gt;
&lt;li&gt;C) Plan for a multiple of average, commonly 2 to 3 times or more, plus headroom&lt;/li&gt;
&lt;li&gt;D) Assume every second is a peak&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;/p&gt;
  Quiz 1 answers
  &lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;B&lt;/strong&gt; 86.4 million divided by 86,400 seconds is 1,000 requests per second.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;D&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources and further reading&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dzone.com/articles/every-programmer-should-know" rel="noopener noreferrer"&gt;Latency numbers every programmer should know&lt;/a&gt;, the Jeff Dean and Peter Norvig figures behind the estimation table; the numbers are rough and dated, so use them for orders of magnitude.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/donnemartin/system-design-primer" rel="noopener noreferrer"&gt;System Design Primer&lt;/a&gt;, an open study guide covering the building blocks in this module.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dataintensive.net/" rel="noopener noreferrer"&gt;Designing Data-Intensive Applications&lt;/a&gt; by Martin Kleppmann, for caching, replication and consistency in depth.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Part 1 of 8 in the System Design Learning Path series. Next: part 2.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>architecture</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>System design learning path: from fundamentals to WhatsApp, YouTube and Stripe</title>
      <dc:creator>mseada</dc:creator>
      <pubDate>Thu, 22 Oct 2026 05:05:32 +0000</pubDate>
      <link>https://dev.to/mseada/system-design-learning-path-from-fundamentals-to-whatsapp-youtube-and-stripe-4o69</link>
      <guid>https://dev.to/mseada/system-design-learning-path-from-fundamentals-to-whatsapp-youtube-and-stripe-4o69</guid>
      <description>&lt;p&gt;An eight-week path that teaches software engineers to design large systems: core building blocks, three architecture styles, then full designs of WhatsApp, YouTube and Stripe, with a quiz after every module.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; every engineer can take a vague product idea, ask the right questions, estimate the load, sketch an architecture and defend its trade-offs, using one repeatable method.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Audience:&lt;/strong&gt; backend, full-stack and mobile engineers, tech leads and architects. Basic knowledge of web APIs and databases is assumed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Format:&lt;/strong&gt; 8 modules, about 3 hours per week. Each module has a short talk, self-study reading, one design exercise and a 5-question quiz (pass mark 4 of 5). The three case studies each include an architecture diagram and worked numbers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The design method used in every module&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clarify requirements, both functional and non-functional (scale, latency, availability, consistency).&lt;/li&gt;
&lt;li&gt;Estimate load and storage with back-of-envelope math.&lt;/li&gt;
&lt;li&gt;Define the API and the core data model.&lt;/li&gt;
&lt;li&gt;Draw the high-level architecture.&lt;/li&gt;
&lt;li&gt;Deep dive on the hardest two or three parts.&lt;/li&gt;
&lt;li&gt;Name the trade-offs, failure modes and what you would monitor.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Levels&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Requirements&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Foundation&lt;/td&gt;
&lt;td&gt;Quizzes 1 to 4 passed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Practitioner&lt;/td&gt;
&lt;td&gt;Foundation, Quizzes 5 to 7 passed, and the final assessment at 9 of 12 or more&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Architect&lt;/td&gt;
&lt;td&gt;Practitioner, final assessment at 11 of 12 or more, and the capstone at 70 points or more&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Outcomes by the end&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Size a system from users and usage, and spot the bottleneck before building.&lt;/li&gt;
&lt;li&gt;Choose between monolith, microservices and event-driven styles, and say why.&lt;/li&gt;
&lt;li&gt;Reason about replication, partitioning, transactions and consistency.&lt;/li&gt;
&lt;li&gt;Design a chat system, a video platform and a payment system, including failure handling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The series&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;Topic&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;System design fundamentals: estimate, scale and trade off&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Microservices: boundaries, sagas and failure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Event-driven architecture: events, outbox and idempotency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Designing data-intensive applications: replication, partitioning, quorums&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;System design case study: WhatsApp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;System design case study: YouTube&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;System design case study: Stripe and payment systems&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;Capstone and final assessment&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each post ends with a quiz. Answers are hidden in a collapsible block, so try the questions first.&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>architecture</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
