PageSourceSearch

https://tutorialedge.net/software-eng/message-queues-in-system-design/

html tutorialedge.net collected 2026-10-03 20:30:36 UTC 41,594 bytes, 32 lines download raw bytes

1<!doctype html><html lang=en-us><meta charset=UTF-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><link rel=preconnect href=https://cdn.jsdelivr.net><link rel=preconnect href=https://identity.netlify.com><link rel=preconnect href=https://s3.eu-west-1.amazonaws.com><link rel=dns-prefetch href=https://plausible.io><meta name=keywords content=system-design,architecture,messaging><meta name=description content="Learn how message queues decouple services and absorb load spikes, plus queues vs pub/sub, delivery guarantees, and backpressure tradeoffs."><meta name=author content="Elliot Forbes"><meta property=og:title content="Message Queues in System Design | TutorialEdge"><meta property=og:description content="Learn how message queues decouple services and absorb load spikes, plus queues vs pub/sub, delivery guarantees, and backpressure tradeoffs."><meta property=og:type content=article><meta property=og:url content=https://tutorialedge.net/software-eng/message-queues-in-system-design/ ><meta property=og:locale content=en_US><meta property=og:site_name content=TutorialEdge><meta property=og:image content=https://tutorialedge.net/og/software-eng/message-queues-in-system-design/card.png><meta property=og:image:width content=1200><meta property=og:image:height content=630><meta property=og:image:alt content="Message Queues in System Design | TutorialEdge"><meta property=article:published_time content=2026-06-20T12:00:00Z><meta property=article:modified_time content=2026-06-20T12:00:00Z><meta property=article:author content=https://tutorialedge.net><meta property=article:tag content=system-design><meta property=article:tag content=architecture><meta property=article:tag content=messaging><meta name=twitter:card content=summary_large_image><meta name=twitter:title content="Message Queues in System Design | TutorialEdge"><meta name=twitter:description content="Learn how message queues decouple services and absorb load spikes, plus queues vs pub/sub, delivery guarantees, and backpressure tradeoffs."><meta name=twitter:site content=@Elliot_f><meta name=twitter:creator content=@Elliot_f><meta name=twitter:image content=https://tutorialedge.net/og/software-eng/message-queues-in-system-design/card.png><meta name=twitter:image:alt content="Message Queues in System Design | TutorialEdge"><meta name=google-site-verification content=o0UedRQqZULbVZPe6SPx1VD1YxJd6WL-2-15-XHWS1g><meta name=msvalidate.01 content=479C48823705295AF4454A1704545592><title>Message Queues in System Design | TutorialEdge.net</title><link rel=canonical href=https://tutorialedge.net/software-eng/message-queues-in-system-design/ ><link rel=icon type=image/png href=https://s3.eu-west-1.amazonaws.com/images.tutorialedge.net/images/favicon.ico><link rel=preload href=https://tutorialedge.net/css/tailwind.min.205e3efb64af30f6834e05d8d3f718fce5a6aae8f59efa4bcdbded6c9e873ad5.css as=style><link rel=stylesheet href=https://tutorialedge.net/css/tailwind.min.205e3efb64af30f6834e05d8d3f718fce5a6aae8f59efa4bcdbded6c9e873ad5.css media=screen><link rel=preload href=https://tutorialedge.net/scss/main.min.e070997b8e147c9868cdd13782b50c3f1dced62246c327656a04982e0c0c1922.css as=style><link rel=stylesheet href=https://tutorialedge.net/scss/main.min.e070997b8e147c9868cdd13782b50c3f1dced62246c327656a04982e0c0c1922.css media=screen>
1<script defer data-domain=tutorialedge.net src=https://plausible.io/js/plausible.outbound-links.js></script>
1<script src=https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js></script>
1<script defer src=https://identity.netlify.com/v1/netlify-identity-widget.js></script>
1<script>window.plausible=window.plausible||function(){(window.plausible.q=window.plausible.q||[]).push(arguments)}</script>
1<script type=application/ld+json>{"@context":"https://schema.org","@type":"BlogPosting","headline":"Message Queues in System Design","image":"https://s3.eu-west-1.amazonaws.com/images.tutorialedge.net/cards/default-card.png","datePublished":"2026-06-20T12:00:00Z","dateModified":"2026-06-20T12:00:00Z","author":{"@type":"Person","name":"Elliot Forbes","url":"https://tutorialedge.net","sameAs":["https://twitter.com/Elliot_f","https://github.com/elliotforbes","https://elliotf.dev"],"jobTitle":"Software Engineer & Technical Writer","description":"Elliot Forbes is a software engineer and technical educator with extensive experience building production Go applications."},"mainEntityOfPage":{"@type":"WebPage","@id":"https://tutorialedge.net/software-eng/message-queues-in-system-design/"},"publisher":{"@type":"Organization","name":"TutorialEdge","logo":{"@type":"ImageObject","url":"logo.svg"},"url":"https://tutorialedge.net"},"description":"Learn how message queues decouple services and absorb load spikes, plus queues vs pub/sub, delivery guarantees, and backpressure tradeoffs.","keywords":["system-design","architecture","messaging"],"wordCount":1450,"timeRequired":"PT7M"}</script>
1<script type=application/ld+json>{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://tutorialedge.net/"},{"@type":"ListItem","position":2,"name":"Software-Engs","item":"https://tutorialedge.net/software-eng/"},{"@type":"ListItem","position":3,"name":"Message Queues in System Design","item":"https://tutorialedge.net/software-eng/message-queues-in-system-design/"}]}</script>
1<div id=dynamicApp><navbar></navbar><div class=w-full style="background:#0d1117;border-bottom:1px solid #1f2937"><div class="max-w-screen-xl mx-auto px-6 py-2.5 flex items-center justify-center gap-4"><span class="inline-flex items-center gap-1.5 text-xs font-bold uppercase tracking-widest px-2.5 py-1 rounded" style="background:rgba(6,182,212,.12);border:1px solid rgba(6,182,212,.25);color:#67e8f9">25% off</span><p class="text-sm text-gray-400">Use code <span class="font-mono font-semibold text-white px-1.5 py-0.5 rounded" style="background:#161b22;border:1px solid #21262d">FUNCMAIN</span> at checkout for 25% off all premium courses.</p><a href=../../pricing/ class="flex-shrink-0 text-xs font-semibold text-white px-3 py-1.5 rounded transition-colors duration-150" style=background:#1d4ed8>Get started →</a></div></div><div class="grow bg-gray-900 bg-[#090E19] text-white"><div class="max-w-6xl mx-auto px-4 sm:px-6"><div class="md:flex md:justify-between"><article class="post-content max-w-4xl p-4 mx-auto pt-16 overflow-x-hidden"><div class="mx-auto md:max-w-4xl"><nav aria-label=Breadcrumb class="flex items-center gap-2 text-xs text-gray-500 mb-8 px-0 py-3 border-b border-gray-800"><a href=../../ class="hover:text-gray-300 transition-colors">Home</a>
2<span aria-hidden=true class=text-gray-700>/</span>
3<a href=https://tutorialedge.net/software-eng/ class="hover:text-gray-300 transition-colors capitalize">Software-Engs</a>
4<span aria-hidden=true class=text-gray-700>/</span>
5<span class="text-gray-400 truncate">Message Queues in System Design</span></nav><h1 class="post-title font-extrabold text-5xl mb-6 md:leading-tight"><span class=post-title-hash>#</span>Message Queues in System Design</h1><div class=mb-8><div class="mr-2 text-xs inline-flex items-center font-bold leading-sm uppercase px-4 py-2 bg-blue-800 rounded"><a href=../../tags/system-design>#system-design</a></div><div class="mr-2 text-xs inline-flex items-center font-bold leading-sm uppercase px-4 py-2 bg-blue-800 rounded"><a href=../../tags/architecture>#architecture</a></div><div class="mr-2 text-xs inline-flex items-center font-bold leading-sm uppercase px-4 py-2 bg-blue-800 rounded"><a href=../../tags/messaging>#messaging</a></div></div><div class="flex flex-wrap items-center gap-x-3 gap-y-2 text-sm text-gray-400 mb-8 pb-6 border-b border-gray-700"><img class="w-6 h-6 rounded-full flex-shrink-0 p-0 m-0" src=https://s3.eu-west-1.amazonaws.com/images.tutorialedge.net/authors/profile.jpeg alt="Elliot Forbes" loading=lazy>
6<a href=https://twitter.com/elliot_f class="text-white font-medium hover:text-blue-300 transition-colors duration-150">Elliot Forbes</a>
7<span class="text-gray-600 select-none">·</span>
8<span>Jun 20, 2026</span>
9<span class="text-gray-600 select-none">·</span>
10<span>7 min read</span></div><div class="prose prose-xl md:max-w-6xl mx-auto text-white"><nav id=TableOfContents><ul><li><a href=#the-core-concept>The Core Concept</a><li><a href=#queues-vs-pubsub>Queues vs Pub/Sub</a><li><a href=#delivery-guarantees>Delivery Guarantees</a><li><a href=#tradeoffs>Tradeoffs</a><li><a href=#how-it-comes-up-in-interviews>How It Comes Up in Interviews</a><li><a href=#whats-next>What&rsquo;s Next</a><li><a href=#frequently-asked-questions>Frequently Asked Questions</a><ul><li><a href=#what-is-a-message-queue>What is a message queue?</a><li><a href=#what-is-the-difference-between-a-message-queue-and-pubsub>What is the difference between a message queue and pub/sub?</a><li><a href=#what-does-at-least-once-delivery-mean>What does at-least-once delivery mean?</a><li><a href=#what-is-a-dead-letter-queue>What is a dead-letter queue?</a></ul></ul></nav><p>When services call each other synchronously, they are tightly coupled. If the downstream service is slow, the caller blocks. If it is down, the caller fails.<p>A message queue breaks that coupling by placing an asynchronous buffer between the two. The producer writes a message and moves on immediately. The consumer reads it whenever it is ready.<p>This decoupling is what makes queues one of the most common components in large-scale system design.<h2 id=the-core-concept><a href=#the-core-concept class=heading-anchor aria-hidden=true>##</a>The Core Concept</h2><p>A producer sends messages to a queue. The queue stores them durably - on disk in most production systems - until a consumer reads and acknowledges them.<p>The consumer processes messages at its own pace. If it falls behind, messages accumulate in the queue rather than causing the producer to fail or slow down.<p><img src=https://s3.eu-west-1.amazonaws.com/images.tutorialedge.net/images/system-design/message-queues-in-system-design/producer-queue-consumer.svg alt="A producer enqueues messages onto a queue that a consumer processes asynchronously"><p>Once a consumer successfully processes a message and sends an acknowledgement (ack), the queue removes it. If the consumer crashes before acking, the queue redelivers the message to another consumer.<h2 id=queues-vs-pubsub><a href=#queues-vs-pubsub class=heading-anchor aria-hidden=true>##</a>Queues vs Pub/Sub</h2><p>These two patterns are often conflated. They solve different problems.<p><strong>Point-to-point queues</strong> deliver each message to exactly one consumer within a consumer group. Multiple consumers can compete for messages to distribute work, but each message is processed once.<p>RabbitMQ and AWS SQS work this way by default.<p>A concrete example: an order service publishes a &ldquo;new order&rdquo; message. A fulfilment worker picks it up and processes the shipment. Only one worker handles each order, even if ten workers are listening.<p><strong>
10Publish/subscribe (pub/sub)</strong> fans a message out so that every subscriber receives its own copy. Each subscriber processes the message independently. Redis Pub/Sub is a pure fan-out model.<p>A concrete example: a payment service publishes a &ldquo;payment completed&rdquo; event. A notification service sends a receipt email, a reporting service updates revenue totals, and an analytics service records the event - all from the same message.<p><strong>Kafka</strong> sits in a category of its own. It is a distributed log, not a traditional queue. Consumers read from an offset in a log partition.<p>You get fan-out (multiple consumer groups each read the full log) or work distribution (a single consumer group splits partitions among its members).<p>Kafka retains messages after consumption, which is useful for event replay and audit logs.<h2 id=delivery-guarantees><a href=#delivery-guarantees class=heading-anchor aria-hidden=true>##</a>Delivery Guarantees</h2><p>Every queue implementation makes a promise about how many times it will deliver a message. The options are not all equally practical.<p><strong>At-most-once</strong>: the queue delivers the message once and never retries, even if the consumer crashes before processing it. No duplicates, but messages can be lost. Useful only when loss is acceptable - metrics aggregation, for example.<p><strong>At-least-once</strong>: the queue retries until it receives an ack. The consumer will process the message at least once, but potentially more times if the ack is lost in transit.<p>This is the default for most production systems including SQS and RabbitMQ.<p><strong>Exactly-once</strong>: the queue guarantees each message is processed exactly once. In practice, exactly-once across a network is extremely hard to achieve without distributed transactions.<p>Many systems that claim exactly-once delivery really mean at-least-once delivery plus idempotent consumer logic.<p>The practical answer is to design consumers to be idempotent - processing the same message twice produces the same result as processing it once.<p>An order fulfilment service can check whether an order is already in &ldquo;fulfilled&rdquo; state before processing. Idempotency makes at-least-once delivery safe.<p>Ordering is only guaranteed within a single FIFO queue or Kafka partition. Standard queues like SQS Standard make no ordering promise at all, and global ordering across partitions is never guaranteed by default.<h2 id=tradeoffs><a href=#tradeoffs class=heading-anchor aria-hidden=true>##</a>Tradeoffs</h2><p>Message queues provide genuine benefits, but they also introduce costs that interviewers expect you to discuss.<p><strong>Decoupling and load smoothing</strong> are the primary wins. A queue absorbs traffic spikes - the producer can publish at burst rate while the consumer processes at a steady pace.<p><strong>Operational complexity</strong> is the cost. You now have a distributed component that must be deployed, monitored, scaled, and kept highly available. You must reason about message ordering, consumer lag, and partition assignment.<p><strong>End-to-end latency</strong> increases. A synchronous HTTP call completes in milliseconds. A queued workflow has a minimum latency equal to the consumer&rsquo;s polling interval plus processing time.<p><strong>Eventual consistency</strong> is the result. The downstream system processes updates asynchronously, so there is a window where the two systems hold different views of the world.<p>This is the same tension described by <a href=../../software-eng/consistency-and-the-cap-theorem/ title="the CAP theorem">the CAP theorem</a> - if you need the consumer&rsquo;s state immediately, a queue may not be the right tool.<p><strong>Backpressure</strong> occurs when the consumer falls behind the producer and the queue grows without bound. Unbounded queue growth eventually exhausts disk or memory.<p>Mitigations include scaling consumers, setting queue depth limits that slow producers down, or shedding load intentionally.<p><strong>Dead-letter queues (DLQs)</strong> are where messages go after repeated failed processing attempts. Without a DLQ, a poison message - one that always causes the consumer to crash - will loop forever and block the queue.<p>A DLQ parks the message so it can be inspected and replayed manually once the bug is fixed.<p>Queues also pair naturally with <a href=../../software-eng/caching-in-system-design/ title=caching>caching</a> architectures. Write-back caches flush entries to the database via a queue, and cache invalidation events fan out to services through a pub/sub topic.<h2 id=how-it-comes-up-in-interviews><a href=#how-it-comes-up-in-interviews class=heading-anchor aria-hidden=true>##</a>How It Comes Up in Interviews</h2><p>Interviewers introduce queues indirectly. They present a design with a slow downstream dependency or a spike in write volume, then watch to see whether you identify that a queue removes the coupling.<blockquote><p>Why would you introduce a message queue into this design?</blockquote><p>When a downstream service is slow, unreliable, or cannot keep up with the write rate, a queue decouples the two. The producer is not blocked by the consumer&rsquo;s availability or speed.<p>The queue also smooths traffic spikes so a brief burst does not overwhelm the consumer.<blockquote><p>What is the difference between at-least-once and exactly-once delivery?</blockquote><p>At-least-once means the queue retries until it receives an ack, so the consumer may receive duplicates. Exactly-once is a stronger guarantee that requires distributed coordination and is rarely provided without caveats.<p>The practical path is at-least-once delivery with an idempotent consumer that handles duplicates safely.<blockquote><p>How do you handle a consumer that keeps failing to process a message?</blockquote><p>Set a maximum retry count on the queue. After that many retries, move the message to a dead-letter queue. The DLQ holds poison messages for inspection without blocking the main queue.<p>Fix the bug, then replay the DLQ messages once the consumer is healthy.<blockquote><p>Would you use a point-to-point queue or pub/sub here?</blockquote><p>It depends on whether the message should trigger one action or many. Use a point-to-point queue for work distribution where exactly one consumer should process each message.<p>Use pub/sub when multiple independent services each need to react to the same event. Kafka supports both patterns through consumer groups and is a good choice when you also need message replay or strict ordering within a partition.<h2 id=whats-next><a href=#whats-next class=heading-anchor aria-hidden=true>##</a>What&rsquo;s Next</h2><ul><li><a href=../../software-eng/caching-in-system-design/ title="Caching in System Design">Caching in System Design</a> - how write-back caches and cache invalidation events interact with async queue patterns.<li><a href=../../software-eng/consistency-and-the-cap-theorem/ title="Consistency and the CAP Theorem">Consistency and the CAP Theorem</a> - the consistency-availability tradeoff that queues shift you toward the availability side of.<li><a href=../../software-eng/designing-a-rest-api/ title="Designing a REST API">Designing a REST API</a> - how synchronous API design compares to async event-driven approaches.</ul><h2 id=frequently-asked-questions><a href=#frequently-asked-questions class=heading-anchor aria-hidden=true>##</a>Frequently Asked Questions</h2><h3 id=what-is-a-message-queue><a href=#what-is-a-message-queue class=heading-anchor aria-hidden=true>###</a>What is a message queue?</h3><p>A message queue is a component that stores messages sent by a producer and delivers them to a consumer asynchronously. The producer and consumer do not need to be available at the same time.<p>The queue buffers messages durably - typically on disk - so that a slow or temporarily unavailable consumer does not cause the producer to fail.<h3 id=what-is-the-difference-between-a-message-queue-and-pubsub><a href=#what-is-the-difference-between-a-message-queue-and-pubsub class=heading-anchor aria-hidden=true>###</a>What is the difference between a message queue and pub/sub?</h3><p>A point-to-point message queue delivers each message to exactly one consumer. It is used to distribute work across a pool of workers.<p>Pub/sub delivers a copy of each message to every subscriber. It is used when multiple independent services all need to react to the same event.<h3 id=what-does-at-least-once-delivery-mean><a href=#what-does-at-least-once-delivery-mean class=heading-anchor aria-hidden=true>###</a>What does at-least-once delivery mean?</h3><p>At-least-once delivery means the queue will keep retrying until it receives an acknowledgement from the consumer. The consumer is guaranteed to receive the message, but it may receive it more than once if the acknowledgement is lost.<p>This makes idempotent consumer design essential: processing the same message twice must produce the same result as processing it once.<h3 id=what-is-a-dead-letter-queue><a href=#what-is-a-dead-letter-queue class=heading-anchor aria-hidden=true>###</a>What is a dead-letter queue?</h3><p>A dead-letter queue (DLQ) is a separate queue where messages are moved after they have failed processing a set number of times.<p>This prevents a single bad message - one that always causes the consumer to crash or error - from blocking the entire queue indefinitely.<p>Messages in the DLQ can be inspected to diagnose the root cause, then replayed once the bug is fixed.<div class="mt-12 pt-8 border-t border-gray-800"><p class="text-sm font-semibold uppercase tracking-wide text-gray-400 mb-4">Share this article<div class="flex flex-wrap items-center gap-3"><a href="https://twitter.com/intent/tweet?text=Message+Queues+in+System+Design&url=https%3A%2F%2Ftutorialedge.net%2Fsoftware-eng%2Fmessage-queues-in-system-design%2F&via=Elliot_F" target=_blank rel="noopener noreferrer" aria-label="Share on X" class="inline-flex items-center gap-2 text-sm font-semibold bg-gray-800 border border-gray-700 text-gray-300 py-2 px-4 roun
10ded-lg transition-colors duration-150 hover:text-white hover:border-white/60"><svg class="w-4 h-4 flex-shrink-0" viewBox="0 0 24 24" fill=currentColor aria-hidden=true><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
11X
12</a><a href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Ftutorialedge.net%2Fsoftware-eng%2Fmessage-queues-in-system-design%2F" target=_blank rel="noopener noreferrer" aria-label="Share on LinkedIn" class="inline-flex items-center gap-2 text-sm font-semibold bg-gray-800 border border-gray-700 text-gray-300 py-2 px-4 rounded-lg transition-colors duration-150 hover:text-[#0a66c2] hover:border-[#0a66c2]/60"><svg class="w-4 h-4 flex-shrink-0" viewBox="0 0 24 24" fill=currentColor aria-hidden=true><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853.0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601.0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433A2.062 2.062.0 013.274 5.368a2.064 2.064.0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225.0H1.771C.792.0.0.774.0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2.0 22.225.0z"/></svg>
13LinkedIn
14</a><a href="https://www.reddit.com/submit?url=https%3A%2F%2Ftutorialedge.net%2Fsoftware-eng%2Fmessage-queues-in-system-design%2F&title=Message+Queues+in+System+Design" target=_blank rel="noopener noreferrer" aria-label="Share on Reddit" class="inline-flex items-center gap-2 text-sm font-semibold bg-gray-800 border border-gray-700 text-gray-300 py-2 px-4 rounded-lg transition-colors duration-150 hover:text-[#ff4500] hover:border-[#ff4500]/60"><svg class="w-4 h-4 flex-shrink-0" viewBox="0 0 24 24" fill=currentColor aria-hidden=true><path d="M12 0A12 12 0 000 12a12 12 0 0012 12 12 12 0 0012-12A12 12 0 0012 0zm5.01 4.744c.688.0 1.25.561 1.25 1.249a1.25 1.25.0 01-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968.0 1.754.786 1.754 1.754.0.716-.435 1.333-1.01 1.614a3.111 3.111.0 01.042.52c0 2.694-3.13 4.87-7.004 4.87s-7.004-2.176-7.004-4.87c0-.183.015-.366.043-.534A1.748 1.748.0 014.028 12c0-.968.786-1.754 1.754-1.754.463.0.898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342.0 01.14-.197.35.35.0 01.238-.042l2.906.617a1.214 1.214.0 011.108-.701zM9.25 12C8.562 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687.0 1.248-.561 1.248-1.249S9.937 12 9.249 12zm5.5.0c-.687.0-1.248.561-1.248 1.25.0.687.561 1.248 1.249 1.248S16 13.937 16 13.249c0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327.0 00-.232.095.33.33.0 000 .463c.842.842 2.484.913 2.961.913s2.105-.07 2.961-.913a.361.361.0 00.029-.463.33.33.0 00-.464.0c-.547.533-1.684.73-2.512.73-.828.0-1.979-.196-2.512-.73a.326.326.0 00-.232-.095z"/></svg>
15Reddit
16</a><a href="https://news.ycombinator.com/submitlink?u=https%3A%2F%2Ftutorialedge.net%2Fsoftware-eng%2Fmessage-queues-in-system-design%2F&t=Message+Queues+in+System+Design" target=_blank rel="noopener noreferrer" aria-label="Submit to Hacker News" class="inline-flex items-center gap-2 text-sm font-semibold bg-gray-800 border border-gray-700 text-gray-300 py-2 px-4 rounded-lg transition-colors duration-150 hover:text-[#ff6600] hover:border-[#ff6600]/60"><svg class="w-4 h-4 flex-shrink-0" viewBox="0 0 24 24" fill=currentColor aria-hidden=true><path d="M0 0v24h24V0H0zm12.6 13.2v4.2h-1.2v-4.2L7.8 6.6h1.4L12 11.4l2.8-4.8h1.4l-3.6 6.6z"/></svg>
17Hacker News
18</a><button type=button data-share-copy aria-label="Copy link" class="inline-flex items-center gap-2 text-sm font-semibold bg-gray-800 border border-gray-700 text-gray-300 py-2 px-4 rounded-lg transition-colors duration-150 hover:text-cyan-300 hover:border-cyan-500/60 focus:outline-none">
19<svg class="w-4 h-4 flex-shrink-0" viewBox="0 0 24 24" fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="M13.828 10.172a4 4 0 010 5.656l-3 3a4 4 0 01-5.656-5.656l1.5-1.5m3.5 2.156a4 4 0 010-5.656l3-3a4 4 0 015.656 5.656l-1.5 1.5"/></svg>
20<span data-share-copy-label>Copy link</span></button></div></div>
20<script>(()=>{var n=document.querySelector("[data-share-copy]");n&&navigator.clipboard&&n.addEventListener("click",function(){navigator.clipboard.writeText(window.location.href).then(function(){var t,e=n.querySelector("[data-share-copy-label]");e&&(t=e.textContent,e.textContent="Copied!",setTimeout(function(){e.textContent=t},2e3))})})})()</script>
20<course-single-pricing></course-single-pricing><div class="mt-16 mb-8 border-t border-gray-700 pt-10"><div class="flex items-center gap-3 mb-8"><div class="h-px flex-1 bg-gray-700"></div><h2 class="text-sm font-semibold uppercase tracking-widest text-gray-400">Continue Learning</h2><div class="h-px flex-1 bg-gray-700"></div></div><div class="grid sm:grid-cols-2 gap-4"><a href=https://tutorialedge.net/software-eng/caching-in-system-design/ class="group flex flex-col bg-gray-800 hover:bg-gray-750 border border-gray-700 hover:border-gray-500 rounded-xl p-5 transition-all duration-200 p-6"><span class="inline-block text-xs font-semibold uppercase tracking-wide text-blue-400">software-engineer</span><h3 class="font-semibold text-base text-white group-hover:text-blue-300 transition-colors mt-0 pt-0 duration-200 leading-snug mb-2">Caching in System Design</h3><p class="text-sm text-gray-400 line-clamp-2 flex-1">An interview-focused guide to caching: cache-aside, write-through, write-back, eviction, TTLs, and cache invalidation tradeoffs.<div class="flex items-center justify-between mt-4 text-xs text-gray-500"><span>Jun 2026</span>
21<span class="flex items-center gap-3">7 min read
22<svg class="w-3.5 h-3.5 ml-1 group-hover:translate-x-0.5 transition-transform duration-150" fill=none stroke=currentColor viewBox="0 0 24 24"><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7"/></svg></span></div></a><a href=https://tutorialedge.net/software-eng/consistency-and-the-cap-theorem/ class="group flex flex-col bg-gray-800 hover:bg-gray-750 border border-gray-700 hover:border-gray-500 rounded-xl p-5 transition-all duration-200 p-6"><span class="inline-block text-xs font-semibold uppercase tracking-wide text-blue-400">software-engineer</span><h3 class="font-semibold text-base text-white group-hover:text-blue-300 transition-colors mt-0 pt-0 duration-200 leading-snug mb-2">Consistency and the CAP Theorem: A System Design Guide</h3><p class="text-sm text-gray-400 line-clamp-2 flex-1">A clear, interview-focused guide to the CAP theorem and consistency models - what it means, the tradeoffs, and how it comes up in system design interviews.<div class="flex items-center justify-between mt-4 text-xs text-gray-500"><span>Jun 2026</span>
23<span class="flex items-center gap-3">5 min read
24<svg class="w-3.5 h-3.5 ml-1 group-hover:translate-x-0.5 transition-transform duration-150" fill=none stroke=currentColor viewBox="0 0 24 24"><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7"/></svg></span></div></a><a href=https://tutorialedge.net/software-eng/database-replication-explained/ class="group flex flex-col bg-gray-800 hover:bg-gray-750 border border-gray-700 hover:border-gray-500 rounded-xl p-5 transition-all duration-200 p-6"><span class="inline-block text-xs font-semibold uppercase tracking-wide text-blue-400">software-engineer</span><h3 class="font-semibold text-base text-white group-hover:text-blue-300 transition-colors mt-0 pt-0 duration-200 leading-snug mb-2">Database Replication Explained</h3><p class="text-sm text-gray-400 line-clamp-2 flex-1">An interview-focused guide to database replication - leader-follower setups, sync vs async replication, failover, and the tradeoffs you should know.<div class="flex items-center justify-between mt-4 text-xs text-gray-500"><span>Jun 2026</span>
25<span class="flex items-center gap-3">6 min read
26<svg class="w-3.5 h-3.5 ml-1 group-hover:translate-x-0.5 transition-transform duration-150" fill=none stroke=currentColor viewBox="0 0 24 24"><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7"/></svg></span></div></a><a href=https://tutorialedge.net/software-eng/database-sharding-and-partitioning/ class="group flex flex-col bg-gray-800 hover:bg-gray-750 border border-gray-700 hover:border-gray-500 rounded-xl p-5 transition-all duration-200 p-6"><span class="inline-block text-xs font-semibold uppercase tracking-wide text-blue-400">software-engineer</span><h3 class="font-semibold text-base text-white group-hover:text-blue-300 transition-colors mt-0 pt-0 duration-200 leading-snug mb-2">Database Sharding and Partitioning</h3><p class="text-sm text-gray-400 line-clamp-2 flex-1">How database sharding and partitioning scale your data layer - shard keys, hotspots, rebalancing, and the tradeoffs to discu
26ss in a system design interview.<div class="flex items-center justify-between mt-4 text-xs text-gray-500"><span>Jun 2026</span>
27<span class="flex items-center gap-3">6 min read
28<svg class="w-3.5 h-3.5 ml-1 group-hover:translate-x-0.5 transition-transform duration-150" fill=none stroke=currentColor viewBox="0 0 24 24"><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7"/></svg></span></div></a></div></div></div></div><div class=comments><comments></comments></div></article></div></div></div><footer-environment></footer-environment><footer class="w-full bg-gray-900 text-gray-400" style="border-top:1px solid #1f2937"><div style="height:2px;background:linear-gradient(90deg,#06b6d4 0,#3b82f6 50%,#06b6d4 100%);opacity:.7"></div><div class="container mx-auto px-6 pt-14 pb-10"><div class="grid grid-cols-1 gap-10 md:grid-cols-4"><div class=md:col-span-1><a href=../../ class="inline-flex items-center gap-2.5 mb-3 group"><img src=https://s3.eu-west-1.amazonaws.com/images.tutorialedge.net/images/logo.svg alt=TutorialEdge class="w-8 h-8 flex-shrink-0">
29<span class="text-white font-bold text-lg tracking-tight group-hover:text-blue-300 transition-colors">TutorialEdge</span></a><p class="text-sm leading-relaxed text-gray-400 mb-3">High quality, in-depth Go courses — with new videos added every week.<p class="text-sm leading-relaxed text-gray-500">Roughly 10% of revenue goes towards tree planting and carbon capture initiatives.</p><a href=https://ecologi.com/tutorialedge class="inline-flex items-center gap-1.5 mt-4 text-xs font-medium text-emerald-400 hover:text-emerald-300 transition-colors" style=letter-spacing:.04em><span>🌲</span> Carbon Negative</a><div class="flex items-center gap-4 mt-5"><a href=https://twitter.com/TutorialEdge target=_blank rel=noopener class="text-gray-500 hover:text-white transition-colors" aria-label=Twitter><svg width=16 height=16 viewBox="0 0 24 24" fill=currentColor><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.744l7.737-8.835L1.254 2.25H8.08l4.253 5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
30</a><a href=https://github.com/TutorialEdge target=_blank rel=noopener class="text-gray-500 hover:text-white transition-colors" aria-label=GitHub><svg width=16 height=16 viewBox="0 0 24 24" fill=currentColor><path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483.0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951.0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65.0.0.84-.27 2.75 1.026A9.564 9.564.0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688.0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855.0 1.338-.012 2.419-.012 2.747.0.268.18.58.688.482A10.019 10.019.0 0022 12.017C22 6.484 17.522 2 12 2z"/></svg>
31</a><a href=mailto:[email protected] class="text-gray-500 hover:text-white transition-colors" aria-label="Email support"><svg width=16 height=16 viewBox="0 0 24 24" fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><rect width=20 height=16 x=2 y=4 rx=2 /><path d="m22 7-8.97 5.7a1.94 1.94.0 01-2.06.0L2 7"/></svg></a></div></div><div><h3 class="text-xs font-semibold uppercase tracking-widest text-gray-500 mb-5">About</h3><ul class=space-y-3><li><a href=../../blog/ class="text-sm text-gray-400 hover:text-white transition-colors">Blog</a><li><a href=../../pricing/ class="text-sm text-gray-400 hover:text-white transition-colors">Pricing</a><li><a href=../../privacy/ class="text-sm text-gray-400 hover:text-white transition-colors">Privacy Policy</a><li><a href=../../support/ class="text-sm text-gray-400 hover:text-white transition-colors">Support Policy</a><li><a href=../../code/ class="text-sm text-gray-400 hover:text-white transition-colors">Code of Conduct</a><li><a href=../../sitemap.xml class="text-sm text-gray-400 hover:text-white transition-colors">Sitemap</a><li><a href=../../index.xml class="text-sm text-gray-400 hover:text-white transition-colors">RSS Feed</a></ul></div><div><h3 class="text-xs font-semibold uppercase tracking-widest text-gray-500 mb-5">
31Top Courses</h3><ul class=space-y-3><li><a href=../../courses/go-rest-api-course-v2/ class="text-sm text-gray-400 hover:text-white transition-colors leading-snug block">Building a Production-Ready REST API in Go</a><li><a href=../../courses/go-rabbitmq-crash-course/ class="text-sm text-gray-400 hover:text-white transition-colors leading-snug block">RabbitMQ Crash Course for Go</a><li><a href=../../courses/go-testing-bible/ class="text-sm text-gray-400 hover:text-white transition-colors leading-snug block">The Go Testing Bible</a></ul></div><div><h3 class="text-xs font-semibold uppercase tracking-widest text-gray-500 mb-5">Account</h3><footer-profile-widget></footer-profile-widget></div></div><div class="mt-12 pt-6 flex flex-col md:flex-row md:items-center md:justify-between gap-3" style="border-top:1px solid #1f2937"><p class="text-xs text-gray-600">&copy; 2026 TutorialEdge. All rights reserved.<div class="flex flex-col md:flex-row md:items-center gap-3 md:gap-6"><a href=mailto:[email protected] class="text-xs text-gray-600 hover:text-gray-400 transition-colors">[email protected]
32</a><a href=https://elliotf.dev class="text-xs text-gray-600 hover:text-gray-400 transition-colors">My Scottish Adventure Photography Blog</a></div></div></div></footer>
vendor: 5,529 bytes, line 32
32<script>((A,e)=>{"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)})(globalThis,function(){return function(A){function u(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function d(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],u(this.options),this.add=function(A){var e,t,o,i,n,s,a,r,l,c,h,p=[];if(u(this.options),0!==(o=d(A=A||"h2, h3, h4, h5, h6")).length){for(null===document.head.querySelector("style.anchorjs")&&((A=document.createElement("style")).className="anchorjs",A.appendChild(document.createTextNode("")),0[0]===(r=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(A):document.head.insertBefore(A,r),A.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",A.sheet.cssRules.length),A.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",A.sheet.cssRules.length),A.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",A.sheet.cssRules.length),A.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',A.sheet.cssRules.length)),r=document.querySelectorAll("[id]"),l=[].map.call(r,function(A){return A.id}),e=0;e<o.length;e++)if(this.hasAnchorJSLink(o[e]))p.push(e);else{if(o[e].hasAttribute("id"))n=o[e].getAttribute("id");else if(o[e].hasAttribute("data-anchor-id"))n=o[e].getAttribute("data-anchor-id");else{for(i=h=this.urlify(o[e].textContent),c=0;s=l.indexOf(i=0[0]!==s?h+"-"+c:i),c+=1,-1!==s;);s=0[0],l.push(i),o[e].setAttribute("id",i),n=i}(t=document.createElement("a")).className="anchorjs-link "+this.options.class,t.setAttribute("aria-label",this.options.ariaLabel),t.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(t.title=this.options.titleText),a=document.querySelector("base")?window.location.pathname+window.location.search:"",a=this.options.base||a,t.href=a+"#"+n,"always"===this.options.visible&&(t.style.opacity="1"),""===this.options.icon&&(t.style.font="1em/1 anchorjs-icons","left"===this.options.placement)&&(t.style.lineHeight="inherit"),"left"===this.options.placement?(t.style.position="absolute",t.style.marginLeft="-1.25em",t.style.paddingRight=".25em",t.style.paddingLeft=".25em",o[e].insertBefore(t,o[e].firstChild)):(t.style.marginLeft=".1875em",t.style.paddingRight=".1875em",t.style.paddingLeft=".1875em",o[e].appendChild(t))}for(e=0;e<p.length;e++)o.splice(p[e]-e,1);this.elements=this.elements.concat(o)}return this},this.remove=function(A){for(var e,t,o=d(A),i=0;i<o.length;i++)(t=o[i].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(o[i]))&&this.elements.splice(e,1),o[i].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){var e=document.createElement("textarea");return e.innerHTML=A,A=e.value,this.options.truncate||u(this.options),A.trim().replace(/'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A}}})</script>
32<script defer src=../../app/main-app.bundle.fbadb5695752af8cacd36d69901e2aa98369758334675d3e75ad7e2643ff2b72.js integrity="sha256-+621aVdSr4ys021pkB4qqYNpdYM0Z10+da1+JkP/K3I="></script>
32</div>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.