[{"data":1,"prerenderedAt":842},["ShallowReactive",2],{"navigation_docs":3,"-advanced-go-distributed-reliability":377,"-advanced-go-distributed-reliability-surround":837},[4,39,114,144,184,244,293,362],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25,30,35],{"title":11,"path":12,"stem":13,"icon":14},"Learning Path","\u002Fgetting-started\u002Flearning-path","1.getting-started\u002F1.learning-path","i-lucide-map",{"title":16,"path":17,"stem":18,"icon":19},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F2.introduction","i-lucide-house",{"title":21,"path":22,"stem":23,"icon":24},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F3.installation","i-lucide-download",{"title":26,"path":27,"stem":28,"icon":29},"Your First Program","\u002Fgetting-started\u002Ffirst-program","1.getting-started\u002F4.first-program","i-lucide-play",{"title":31,"path":32,"stem":33,"icon":34},"Modules and Dependencies","\u002Fgetting-started\u002Fmodules-and-dependencies","1.getting-started\u002F5.modules-and-dependencies","i-lucide-package-open",{"title":36,"path":37,"stem":38,"icon":34},"Advanced Modules","\u002Fgetting-started\u002Fadvanced-modules","1.getting-started\u002F6.advanced-modules",{"title":40,"path":41,"stem":42,"children":43,"page":6},"Fundamentals","\u002Ffundamentals","2.fundamentals",[44,49,54,59,64,69,74,79,84,89,94,99,104,109],{"title":45,"path":46,"stem":47,"icon":48},"Program Structure","\u002Ffundamentals\u002Fprogram-structure","2.fundamentals\u002F1.program-structure","i-lucide-workflow",{"title":50,"path":51,"stem":52,"icon":53},"Structs and Methods","\u002Ffundamentals\u002Fstructs-and-methods","2.fundamentals\u002F10.structs-and-methods","i-lucide-box",{"title":55,"path":56,"stem":57,"icon":58},"Interfaces","\u002Ffundamentals\u002Finterfaces","2.fundamentals\u002F11.interfaces","i-lucide-plug",{"title":60,"path":61,"stem":62,"icon":63},"Error Handling","\u002Ffundamentals\u002Ferrors","2.fundamentals\u002F12.errors","i-lucide-triangle-alert",{"title":65,"path":66,"stem":67,"icon":68},"Defined Types and Type Aliases","\u002Ffundamentals\u002Fdefined-types","2.fundamentals\u002F13.defined-types","i-lucide-tags",{"title":70,"path":71,"stem":72,"icon":73},"Generics","\u002Ffundamentals\u002Fgenerics","2.fundamentals\u002F14.generics","i-lucide-blocks",{"title":75,"path":76,"stem":77,"icon":78},"Project Structure","\u002Ffundamentals\u002Fproject-structure","2.fundamentals\u002F2.project-structure","i-lucide-folder-tree",{"title":80,"path":81,"stem":82,"icon":83},"Project Layout","\u002Ffundamentals\u002Fproject-layout","2.fundamentals\u002F3.project-layout","i-lucide-layout",{"title":85,"path":86,"stem":87,"icon":88},"Variables and Data Types","\u002Ffundamentals\u002Fvariables-and-types","2.fundamentals\u002F4.variables-and-types","i-lucide-variable",{"title":90,"path":91,"stem":92,"icon":93},"Functions","\u002Ffundamentals\u002Ffunctions","2.fundamentals\u002F5.functions","i-lucide-braces",{"title":95,"path":96,"stem":97,"icon":98},"Control Statements","\u002Ffundamentals\u002Fcontrol-statements","2.fundamentals\u002F6.control-statements","i-lucide-git-branch",{"title":100,"path":101,"stem":102,"icon":103},"Pointers","\u002Ffundamentals\u002Fpointers","2.fundamentals\u002F7.pointers","i-lucide-mouse-pointer-2",{"title":105,"path":106,"stem":107,"icon":108},"Arrays and Slices","\u002Ffundamentals\u002Farrays-and-slices","2.fundamentals\u002F8.arrays-and-slices","i-lucide-list",{"title":110,"path":111,"stem":112,"icon":113},"Maps","\u002Ffundamentals\u002Fmaps","2.fundamentals\u002F9.maps","i-lucide-table-properties",{"title":115,"path":116,"stem":117,"children":118,"page":6},"Concurrency","\u002Fconcurrency","3.concurrency",[119,124,129,134,139],{"title":120,"path":121,"stem":122,"icon":123},"Concurrency Model","\u002Fconcurrency\u002Fconcurrency-model","3.concurrency\u002F1.concurrency-model","i-lucide-network",{"title":125,"path":126,"stem":127,"icon":128},"Goroutines","\u002Fconcurrency\u002Fgoroutines","3.concurrency\u002F2.goroutines","i-lucide-git-fork",{"title":130,"path":131,"stem":132,"icon":133},"Channels","\u002Fconcurrency\u002Fchannels","3.concurrency\u002F3.channels","i-lucide-arrow-left-right",{"title":135,"path":136,"stem":137,"icon":138},"Select and Cancellation","\u002Fconcurrency\u002Fselect-and-cancellation","3.concurrency\u002F4.select-and-cancellation","i-lucide-circle-stop",{"title":140,"path":141,"stem":142,"icon":143},"Synchronization","\u002Fconcurrency\u002Fsynchronization","3.concurrency\u002F5.synchronization","i-lucide-lock-keyhole",{"title":145,"path":146,"stem":147,"children":148,"page":6},"Standard Library","\u002Fstandard-library","4.standard-library",[149,154,159,164,169,174,179],{"title":150,"path":151,"stem":152,"icon":153},"Standard Library Overview","\u002Fstandard-library\u002Foverview","4.standard-library\u002F1.overview","i-lucide-library",{"title":155,"path":156,"stem":157,"icon":158},"Text and Formatting","\u002Fstandard-library\u002Ftext-and-formatting","4.standard-library\u002F2.text-and-formatting","i-lucide-text",{"title":160,"path":161,"stem":162,"icon":163},"Files and JSON","\u002Fstandard-library\u002Ffiles-and-json","4.standard-library\u002F3.files-and-json","i-lucide-file-json",{"title":165,"path":166,"stem":167,"icon":168},"HTTP Clients and Servers","\u002Fstandard-library\u002Fhttp","4.standard-library\u002F4.http","i-lucide-server",{"title":170,"path":171,"stem":172,"icon":173},"Testing","\u002Fstandard-library\u002Ftesting","4.standard-library\u002F5.testing","i-lucide-flask-conical",{"title":175,"path":176,"stem":177,"icon":178},"Command-Line Tools and Configuration","\u002Fstandard-library\u002Fcommand-line-and-configuration","4.standard-library\u002F6.command-line-and-configuration","i-lucide-terminal-square",{"title":180,"path":181,"stem":182,"icon":183},"Structured Logging","\u002Fstandard-library\u002Fstructured-logging","4.standard-library\u002F7.structured-logging","i-lucide-scroll-text",{"title":185,"path":186,"stem":187,"children":188,"page":6},"Backend Development","\u002Fbackend-development","5.backend-development",[189,194,199,204,209,214,219,224,229,234,239],{"title":190,"path":191,"stem":192,"icon":193},"Backend Roadmap","\u002Fbackend-development\u002Fbackend-roadmap","5.backend-development\u002F1.backend-roadmap","i-lucide-route",{"title":195,"path":196,"stem":197,"icon":198},"Graceful Shutdown","\u002Fbackend-development\u002Fgraceful-shutdown","5.backend-development\u002F10.graceful-shutdown","i-lucide-power",{"title":200,"path":201,"stem":202,"icon":203},"Production Checklist","\u002Fbackend-development\u002Fproduction-checklist","5.backend-development\u002F11.production-checklist","i-lucide-clipboard-check",{"title":205,"path":206,"stem":207,"icon":208},"HTTP API Design","\u002Fbackend-development\u002Fhttp-api-design","5.backend-development\u002F2.http-api-design","i-lucide-waypoints",{"title":210,"path":211,"stem":212,"icon":213},"Middleware","\u002Fbackend-development\u002Fmiddleware","5.backend-development\u002F3.middleware","i-lucide-layers-3",{"title":215,"path":216,"stem":217,"icon":218},"Validation","\u002Fbackend-development\u002Fvalidation","5.backend-development\u002F4.validation","i-lucide-list-checks",{"title":220,"path":221,"stem":222,"icon":223},"Application Wiring","\u002Fbackend-development\u002Fapplication-wiring","5.backend-development\u002F5.application-wiring","i-lucide-cable",{"title":225,"path":226,"stem":227,"icon":228},"Observability","\u002Fbackend-development\u002Fobservability","5.backend-development\u002F6.observability","i-lucide-activity",{"title":230,"path":231,"stem":232,"icon":233},"Database SQL","\u002Fbackend-development\u002Fdatabase-sql","5.backend-development\u002F7.database-sql","i-lucide-database",{"title":235,"path":236,"stem":237,"icon":238},"Transactions","\u002Fbackend-development\u002Ftransactions","5.backend-development\u002F8.transactions","i-lucide-repeat-2",{"title":240,"path":241,"stem":242,"icon":243},"Authentication and Authorization","\u002Fbackend-development\u002Fauthentication","5.backend-development\u002F9.authentication","i-lucide-shield-check",{"title":245,"path":246,"stem":247,"children":248,"page":6},"Advanced Go","\u002Fadvanced-go","6.advanced-go",[249,254,259,264,269,274,278,283,288],{"title":250,"path":251,"stem":252,"icon":253},"Advanced Go Roadmap","\u002Fadvanced-go\u002Fadvanced-roadmap","6.advanced-go\u002F1.advanced-roadmap","i-lucide-brain-circuit",{"title":255,"path":256,"stem":257,"icon":258},"Reflection","\u002Fadvanced-go\u002Freflection","6.advanced-go\u002F2.reflection","i-lucide-scan-search",{"title":260,"path":261,"stem":262,"icon":263},"Memory and Garbage Collection","\u002Fadvanced-go\u002Fmemory-and-garbage-collection","6.advanced-go\u002F3.memory-and-garbage-collection","i-lucide-memory-stick",{"title":265,"path":266,"stem":267,"icon":268},"Benchmarking and Profiling","\u002Fadvanced-go\u002Fbenchmarking-and-profiling","6.advanced-go\u002F4.benchmarking-and-profiling","i-lucide-gauge",{"title":270,"path":271,"stem":272,"icon":273},"Advanced Testing and Fuzzing","\u002Fadvanced-go\u002Fadvanced-testing-and-fuzzing","6.advanced-go\u002F5.advanced-testing-and-fuzzing","i-lucide-microscope",{"title":275,"path":276,"stem":277,"icon":48},"Advanced Concurrency","\u002Fadvanced-go\u002Fadvanced-concurrency","6.advanced-go\u002F6.advanced-concurrency",{"title":279,"path":280,"stem":281,"icon":282},"Unsafe and C Boundaries","\u002Fadvanced-go\u002Funsafe-and-cgo","6.advanced-go\u002F7.unsafe-and-cgo","i-lucide-radiation",{"title":284,"path":285,"stem":286,"icon":287},"Package and API Design","\u002Fadvanced-go\u002Fpackage-and-api-design","6.advanced-go\u002F8.package-and-api-design","i-lucide-boxes",{"title":289,"path":290,"stem":291,"icon":292},"Distributed Reliability","\u002Fadvanced-go\u002Fdistributed-reliability","6.advanced-go\u002F9.distributed-reliability","i-lucide-cloud-cog",{"title":294,"path":295,"stem":296,"children":297,"page":6},"Projects","\u002Fprojects","7.projects",[298,316,332,347],{"title":299,"path":300,"stem":301,"children":302,"icon":305},"CLI Task Manager","\u002Fprojects\u002Fcli-task-manager","7.projects\u002F1.cli-task-manager\u002Findex",[303,306,311],{"title":304,"path":300,"stem":301,"icon":305},"Project — CLI Task Manager","i-lucide-list-todo",{"title":307,"path":308,"stem":309,"icon":310},"CLI — Domain and Storage","\u002Fprojects\u002Fcli-task-manager\u002Fdomain-and-storage","7.projects\u002F1.cli-task-manager\u002F1.domain-and-storage","i-lucide-save",{"title":312,"path":313,"stem":314,"icon":315},"CLI — Commands and Tests","\u002Fprojects\u002Fcli-task-manager\u002Fcommands-and-tests","7.projects\u002F1.cli-task-manager\u002F2.commands-and-tests","i-lucide-terminal",{"title":317,"path":318,"stem":319,"children":320,"icon":323},"Concurrent URL Checker","\u002Fprojects\u002Fconcurrent-url-checker","7.projects\u002F2.concurrent-url-checker\u002Findex",[321,324,328],{"title":322,"path":318,"stem":319,"icon":323},"Project — Concurrent URL Checker","i-lucide-radar",{"title":325,"path":326,"stem":327,"icon":128},"URL Checker — Worker Pipeline","\u002Fprojects\u002Fconcurrent-url-checker\u002Fworker-pipeline","7.projects\u002F2.concurrent-url-checker\u002F1.worker-pipeline",{"title":329,"path":330,"stem":331,"icon":173},"URL Checker — Cancellation and Tests","\u002Fprojects\u002Fconcurrent-url-checker\u002Fcancellation-and-tests","7.projects\u002F2.concurrent-url-checker\u002F2.cancellation-and-tests",{"title":333,"path":334,"stem":335,"children":336},"File-backed API","\u002Fprojects\u002Ffile-backed-api","7.projects\u002F3.file-backed-api\u002Findex",[337,339,343],{"title":338,"path":334,"stem":335},"File-backed notes API",{"title":340,"path":341,"stem":342},"File store and concurrency","\u002Fprojects\u002Ffile-backed-api\u002Ffile-store-and-concurrency","7.projects\u002F3.file-backed-api\u002F1.file-store-and-concurrency",{"title":344,"path":345,"stem":346},"HTTP layer and tests","\u002Fprojects\u002Ffile-backed-api\u002Fhttp-and-tests","7.projects\u002F3.file-backed-api\u002F2.http-and-tests",{"title":348,"path":349,"stem":350,"children":351},"Production REST API","\u002Fprojects\u002Fproduction-rest-api","7.projects\u002F4.production-rest-api\u002Findex",[352,354,358],{"title":353,"path":349,"stem":350},"Production REST API capstone",{"title":355,"path":356,"stem":357},"Persistence and authentication","\u002Fprojects\u002Fproduction-rest-api\u002Fpersistence-and-auth","7.projects\u002F4.production-rest-api\u002F1.persistence-and-auth",{"title":359,"path":360,"stem":361},"Operations and release","\u002Fprojects\u002Fproduction-rest-api\u002Foperations-and-release","7.projects\u002F4.production-rest-api\u002F2.operations-and-release",{"title":363,"path":364,"stem":365,"children":366,"page":6},"Meta","\u002Fmeta","99.meta",[367,372],{"title":368,"path":369,"stem":370,"icon":371},"About","\u002Fmeta\u002Fabout","99.meta\u002F1.about","i-lucide-info",{"title":373,"path":374,"stem":375,"icon":376},"Acknowledgements","\u002Fmeta\u002Facknowledgements","99.meta\u002F2.acknowledgements","i-lucide-heart-handshake",{"id":378,"title":289,"body":379,"description":829,"extension":830,"links":831,"meta":832,"navigation":833,"path":290,"seo":834,"stem":291,"__hash__":836},"docs\u002F6.advanced-go\u002F9.distributed-reliability.md",{"type":380,"value":381,"toc":815},"minimark",[382,388,393,397,416,420,423,426,429,433,436,439,557,564,568,571,589,592,595,599,602,619,622,626,629,649,652,655,659,662,665,685,688,692,695,698,701,705,708,711,714,718,757,761,764,783,787,804,807,811],[383,384],"learning-lesson-meta",{"level":385,"prerequisites":386,"time":387},"Advanced","Backend path, context, HTTP clients, transactions, observability, and concurrency","75–90 minutes",[389,390,392],"h2",{"id":391},"what-you-will-learn","What you will learn",[394,395,396],"p",{},"By the end of this lesson, you will be able to:",[398,399,400,404,407,410,413],"ul",{},[401,402,403],"li",{},"treat timeouts and retries as one request budget;",[401,405,406],{},"identify operations that are safe to retry;",[401,408,409],{},"design idempotency for ambiguous outcomes;",[401,411,412],{},"bound concurrency, queues, and overload;",[401,414,415],{},"reason about consistency across database and messaging boundaries.",[389,417,419],{"id":418},"mental-model-failure-is-often-partial-and-ambiguous","Mental model: failure is often partial and ambiguous",[394,421,422],{},"A remote call can fail before the server sees it, while the server processes it, after the server commits it, or while the response returns.",[394,424,425],{},"From the caller's timeout alone, you may not know whether the operation happened.",[394,427,428],{},"That uncertainty drives idempotency, status lookup, durable messaging, and reconciliation designs.",[389,430,432],{"id":431},"one-end-to-end-budget","One end-to-end budget",[394,434,435],{},"Suppose an incoming request has two seconds remaining. Giving each of three dependencies a separate two-second timeout violates the caller's budget.",[394,437,438],{},"Propagate the caller context and reserve time for local work and response handling. A downstream operation can use a shorter child deadline:",[440,441,446],"pre",{"className":442,"code":443,"language":444,"meta":445,"style":445},"language-go shiki shiki-themes solarized-light material-theme one-dark-pro","dependencyCtx, cancel := context.WithTimeout(ctx, 300*time.Millisecond)\ndefer cancel()\n\nresult, err := client.Fetch(dependencyCtx, id)\n","go","",[447,448,449,506,518,525],"code",{"__ignoreMap":445},[450,451,454,458,462,465,469,472,475,479,482,485,487,491,495,498,500,503],"span",{"class":452,"line":453},"line",1,[450,455,457],{"class":456},"s45-6","dependencyCtx",[450,459,461],{"class":460},"shFME",",",[450,463,464],{"class":456}," cancel",[450,466,468],{"class":467},"su2KV"," :=",[450,470,471],{"class":456}," context",[450,473,474],{"class":460},".",[450,476,478],{"class":477},"sisdC","WithTimeout",[450,480,481],{"class":460},"(",[450,483,484],{"class":456},"ctx",[450,486,461],{"class":460},[450,488,490],{"class":489},"sAJzr"," 300",[450,492,494],{"class":493},"sEOdo","*",[450,496,497],{"class":456},"time",[450,499,474],{"class":460},[450,501,502],{"class":456},"Millisecond",[450,504,505],{"class":460},")\n",[450,507,509,513,515],{"class":452,"line":508},2,[450,510,512],{"class":511},"s7Bcg","defer",[450,514,464],{"class":477},[450,516,517],{"class":460},"()\n",[450,519,521],{"class":452,"line":520},3,[450,522,524],{"emptyLinePlaceholder":523},true,"\n",[450,526,528,531,533,536,538,541,543,546,548,550,552,555],{"class":452,"line":527},4,[450,529,530],{"class":456},"result",[450,532,461],{"class":460},[450,534,535],{"class":456}," err",[450,537,468],{"class":467},[450,539,540],{"class":456}," client",[450,542,474],{"class":460},[450,544,545],{"class":477},"Fetch",[450,547,481],{"class":460},[450,549,457],{"class":456},[450,551,461],{"class":460},[450,553,554],{"class":456}," id",[450,556,505],{"class":460},[394,558,559,560,563],{},"Do not create ",[447,561,562],{},"context.Background()"," for request work. Cancellation and deadlines must continue through the call graph.",[389,565,567],{"id":566},"retry-only-when-the-failure-and-operation-permit-it","Retry only when the failure and operation permit it",[394,569,570],{},"Before retrying, ask:",[572,573,574,577,580,583,586],"ol",{},[401,575,576],{},"Is the failure classified as transient?",[401,578,579],{},"Is the operation idempotent or protected by an idempotency mechanism?",[401,581,582],{},"Is there enough deadline budget for another attempt?",[401,584,585],{},"Is the attempt count bounded?",[401,587,588],{},"Will retries amplify an overloaded dependency?",[394,590,591],{},"Use exponential backoff with jitter where appropriate so many clients do not retry in lockstep.",[394,593,594],{},"Never retry validation, authentication, most permission failures, or permanent not-found results without a specific consistency reason.",[389,596,598],{"id":597},"idempotency-keys","Idempotency keys",[394,600,601],{},"For a create operation that clients may safely repeat:",[572,603,604,607,610,613,616],{},[401,605,606],{},"Client generates a high-entropy idempotency key scoped to the operation\u002Faccount.",[401,608,609],{},"Server stores the key, a request fingerprint, status, and result durably.",[401,611,612],{},"The first request performs the operation atomically with the idempotency record where possible.",[401,614,615],{},"A repeat with the same key and equivalent request returns the stored result.",[401,617,618],{},"A repeat with the same key but different request is rejected.",[394,620,621],{},"Define retention, concurrency, in-progress responses, and scope. An in-memory map does not survive restarts or coordinate replicas.",[389,623,625],{"id":624},"backpressure-and-load-shedding","Backpressure and load shedding",[394,627,628],{},"Every scarce resource needs a bound:",[398,630,631,634,637,640,643,646],{},[401,632,633],{},"concurrent requests;",[401,635,636],{},"queued jobs;",[401,638,639],{},"database connections;",[401,641,642],{},"outbound dependency calls;",[401,644,645],{},"response and request sizes;",[401,647,648],{},"retry attempts.",[394,650,651],{},"When capacity is full, delaying every request indefinitely can cause a cascading failure. Rejecting some work quickly with a clear retry policy may preserve useful service for the rest.",[394,653,654],{},"Prioritisation must be explicit and fair enough for the product. Do not let health checks or administrative recovery paths queue behind unbounded normal work.",[389,656,658],{"id":657},"circuit-breakers","Circuit breakers",[394,660,661],{},"A circuit breaker can stop repeated calls to a failing dependency for a period, allowing recovery and protecting local resources.",[394,663,664],{},"It adds state and tuning:",[398,666,667,670,673,676,679,682],{},[401,668,669],{},"which failures count;",[401,671,672],{},"rolling window and threshold;",[401,674,675],{},"open duration;",[401,677,678],{},"limited probe behaviour;",[401,680,681],{},"per-instance versus shared state;",[401,683,684],{},"interaction with retries and load balancing.",[394,686,687],{},"Add one only after timeouts, bounded concurrency, and useful metrics exist. A poorly tuned breaker can reject healthy work.",[389,689,691],{"id":690},"database-and-message-consistency","Database and message consistency",[394,693,694],{},"Writing database state and publishing a message are two separate operations. Either can succeed alone.",[394,696,697],{},"An outbox pattern writes the state change and event record in one database transaction. A publisher later sends pending events. Consumers should handle duplicate delivery idempotently because publish acknowledgement can also be ambiguous.",[394,699,700],{},"Exactly-once effects across arbitrary systems are not obtained by naming a queue setting. Define deduplication keys, durable state transitions, and reconciliation.",[389,702,704],{"id":703},"sagas-and-compensation","Sagas and compensation",[394,706,707],{},"Long workflows across services cannot usually hold one database transaction. A saga records steps and uses compensating actions when a later step fails.",[394,709,710],{},"Compensation is business logic, not time travel. Refunding a payment does not erase that it was captured, and notifications already sent cannot be unsent.",[394,712,713],{},"Design state machines, retry rules, idempotency, and operator recovery explicitly.",[389,715,717],{"id":716},"common-mistakes","Common mistakes",[398,719,720,727,733,739,745,751],{},[401,721,722,726],{},[723,724,725],"strong",{},"Retrying at every layer:"," attempts multiply and overload the dependency.",[401,728,729,732],{},[723,730,731],{},"Retrying a timed-out create without idempotency:"," duplicate resources or charges appear.",[401,734,735,738],{},[723,736,737],{},"Using one timeout copied everywhere:"," request types and dependencies have different budgets.",[401,740,741,744],{},[723,742,743],{},"Adding an unbounded queue during overload:"," latency and memory grow until failure.",[401,746,747,750],{},[723,748,749],{},"Calling a message “exactly once” without defining the effect:"," duplicates still reach business state.",[401,752,753,756],{},[723,754,755],{},"Using a breaker without metrics:"," operators cannot understand rejected traffic or recovery.",[389,758,760],{"id":759},"practice","Practice",[394,762,763],{},"Design a payment-order workflow where the client may retry after losing the response. Include idempotency, database state, external payment calls, outbox publication, duplicate events, timeout budgets, and reconciliation.",[765,766,767],"accordion",{},[768,769,772,780],"accordion-item",{"icon":770,"label":771},"i-lucide-lightbulb","Show reliability design",[440,773,778],{"className":774,"code":776,"language":777,"meta":445},[775],"language-text","Create order request\n  client supplies idempotency key\n  server transaction inserts pending order + idempotency record\n\nPayment step\n  worker calls provider with stable provider idempotency key\n  bounded attempts inside job deadline\n  ambiguous timeout moves order to payment_unknown, not failed\n\nProvider result\n  transaction updates order state + inserts OrderPaid outbox event\n\nOutbox publisher\n  publishes with event ID\n  marks published after acknowledgement\n  may publish duplicates after ambiguous acknowledgement\n\nConsumer\n  stores processed event ID with business update atomically\n  duplicate ID becomes no-op\n\nReconciliation\n  queries provider for payment_unknown orders\n  advances state from authoritative result\n","text",[447,779,776],{"__ignoreMap":445},[394,781,782],{},"The workflow never assumes a timeout means failure. Every repeatable boundary has a stable key, every queue is bounded, and operations expose states that people and automated reconciliation can repair.",[389,784,786],{"id":785},"summary","Summary",[398,788,789,792,795,798,801],{},[401,790,791],{},"Remote failures can leave outcomes unknown, not simply successful or failed.",[401,793,794],{},"Propagate one request budget and bound every retry.",[401,796,797],{},"Retry only transient failures for safe or idempotently protected operations.",[401,799,800],{},"Bound work and shed load before resource exhaustion creates a cascade.",[401,802,803],{},"Use durable state, deduplication, outboxes, and reconciliation for cross-system workflows.",[805,806],"learning-lesson-complete",{},[808,809],"learning-lesson-navigation",{"next":300,"next-label":810,"previous":285,"previous-label":284},"Project: CLI Task Manager",[812,813,814],"style",{},"html pre.shiki code .s45-6, html code.shiki .s45-6{--shiki-light:#268BD2;--shiki-default:#EEFFFF;--shiki-dark:#E06C75}html pre.shiki code .shFME, html code.shiki .shFME{--shiki-light:#657B83;--shiki-default:#89DDFF;--shiki-dark:#ABB2BF}html pre.shiki code .su2KV, html code.shiki .su2KV{--shiki-light:#859900;--shiki-default:#89DDFF;--shiki-dark:#E5C07B}html pre.shiki code .sisdC, html code.shiki .sisdC{--shiki-light:#268BD2;--shiki-default:#82AAFF;--shiki-dark:#61AFEF}html pre.shiki code .sAJzr, html code.shiki .sAJzr{--shiki-light:#D33682;--shiki-default:#F78C6C;--shiki-dark:#D19A66}html pre.shiki code .sEOdo, html code.shiki .sEOdo{--shiki-light:#859900;--shiki-default:#89DDFF;--shiki-dark:#C678DD}html pre.shiki code .s7Bcg, html code.shiki .s7Bcg{--shiki-light:#859900;--shiki-light-font-style:inherit;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#C678DD;--shiki-dark-font-style:inherit}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":445,"searchDepth":508,"depth":508,"links":816},[817,818,819,820,821,822,823,824,825,826,827,828],{"id":391,"depth":508,"text":392},{"id":418,"depth":508,"text":419},{"id":431,"depth":508,"text":432},{"id":566,"depth":508,"text":567},{"id":597,"depth":508,"text":598},{"id":624,"depth":508,"text":625},{"id":657,"depth":508,"text":658},{"id":690,"depth":508,"text":691},{"id":703,"depth":508,"text":704},{"id":716,"depth":508,"text":717},{"id":759,"depth":508,"text":760},{"id":785,"depth":508,"text":786},"Design timeouts, retries, idempotency, overload control, and consistency for systems that partially fail.","md",null,{},{"icon":292},{"description":835,"title":289},"Learn distributed reliability in Go with deadlines, retries, jitter, idempotency, circuit breakers, load shedding, outboxes, and partial failure.","OS-VRDB64Fj-2NECTOOvFxXzbsSDhsycG4x4bZsf65g",[838,840],{"title":284,"path":285,"stem":286,"description":839,"icon":287,"children":-1},"Build small, stable packages that are easy to understand, test, evolve, and use correctly.",{"title":304,"path":300,"stem":301,"description":841,"icon":305,"children":-1},"Design a command-line task manager that combines the complete language-fundamentals stage.",1794118104215]