[{"data":1,"prerenderedAt":233},["ShallowReactive",2],{"term-f\u002Ffault-tolerance":3,"related-f\u002Ffault-tolerance":214},{"id":4,"title":5,"acronym":6,"body":7,"category":194,"description":195,"difficulty":196,"extension":197,"letter":198,"meta":199,"navigation":200,"path":201,"related":202,"seo":208,"sitemap":209,"stem":212,"subcategory":6,"__hash__":213},"terms\u002Fterms\u002Ff\u002Ffault-tolerance.md","Fault Tolerance",null,{"type":8,"value":9,"toc":188},"minimark",[10,15,19,23,26,30,177,181,184],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 - The Vibe Check",[16,17,18],"p",{},"Fault tolerance is designing a system that assumes parts of it will break, so it plans for that instead of hoping it doesn't happen. A fault-tolerant system doesn't just survive a server crashing, it barely notices, because it was built from the start with the expectation that servers crash.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Fault tolerance is the property of a system that allows it to continue functioning correctly, without interruption, even when one or more of its components fail. It differs subtly from resilience, which allows continuing in a degraded state, by aiming for continued correct operation despite faults, commonly implemented through redundancy, replication, error detection and correction, and automatic failover, and is a prerequisite for high availability.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","async function fetchWithFallback(primary, backup) {\n  try {\n    return await primary()\n  } catch (err) {\n    console.warn('primary failed, falling back', err)\n    return await backup()\n  }\n}\n","javascript","",[38,39,40,76,85,101,123,154,165,171],"code",{"__ignoreMap":36},[41,42,45,49,52,56,60,64,67,70,73],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"spNyl","async",[41,50,51],{"class":47}," function",[41,53,55],{"class":54},"s2Zo4"," fetchWithFallback",[41,57,59],{"class":58},"sMK4o","(",[41,61,63],{"class":62},"sHdIc","primary",[41,65,66],{"class":58},",",[41,68,69],{"class":62}," backup",[41,71,72],{"class":58},")",[41,74,75],{"class":58}," {\n",[41,77,79,83],{"class":43,"line":78},2,[41,80,82],{"class":81},"s7zQu","  try",[41,84,75],{"class":58},[41,86,88,91,94,97],{"class":43,"line":87},3,[41,89,90],{"class":81},"    return",[41,92,93],{"class":81}," await",[41,95,96],{"class":54}," primary",[41,98,100],{"class":99},"swJcz","()\n",[41,102,104,107,110,113,117,120],{"class":43,"line":103},4,[41,105,106],{"class":58},"  }",[41,108,109],{"class":81}," catch",[41,111,112],{"class":99}," (",[41,114,116],{"class":115},"sTEyZ","err",[41,118,119],{"class":99},") ",[41,121,122],{"class":58},"{\n",[41,124,126,129,132,135,137,140,144,146,148,151],{"class":43,"line":125},5,[41,127,128],{"class":115},"    console",[41,130,131],{"class":58},".",[41,133,134],{"class":54},"warn",[41,136,59],{"class":99},[41,138,139],{"class":58},"'",[41,141,143],{"class":142},"sfazB","primary failed, falling back",[41,145,139],{"class":58},[41,147,66],{"class":58},[41,149,150],{"class":115}," err",[41,152,153],{"class":99},")\n",[41,155,157,159,161,163],{"class":43,"line":156},6,[41,158,90],{"class":81},[41,160,93],{"class":81},[41,162,69],{"class":54},[41,164,100],{"class":99},[41,166,168],{"class":43,"line":167},7,[41,169,170],{"class":58},"  }\n",[41,172,174],{"class":43,"line":173},8,[41,175,176],{"class":58},"}\n",[11,178,180],{"id":179},"when-youll-hear-this","When You'll Hear This",[16,182,183],{},"\"The cache node died but the cluster is fault tolerant, nobody even noticed.\" \u002F \"Fault tolerance means the system survives the failure, not just recovers from it eventually.\"",[185,186,187],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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":36,"searchDepth":78,"depth":78,"links":189},[190,191,192,193],{"id":13,"depth":78,"text":14},{"id":21,"depth":78,"text":22},{"id":28,"depth":78,"text":29},{"id":179,"depth":78,"text":180},"architecture","Fault tolerance is designing a system that assumes parts of it will break, so it plans for that instead of hoping it doesn't happen.","intermediate","md","f",{},true,"\u002Fterms\u002Ff\u002Ffault-tolerance",[203,204,205,206,207],"Resilience","High Availability","Auto-Failover","Circuit Breaker","Replication",{"title":5,"description":195},{"changefreq":210,"priority":211},"weekly",0.7,"terms\u002Ff\u002Ffault-tolerance","60KqVFbusaxXq0rh0ELOGiQ9iCQs78XFNeAz_T3M3NM",[215,219,222,225,230],{"title":205,"path":216,"acronym":6,"category":217,"difficulty":196,"description":218},"\u002Fterms\u002Fa\u002Fauto-failover","cloud","Auto-failover automatically switches to a backup system when the primary one fails — no human intervention needed. Your database server dies at 3 AM?",{"title":206,"path":220,"acronym":6,"category":194,"difficulty":196,"description":221},"\u002Fterms\u002Fc\u002Fcircuit-breaker","Circuit Breaker is like the electrical circuit breaker in your house.",{"title":204,"path":223,"acronym":6,"category":194,"difficulty":196,"description":224},"\u002Fterms\u002Fh\u002Fhigh-availability","High availability means your system keeps running even when a piece of it inevitably fails, because in production, something is always failing somewhere.",{"title":207,"path":226,"acronym":6,"category":227,"difficulty":228,"description":229},"\u002Fterms\u002Fr\u002Freplication","database","advanced","Replication means automatically copying your database to one or more other servers in real time. If the main server dies, a replica takes over.",{"title":203,"path":231,"acronym":6,"category":194,"difficulty":196,"description":232},"\u002Fterms\u002Fr\u002Fresilience","Resilience is your system's ability to get punched in the face by a dependency going down, a traffic spike, or a bad deploy, and keep serving users anyway...",1792528084409]