1 line
72 KiB
HTML
1 line
72 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width, initial-scale=1" data-next-head=""/><title data-next-head="">How Stripe’s document databases supported 99.999% uptime with zero-downtime data migrations | Stripe Dot Dev Blog</title><meta property="og:title" content="How Stripe’s document databases supported 99.999% uptime with zero-downtime data migrations " data-next-head=""/><meta name="description" content="In this blog post we’ll share an overview of Stripe’s database infrastructure and discuss the design and application of the Data Movement Platform." data-next-head=""/><meta property="og:description" content="In this blog post we’ll share an overview of Stripe’s database infrastructure and discuss the design and application of the Data Movement Platform." data-next-head=""/><meta property="og:image" content="https://stripe.dev/dev_social.jpeg" data-next-head=""/><meta property="og:url" content="https://stripe.dev/blog/how-stripes-document-databases-supported-99.999-uptime-with-zero-downtime-data-migrations" data-next-head=""/><meta name="twitter:card" content="summary_large_image" data-next-head=""/><meta name="twitter:site" content="@stripepress" data-next-head=""/><meta name="twitter:creator" content="@stripepress" data-next-head=""/><meta name="twitter:title" content="How Stripe’s document databases supported 99.999% uptime with zero-downtime data migrations " data-next-head=""/><meta name="twitter:description" content="In this blog post we’ll share an overview of Stripe’s database infrastructure and discuss the design and application of the Data Movement Platform." data-next-head=""/><meta name="twitter:image" content="https://stripe.dev/dev_social.jpeg" data-next-head=""/><link rel="icon" href="../favicon.ico" sizes="16x16" type="image/x-icon" data-next-head=""/><link rel="alternate" type="application/rss+xml" title="Stripe Dot Dev Blog RSS Feed" href="/blog/feed" data-next-head=""/><link rel="preload" href="/_next/static/immutable/chunks/26mgwr_fts6qf.css" as="style"/><link rel="preload" href="/_next/static/immutable/chunks/1noeusy499iw9.css" as="style"/><link rel="preload" href="/_next/static/immutable/chunks/00ox9228fvyp0.css" as="style"/><link rel="stylesheet" href="/_next/static/immutable/chunks/26mgwr_fts6qf.css" data-n-g=""/><link rel="stylesheet" href="/_next/static/immutable/chunks/1noeusy499iw9.css" data-n-p=""/><link rel="stylesheet" href="/_next/static/immutable/chunks/00ox9228fvyp0.css" data-n-p=""/><noscript data-n-css=""></noscript><script src="/_next/static/immutable/chunks/1cob6x-fi4i-4.js" defer=""></script><script src="/_next/static/immutable/chunks/3gsov9ct577rw.js" defer=""></script><script src="/_next/static/immutable/chunks/1ucsp485cb0vt.js" defer=""></script><script src="/_next/static/immutable/chunks/3xifnu-wkzwxk.js" defer=""></script><script src="/_next/static/immutable/chunks/24yokreqzh33m.js" defer=""></script><script src="/_next/static/immutable/chunks/turbopack-40ownz5n31cvn.js" defer=""></script><script src="/_next/static/immutable/chunks/2yxzj6ro62a4z.js" defer=""></script><script src="/_next/static/immutable/chunks/0nqa9reizfal_.js" defer=""></script><script src="/_next/static/immutable/chunks/1ysqz5d0mpqb9.js" defer=""></script><script src="/_next/static/immutable/chunks/1n6eo0j0ma__p.js" defer=""></script><script src="/_next/static/immutable/chunks/1ohutym-kn4k_.js" defer=""></script><script src="/_next/static/immutable/chunks/turbopack-2c2kus_j-wlxb.js" defer=""></script><script src="/_next/static/CpqpGfDouU7Dr4XKHLZDI/_buildManifest.js" defer=""></script><script src="/_next/static/CpqpGfDouU7Dr4XKHLZDI/_ssgManifest.js" defer=""></script><script src="/_next/static/CpqpGfDouU7Dr4XKHLZDI/_clientMiddlewareManifest.js" defer=""></script></head><body><div id="__next"><main><div class="GridLayout-module__h3nX9W__grid"><nav class="Nav-module__bLoQaq__nav"><div class="Nav-module__bLoQaq__nav__left"><a class="Nav-module__bLoQaq__nav__link" aria-label="Home" href="/"><svg class="Nav-module__bLoQaq__nav__logoIcon" width="13" height="15" viewBox="0 0 13 15" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 14.0578L12.6296 11.302V0.942383L0 3.64711V14.0578Z" fill="currentColor"></path></svg></a><a target="_self" class="text-smallcaps NavButton-module__Vo4Iva__navButton NavButton-module__Vo4Iva__active" href="/blog"><span class="NavButton-module__Vo4Iva__hotkey">[<!-- -->B<!-- -->] </span>Blog</a><a target="_self" class="text-smallcaps NavButton-module__Vo4Iva__navButton" href="/events"><span class="NavButton-module__Vo4Iva__hotkey">[<!-- -->E<!-- -->] </span>Events</a><a target="_blank" class="text-smallcaps NavButton-module__Vo4Iva__navButton" href="https://docs.stripe.com"><span class="NavButton-module__Vo4Iva__hotkey">[<!-- -->D<!-- -->] </span>Docs</a><a target="_blank" class="text-smallcaps NavButton-module__Vo4Iva__navButton" href="https://www.youtube.com/stripedevelopers"><span class="NavButton-module__Vo4Iva__hotkey">[<!-- -->Y<!-- -->] </span>Youtube</a><a target="_blank" class="text-smallcaps NavButton-module__Vo4Iva__navButton" href="https://github.com/stripe"><span class="NavButton-module__Vo4Iva__hotkey">[<!-- -->G<!-- -->] </span>Github</a><a target="_blank" class="text-smallcaps NavButton-module__Vo4Iva__navButton" href="https://www.meetup.com/pro/stripe"><span class="NavButton-module__Vo4Iva__hotkey">[<!-- -->M<!-- -->] </span>Meetups</a><a target="_blank" class="text-smallcaps NavButton-module__Vo4Iva__navButton" href="https://www.stripecommunity.com/home"><span class="NavButton-module__Vo4Iva__hotkey">[<!-- -->U<!-- -->] </span>Community</a></div></nav><section class="section-module__Yglhya__section BlogPostHero-module__AQEnuW__section"><div class="backgroundIcons-module__vHa6oa__backgroundIcons"><svg class="BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg></div><h1 class="BlogPostHero-module__AQEnuW__title">How Stripe’s document databases supported 99.999% uptime with zero-downtime data migrations </h1><div class="BlogPostHero-module__AQEnuW__icon"><div class="GlobeIcon-module__AdM6KG__icon"><canvas class="GlobeIcon-module__AdM6KG__ellipseCanvas"></canvas><svg width="85" height="42" viewBox="0 0 83 42" fill="none"><circle cx="63" cy="21" r="19.5" stroke="var(--globeGraphicColor)"></circle><circle cx="19.5" cy="21" r="19.5" stroke="var(--globeGraphicColor)"></circle><path d="M3.5 9.75 35 9.75" stroke="var(--globeGraphicColor)"></path><path d="M0 21 39 21" stroke="var(--globeGraphicColor)"></path><path d="M3 32 35 32.5" stroke="var(--globeGraphicColor)"></path><path d="M54.096 16.056H57.948V16.788H58.68V17.532H59.424V24.336H58.68V25.08H57.948V25.836H54.096V16.056ZM57.816 24.948V24.216H58.56V17.664H57.816V16.92H54.984V24.948H57.816ZM60.336 16.056H65.664V16.92H61.224V20.496H64.92V21.372H61.224V24.948H65.664V25.836H60.336V16.056ZM68.076 22.116H67.332V19.152H66.576V16.056H67.464V19.02H68.196V21.984H68.94V24.216H69.552V21.984H70.296V19.02H71.04V16.056H71.904V19.152H71.16V22.116H70.428V24.336H69.684V25.836H68.808V24.336H68.076V22.116Z" fill="var(--globeGraphicColor)"></path></svg></div></div><div class="backgroundIcons-module__vHa6oa__backgroundIcons"><svg class="BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg></div></section><section class="section-module__Yglhya__section BlogPost-module__ifVEqa__blogPostSection"><div class="BlogPost-module__ifVEqa__sidebar"><div class="BlogPost-module__ifVEqa__metadata"><div class="TableHeader-module__qdaoaq__container BlogPost-module__ifVEqa__metadataHeader"><div class="TableHeader-module__qdaoaq__label text-smallcaps"><span>/</span>Metadata</div></div><div class="BlogPost-module__ifVEqa__metadata"><div class="text-smallcaps BlogPost-module__ifVEqa__metaDataItem"><span>Date:</span><span>2024.6.06</span></div><div class="text-smallcaps BlogPost-module__ifVEqa__metaDataItem"><span>Authors:</span><div class="BlogPost-module__ifVEqa__tags"><a href="/authors/jimmy-morzaria" class="text-smallcaps Tag-module__zQcxqq__tag">Jimmy Morzaria</a><a href="/authors/suraj-narkhede" class="text-smallcaps Tag-module__zQcxqq__tag">Suraj Narkhede</a></div></div><div class="text-smallcaps BlogPost-module__ifVEqa__metaDataItem"><span>Reading time:</span><span>11 min read</span></div><div class="text-smallcaps BlogPost-module__ifVEqa__metaDataItem"><span>Categories:</span><div class="BlogPost-module__ifVEqa__tags"><div class="text-smallcaps Tag-module__zQcxqq__tag">Infrastructure</div><div class="text-smallcaps Tag-module__zQcxqq__tag">Engineering</div></div></div><div class="BlogPost-module__ifVEqa__metaDataShare"><span class="text-smallcaps">Share:</span><div class="BlogPost-module__ifVEqa__shareButtonContainer"><a target="_blank" class="buttonSm" href="https://twitter.com/intent/tweet?url=https://stripe.dev/blog/how-stripes-document-databases-supported-99.999-uptime-with-zero-downtime-data-migrations&text=How Stripe’s document databases supported 99.999% uptime with zero-downtime data migrations ">Twitter/X</a><a target="_blank" class="buttonSm" href="http://www.linkedin.com/shareArticle?mini=true&url=https://stripe.dev/blog/how-stripes-document-databases-supported-99.999-uptime-with-zero-downtime-data-migrations&title=How%20Stripe%E2%80%99s%20document%20databases%20supported%2099.999%25%20uptime%20with%20zero-downtime%20data%20migrations%20&summary=In%20this%20blog%20post%20we%E2%80%99ll%20share%20an%20overview%20of%20Stripe%E2%80%99s%20database%20infrastructure%20and%20discuss%20the%20design%20and%20application%20of%20the%20Data%20Movement%20Platform.">LinkedIn</a></div></div></div></div></div><div class="BlogPost-module__ifVEqa__article"><div class="TableHeader-module__qdaoaq__container BlogPost-module__ifVEqa__articleHeader"><div class="TableHeader-module__qdaoaq__label text-smallcaps"><span>/</span>Article</div></div><div class="BlogPost-module__ifVEqa__articleBody"></div><div class="BlogPost-module__ifVEqa__aboutAuthor"><h2 class="BlogPost-module__ifVEqa__srOnly">About the author<!-- -->s</h2><div class="TableHeader-module__qdaoaq__container BlogPost-module__ifVEqa__aboutAuthorHeader"><div class="TableHeader-module__qdaoaq__label text-smallcaps"><span>/</span>About the author<!-- -->s</div></div><div class="BlogPost-module__ifVEqa__authorContent"><h3 class="text-lg">Jimmy Morzaria</h3><p class="text-sm">Jimmy Morzaria is an engineer at Stripe who works on Database Infrastructure</p><ul class="BlogPost-module__ifVEqa__additionalResourcesList"></ul></div><div class="BlogPost-module__ifVEqa__authorContent"><h3 class="text-lg">Suraj Narkhede</h3><p class="text-sm">Suraj Narkhede is an engineer at Stripe who works on Database Infrastructure</p><ul class="BlogPost-module__ifVEqa__additionalResourcesList"></ul></div></div><div class="BlogPost-module__ifVEqa__additionalResources"><div class="TableHeader-module__qdaoaq__container BlogPost-module__ifVEqa__additionalResourcesHeader"><div class="TableHeader-module__qdaoaq__label text-smallcaps"><span>/</span>Additional resources</div></div><ul class="BlogPost-module__ifVEqa__additionalResourcesList"><li class="ListItem-module__kBFJiq__listItem"><a class="BlogPost-module__ifVEqa__link" target="_blank" href="https://www.youtube.com/stripedevelopers"><span class="text-smallcaps BlogPost-module__ifVEqa__label"><div class="SquareIcon-module__6K7DfG__icon"></div>Subscribe to Stripe Developers on YouTube.</span><svg class="BlogPost-module__ifVEqa__arrow ArrowIcon-module__56PCEG__icon" viewBox="0 0 7 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 0H3V1H4V2H5V3H0V4H5V5H4V6H3V7H4V6H5V5H6V4H7V3H6V2H5V1H4V0Z" fill="currentColor"></path></svg></a></li><li class="ListItem-module__kBFJiq__listItem"><a class="BlogPost-module__ifVEqa__link" target="_blank" href="https://docs.stripe.com/"><span class="text-smallcaps BlogPost-module__ifVEqa__label"><div class="SquareIcon-module__6K7DfG__icon"></div>Check out the docs for the in-depth developer guidance.</span><svg class="BlogPost-module__ifVEqa__arrow ArrowIcon-module__56PCEG__icon" viewBox="0 0 7 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 0H3V1H4V2H5V3H0V4H5V5H4V6H3V7H4V6H5V5H6V4H7V3H6V2H5V1H4V0Z" fill="currentColor"></path></svg></a></li><li class="ListItem-module__kBFJiq__listItem"><a class="BlogPost-module__ifVEqa__link" target="_blank" href="https://discord.com/invite/RuJnSBXrQn"><span class="text-smallcaps BlogPost-module__ifVEqa__label"><div class="SquareIcon-module__6K7DfG__icon"></div>Join the Stripe Discord server to chat live with other developers.</span><svg class="BlogPost-module__ifVEqa__arrow ArrowIcon-module__56PCEG__icon" viewBox="0 0 7 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 0H3V1H4V2H5V3H0V4H5V5H4V6H3V7H4V6H5V5H6V4H7V3H6V2H5V1H4V0Z" fill="currentColor"></path></svg></a></li><li class="ListItem-module__kBFJiq__listItem"><a class="BlogPost-module__ifVEqa__link" target="_blank" href="https://www.meetup.com/pro/stripe/"><span class="text-smallcaps BlogPost-module__ifVEqa__label"><div class="SquareIcon-module__6K7DfG__icon"></div>Join a local Stripe Developer Meetup to learn about the latest features and network with your community.</span><svg class="BlogPost-module__ifVEqa__arrow ArrowIcon-module__56PCEG__icon" viewBox="0 0 7 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 0H3V1H4V2H5V3H0V4H5V5H4V6H3V7H4V6H5V5H6V4H7V3H6V2H5V1H4V0Z" fill="currentColor"></path></svg></a></li></ul></div></div></section><section class="section-module__Yglhya__section BlogPost-module__ifVEqa__relatedArticlesSection"><div class="TableHeader-module__qdaoaq__container BlogPost-module__ifVEqa__relatedHeader"><div class="TableHeader-module__qdaoaq__label text-smallcaps"><span>/</span>Related Articles</div></div><div class="FeaturedPost-module__8Dh16G__post" data-testid="featured-post-card"><div class="Art-module__QRr6PW__Art FeaturedPost-module__8Dh16G__image" data-testid="artwork" draggable="false" style="-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;touch-action:pan-y"><div class="Art-module__QRr6PW__Chrome"><div class="Art-module__QRr6PW__dragline"></div><div class="Art-module__QRr6PW__fig text-smallcaps">[ <!-- -->Fig. 1<!-- --> ]</div><div class="Art-module__QRr6PW__dragline"></div><a href="/art/index.html?config=%7B%22ampX%22:0.34922884912043817,%22ampY%22:0.366142391782254,%22aspectRatio%22:3.5991310963975267,%22axis%22:%22xy%22,%22lump%22:0.33172155507281426,%22count%22:70,%22freq%22:0.4,%22isDial%22:false,%22isLineart%22:false,%22isRing%22:true,%22isSpiral%22:true,%22left%22:4,%22mouseX%22:0.5866846039371565,%22mouseY%22:0.13641974309831856,%22noise%22:0.08586734730005265,%22scale%22:6.598315318033099,%22shape%22:%22rect%22,%22top%22:12,%22twirl%22:0,%22twist%22:1.4917267701253296,%22velocity%22:2.061707329314202%7D" target="_blank" aria-label="Open art controls"><svg class="Art-module__QRr6PW__propsIcon" width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M-8.74228e-08 10L8 10L8 9L11 9L11 10L12 10L12 11L11 11L11 12L8 12L8 11L-4.37113e-08 11L-8.74228e-08 10ZM-3.93402e-07 3L-4.37114e-07 2L8 2L8 1L11 1L11 2L12 2L12 3L11 3L11 4L8 4L8 3L-3.93402e-07 3ZM1 6L-2.62268e-07 6L-2.18557e-07 7L1 7L1 8L4 8L4 7L12 7L12 6L4 6L4 5L1 5L1 6ZM9 2L10 2L10 3L9 3L9 2ZM10 10L9 10L9 11L10 11L10 10ZM2 6L3 6L3 7L2 7L2 6Z"></path></svg></a></div><div class="Art-module__QRr6PW__row2"><div class="Art-module__QRr6PW__left"></div><div class="Art-module__QRr6PW__canvasContainer"><div class="Art-module__QRr6PW__background"><svg width="326" height="276" viewBox="0 0 326 276" xmlns="http://www.w3.org/2000/svg"><circle cx="13.5" cy="12" r="1"></circle><circle cx="13.5" cy="34.8182" r="1"></circle><circle cx="13.5" cy="57.6364" r="1"></circle><circle cx="13.5" cy="80.4545" r="1"></circle><circle cx="13.5" cy="103.273" r="1"></circle><circle cx="13.5" cy="126.091" r="1"></circle><circle cx="13.5" cy="148.909" r="1"></circle><circle cx="13.5" cy="171.727" r="1"></circle><circle cx="13.5" cy="194.545" r="1"></circle><circle cx="13.5" cy="217.364" r="1"></circle><circle cx="13.5" cy="240.182" r="1"></circle><circle cx="13.5" cy="263" r="1"></circle><circle cx="33.5" cy="12" r="1"></circle><circle cx="33.5" cy="34.8182" r="1"></circle><circle cx="33.5" cy="57.6364" r="1"></circle><circle cx="33.5" cy="80.4545" r="1"></circle><circle cx="33.5" cy="103.273" r="1"></circle><circle cx="33.5" cy="126.091" r="1"></circle><circle cx="33.5" cy="148.909" r="1"></circle><circle cx="33.5" cy="171.727" r="1"></circle><circle cx="33.5" cy="194.545" r="1"></circle><circle cx="33.5" cy="217.364" r="1"></circle><circle cx="33.5" cy="240.182" r="1"></circle><circle cx="33.5" cy="263" r="1"></circle><circle cx="53.5" cy="12" r="1"></circle><circle cx="53.5" cy="34.8182" r="1"></circle><circle cx="53.5" cy="57.6364" r="1"></circle><circle cx="53.5" cy="80.4545" r="1"></circle><circle cx="53.5" cy="103.273" r="1"></circle><circle cx="53.5" cy="126.091" r="1"></circle><circle cx="53.5" cy="148.909" r="1"></circle><circle cx="53.5" cy="171.727" r="1"></circle><circle cx="53.5" cy="194.545" r="1"></circle><circle cx="53.5" cy="217.364" r="1"></circle><circle cx="53.5" cy="240.182" r="1"></circle><circle cx="53.5" cy="263" r="1"></circle><circle cx="73.5" cy="12" r="1"></circle><circle cx="73.5" cy="34.8182" r="1"></circle><circle cx="73.5" cy="57.6364" r="1"></circle><circle cx="73.5" cy="80.4545" r="1"></circle><circle cx="73.5" cy="103.273" r="1"></circle><circle cx="73.5" cy="126.091" r="1"></circle><circle cx="73.5" cy="148.909" r="1"></circle><circle cx="73.5" cy="171.727" r="1"></circle><circle cx="73.5" cy="194.545" r="1"></circle><circle cx="73.5" cy="217.364" r="1"></circle><circle cx="73.5" cy="240.182" r="1"></circle><circle cx="73.5" cy="263" r="1"></circle><circle cx="93.5" cy="12" r="1"></circle><circle cx="93.5" cy="34.8182" r="1"></circle><circle cx="93.5" cy="57.6364" r="1"></circle><circle cx="93.5" cy="80.4545" r="1"></circle><circle cx="93.5" cy="103.273" r="1"></circle><circle cx="93.5" cy="126.091" r="1"></circle><circle cx="93.5" cy="148.909" r="1"></circle><circle cx="93.5" cy="171.727" r="1"></circle><circle cx="93.5" cy="194.545" r="1"></circle><circle cx="93.5" cy="217.364" r="1"></circle><circle cx="93.5" cy="240.182" r="1"></circle><circle cx="93.5" cy="263" r="1"></circle><circle cx="113.5" cy="12" r="1"></circle><circle cx="113.5" cy="34.8182" r="1"></circle><circle cx="113.5" cy="57.6364" r="1"></circle><circle cx="113.5" cy="80.4545" r="1"></circle><circle cx="113.5" cy="103.273" r="1"></circle><circle cx="113.5" cy="126.091" r="1"></circle><circle cx="113.5" cy="148.909" r="1"></circle><circle cx="113.5" cy="171.727" r="1"></circle><circle cx="113.5" cy="194.545" r="1"></circle><circle cx="113.5" cy="217.364" r="1"></circle><circle cx="113.5" cy="240.182" r="1"></circle><circle cx="113.5" cy="263" r="1"></circle><circle cx="133.5" cy="12" r="1"></circle><circle cx="133.5" cy="34.8182" r="1"></circle><circle cx="133.5" cy="57.6364" r="1"></circle><circle cx="133.5" cy="80.4545" r="1"></circle><circle cx="133.5" cy="103.273" r="1"></circle><circle cx="133.5" cy="126.091" r="1"></circle><circle cx="133.5" cy="148.909" r="1"></circle><circle cx="133.5" cy="171.727" r="1"></circle><circle cx="133.5" cy="194.545" r="1"></circle><circle cx="133.5" cy="217.364" r="1"></circle><circle cx="133.5" cy="240.182" r="1"></circle><circle cx="133.5" cy="263" r="1"></circle><circle cx="153.5" cy="12" r="1"></circle><circle cx="153.5" cy="34.8182" r="1"></circle><circle cx="153.5" cy="57.6364" r="1"></circle><circle cx="153.5" cy="80.4545" r="1"></circle><circle cx="153.5" cy="103.273" r="1"></circle><circle cx="153.5" cy="126.091" r="1"></circle><circle cx="153.5" cy="148.909" r="1"></circle><circle cx="153.5" cy="171.727" r="1"></circle><circle cx="153.5" cy="194.545" r="1"></circle><circle cx="153.5" cy="217.364" r="1"></circle><circle cx="153.5" cy="240.182" r="1"></circle><circle cx="153.5" cy="263" r="1"></circle><circle cx="173.5" cy="12" r="1"></circle><circle cx="173.5" cy="34.8182" r="1"></circle><circle cx="173.5" cy="57.6364" r="1"></circle><circle cx="173.5" cy="80.4545" r="1"></circle><circle cx="173.5" cy="103.273" r="1"></circle><circle cx="173.5" cy="126.091" r="1"></circle><circle cx="173.5" cy="148.909" r="1"></circle><circle cx="173.5" cy="171.727" r="1"></circle><circle cx="173.5" cy="194.545" r="1"></circle><circle cx="173.5" cy="217.364" r="1"></circle><circle cx="173.5" cy="240.182" r="1"></circle><circle cx="173.5" cy="263" r="1"></circle><circle cx="193.5" cy="12" r="1"></circle><circle cx="193.5" cy="34.8182" r="1"></circle><circle cx="193.5" cy="57.6364" r="1"></circle><circle cx="193.5" cy="80.4545" r="1"></circle><circle cx="193.5" cy="103.273" r="1"></circle><circle cx="193.5" cy="126.091" r="1"></circle><circle cx="193.5" cy="148.909" r="1"></circle><circle cx="193.5" cy="171.727" r="1"></circle><circle cx="193.5" cy="194.545" r="1"></circle><circle cx="193.5" cy="217.364" r="1"></circle><circle cx="193.5" cy="240.182" r="1"></circle><circle cx="193.5" cy="263" r="1"></circle><circle cx="213.5" cy="12" r="1"></circle><circle cx="213.5" cy="34.8182" r="1"></circle><circle cx="213.5" cy="57.6364" r="1"></circle><circle cx="213.5" cy="80.4545" r="1"></circle><circle cx="213.5" cy="103.273" r="1"></circle><circle cx="213.5" cy="126.091" r="1"></circle><circle cx="213.5" cy="148.909" r="1"></circle><circle cx="213.5" cy="171.727" r="1"></circle><circle cx="213.5" cy="194.545" r="1"></circle><circle cx="213.5" cy="217.364" r="1"></circle><circle cx="213.5" cy="240.182" r="1"></circle><circle cx="213.5" cy="263" r="1"></circle><circle cx="233.5" cy="12" r="1"></circle><circle cx="233.5" cy="34.8182" r="1"></circle><circle cx="233.5" cy="57.6364" r="1"></circle><circle cx="233.5" cy="80.4545" r="1"></circle><circle cx="233.5" cy="103.273" r="1"></circle><circle cx="233.5" cy="126.091" r="1"></circle><circle cx="233.5" cy="148.909" r="1"></circle><circle cx="233.5" cy="171.727" r="1"></circle><circle cx="233.5" cy="194.545" r="1"></circle><circle cx="233.5" cy="217.364" r="1"></circle><circle cx="233.5" cy="240.182" r="1"></circle><circle cx="233.5" cy="263" r="1"></circle><circle cx="253.5" cy="12" r="1"></circle><circle cx="253.5" cy="34.8182" r="1"></circle><circle cx="253.5" cy="57.6364" r="1"></circle><circle cx="253.5" cy="80.4545" r="1"></circle><circle cx="253.5" cy="103.273" r="1"></circle><circle cx="253.5" cy="126.091" r="1"></circle><circle cx="253.5" cy="148.909" r="1"></circle><circle cx="253.5" cy="171.727" r="1"></circle><circle cx="253.5" cy="194.545" r="1"></circle><circle cx="253.5" cy="217.364" r="1"></circle><circle cx="253.5" cy="240.182" r="1"></circle><circle cx="253.5" cy="263" r="1"></circle><circle cx="273.5" cy="12" r="1"></circle><circle cx="273.5" cy="34.8182" r="1"></circle><circle cx="273.5" cy="57.6364" r="1"></circle><circle cx="273.5" cy="80.4545" r="1"></circle><circle cx="273.5" cy="103.273" r="1"></circle><circle cx="273.5" cy="126.091" r="1"></circle><circle cx="273.5" cy="148.909" r="1"></circle><circle cx="273.5" cy="171.727" r="1"></circle><circle cx="273.5" cy="194.545" r="1"></circle><circle cx="273.5" cy="217.364" r="1"></circle><circle cx="273.5" cy="240.182" r="1"></circle><circle cx="273.5" cy="263" r="1"></circle><circle cx="293.5" cy="12" r="1"></circle><circle cx="293.5" cy="34.8182" r="1"></circle><circle cx="293.5" cy="57.6364" r="1"></circle><circle cx="293.5" cy="80.4545" r="1"></circle><circle cx="293.5" cy="103.273" r="1"></circle><circle cx="293.5" cy="126.091" r="1"></circle><circle cx="293.5" cy="148.909" r="1"></circle><circle cx="293.5" cy="171.727" r="1"></circle><circle cx="293.5" cy="194.545" r="1"></circle><circle cx="293.5" cy="217.364" r="1"></circle><circle cx="293.5" cy="240.182" r="1"></circle><circle cx="293.5" cy="263" r="1"></circle><circle cx="313.5" cy="12" r="1"></circle><circle cx="313.5" cy="34.8182" r="1"></circle><circle cx="313.5" cy="57.6364" r="1"></circle><circle cx="313.5" cy="80.4545" r="1"></circle><circle cx="313.5" cy="103.273" r="1"></circle><circle cx="313.5" cy="126.091" r="1"></circle><circle cx="313.5" cy="148.909" r="1"></circle><circle cx="313.5" cy="171.727" r="1"></circle><circle cx="313.5" cy="194.545" r="1"></circle><circle cx="313.5" cy="217.364" r="1"></circle><circle cx="313.5" cy="240.182" r="1"></circle><circle cx="313.5" cy="263" r="1"></circle></svg></div><canvas class="Art-module__QRr6PW__Canvas"></canvas><div class="Art-module__QRr6PW__tenX"><svg width="9" height="7" viewBox="0 0 9 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 7V0H1V1H2V2H3V3H4V4H3V5H2V6H1V7H0Z"></path><path d="M5 7V0H6V1H7V2H8V3H9V4H8V5H7V6H6V7H5Z"></path></svg><div class="text-smallcaps">10x</div></div></div><div class="Art-module__QRr6PW__right"></div></div><div class="Art-module__QRr6PW__bottom"></div></div><div class="FeaturedPost-module__8Dh16G__copy"><a class="FeaturedPost-module__8Dh16G__copyLink" target="_blank" href="/blog/building-a-data-plane-from-scratch-stripes-own-high-performance-distributed-proxy"><div class="text-md FeaturedPost-module__8Dh16G__title" data-testid="featured-post-title"><span class="FeaturedPost-module__8Dh16G__highlight">Building a data plane from scratch: Stripe’s own high-performance distributed proxy<span class="FeaturedPost-module__8Dh16G__arrow"><svg viewBox="0 0 6 6" fill="none" xmlns="http://www.w3.org/2000/svg"><rect y="5" width="1" height="1" fill="currentColor"></rect><rect x="1" y="4" width="1" height="1" fill="currentColor"></rect><rect x="2" y="3" width="1" height="1" fill="currentColor"></rect><rect x="3" y="2" width="1" height="1" fill="currentColor"></rect><rect x="4" y="1" width="1" height="1" fill="currentColor"></rect><rect x="5" width="1" height="6" fill="currentColor"></rect><rect width="6" height="1" fill="currentColor"></rect></svg></span></span></div><div class="text-sm FeaturedPost-module__8Dh16G__body" data-testid="featured-post-summary"><span class="FeaturedPost-module__8Dh16G__bodyHighlight">To minimize failed payments for our users, Stripe targets 99.9995% reliability. As traffic grew beyond 1.6% of global GDP, this put intense strain...</span><div class="FeaturedPost-module__8Dh16G__tags"><div class="text-smallcaps Tag-module__zQcxqq__tag FeaturedPost-module__8Dh16G__tagHighlight">Engineering</div><div class="text-smallcaps Tag-module__zQcxqq__tag FeaturedPost-module__8Dh16G__tagHighlight">Infrastructure</div></div></div></a></div></div><div class="FeaturedPost-module__8Dh16G__post FeaturedPost-module__8Dh16G__separator" data-testid="featured-post-card"><div class="Art-module__QRr6PW__Art FeaturedPost-module__8Dh16G__image" data-testid="artwork" draggable="false" style="-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;touch-action:pan-y"><div class="Art-module__QRr6PW__Chrome"><div class="Art-module__QRr6PW__dragline"></div><div class="Art-module__QRr6PW__fig text-smallcaps">[ <!-- -->Fig. 2<!-- --> ]</div><div class="Art-module__QRr6PW__dragline"></div><a href="/art/index.html?config=%7B%22ampX%22:1.9396925493329764,%22ampY%22:2.2,%22aspectRatio%22:1.6918080194145442,%22axis%22:%22xy%22,%22lump%22:2.787520623873919,%22count%22:180,%22freq%22:4.40652204734087,%22isDial%22:false,%22isLineart%22:false,%22isRing%22:true,%22isSpiral%22:false,%22left%22:-7,%22mouseX%22:0.2754157068183646,%22mouseY%22:0.41637367344647647,%22noise%22:0,%22scale%22:1.2861224984526634,%22shape%22:%22rect%22,%22top%22:-17,%22twirl%22:0,%22twist%22:6.139713340558112,%22velocity%22:0.493984429679811,%22isBalls%22:false,%22isMatrix%22:false,%22kaleids%22:2.9024114716798066%7D" target="_blank" aria-label="Open art controls"><svg class="Art-module__QRr6PW__propsIcon" width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M-8.74228e-08 10L8 10L8 9L11 9L11 10L12 10L12 11L11 11L11 12L8 12L8 11L-4.37113e-08 11L-8.74228e-08 10ZM-3.93402e-07 3L-4.37114e-07 2L8 2L8 1L11 1L11 2L12 2L12 3L11 3L11 4L8 4L8 3L-3.93402e-07 3ZM1 6L-2.62268e-07 6L-2.18557e-07 7L1 7L1 8L4 8L4 7L12 7L12 6L4 6L4 5L1 5L1 6ZM9 2L10 2L10 3L9 3L9 2ZM10 10L9 10L9 11L10 11L10 10ZM2 6L3 6L3 7L2 7L2 6Z"></path></svg></a></div><div class="Art-module__QRr6PW__row2"><div class="Art-module__QRr6PW__left"></div><div class="Art-module__QRr6PW__canvasContainer"><div class="Art-module__QRr6PW__background"><svg width="326" height="276" viewBox="0 0 326 276" xmlns="http://www.w3.org/2000/svg"><circle cx="13.5" cy="12" r="1"></circle><circle cx="13.5" cy="34.8182" r="1"></circle><circle cx="13.5" cy="57.6364" r="1"></circle><circle cx="13.5" cy="80.4545" r="1"></circle><circle cx="13.5" cy="103.273" r="1"></circle><circle cx="13.5" cy="126.091" r="1"></circle><circle cx="13.5" cy="148.909" r="1"></circle><circle cx="13.5" cy="171.727" r="1"></circle><circle cx="13.5" cy="194.545" r="1"></circle><circle cx="13.5" cy="217.364" r="1"></circle><circle cx="13.5" cy="240.182" r="1"></circle><circle cx="13.5" cy="263" r="1"></circle><circle cx="33.5" cy="12" r="1"></circle><circle cx="33.5" cy="34.8182" r="1"></circle><circle cx="33.5" cy="57.6364" r="1"></circle><circle cx="33.5" cy="80.4545" r="1"></circle><circle cx="33.5" cy="103.273" r="1"></circle><circle cx="33.5" cy="126.091" r="1"></circle><circle cx="33.5" cy="148.909" r="1"></circle><circle cx="33.5" cy="171.727" r="1"></circle><circle cx="33.5" cy="194.545" r="1"></circle><circle cx="33.5" cy="217.364" r="1"></circle><circle cx="33.5" cy="240.182" r="1"></circle><circle cx="33.5" cy="263" r="1"></circle><circle cx="53.5" cy="12" r="1"></circle><circle cx="53.5" cy="34.8182" r="1"></circle><circle cx="53.5" cy="57.6364" r="1"></circle><circle cx="53.5" cy="80.4545" r="1"></circle><circle cx="53.5" cy="103.273" r="1"></circle><circle cx="53.5" cy="126.091" r="1"></circle><circle cx="53.5" cy="148.909" r="1"></circle><circle cx="53.5" cy="171.727" r="1"></circle><circle cx="53.5" cy="194.545" r="1"></circle><circle cx="53.5" cy="217.364" r="1"></circle><circle cx="53.5" cy="240.182" r="1"></circle><circle cx="53.5" cy="263" r="1"></circle><circle cx="73.5" cy="12" r="1"></circle><circle cx="73.5" cy="34.8182" r="1"></circle><circle cx="73.5" cy="57.6364" r="1"></circle><circle cx="73.5" cy="80.4545" r="1"></circle><circle cx="73.5" cy="103.273" r="1"></circle><circle cx="73.5" cy="126.091" r="1"></circle><circle cx="73.5" cy="148.909" r="1"></circle><circle cx="73.5" cy="171.727" r="1"></circle><circle cx="73.5" cy="194.545" r="1"></circle><circle cx="73.5" cy="217.364" r="1"></circle><circle cx="73.5" cy="240.182" r="1"></circle><circle cx="73.5" cy="263" r="1"></circle><circle cx="93.5" cy="12" r="1"></circle><circle cx="93.5" cy="34.8182" r="1"></circle><circle cx="93.5" cy="57.6364" r="1"></circle><circle cx="93.5" cy="80.4545" r="1"></circle><circle cx="93.5" cy="103.273" r="1"></circle><circle cx="93.5" cy="126.091" r="1"></circle><circle cx="93.5" cy="148.909" r="1"></circle><circle cx="93.5" cy="171.727" r="1"></circle><circle cx="93.5" cy="194.545" r="1"></circle><circle cx="93.5" cy="217.364" r="1"></circle><circle cx="93.5" cy="240.182" r="1"></circle><circle cx="93.5" cy="263" r="1"></circle><circle cx="113.5" cy="12" r="1"></circle><circle cx="113.5" cy="34.8182" r="1"></circle><circle cx="113.5" cy="57.6364" r="1"></circle><circle cx="113.5" cy="80.4545" r="1"></circle><circle cx="113.5" cy="103.273" r="1"></circle><circle cx="113.5" cy="126.091" r="1"></circle><circle cx="113.5" cy="148.909" r="1"></circle><circle cx="113.5" cy="171.727" r="1"></circle><circle cx="113.5" cy="194.545" r="1"></circle><circle cx="113.5" cy="217.364" r="1"></circle><circle cx="113.5" cy="240.182" r="1"></circle><circle cx="113.5" cy="263" r="1"></circle><circle cx="133.5" cy="12" r="1"></circle><circle cx="133.5" cy="34.8182" r="1"></circle><circle cx="133.5" cy="57.6364" r="1"></circle><circle cx="133.5" cy="80.4545" r="1"></circle><circle cx="133.5" cy="103.273" r="1"></circle><circle cx="133.5" cy="126.091" r="1"></circle><circle cx="133.5" cy="148.909" r="1"></circle><circle cx="133.5" cy="171.727" r="1"></circle><circle cx="133.5" cy="194.545" r="1"></circle><circle cx="133.5" cy="217.364" r="1"></circle><circle cx="133.5" cy="240.182" r="1"></circle><circle cx="133.5" cy="263" r="1"></circle><circle cx="153.5" cy="12" r="1"></circle><circle cx="153.5" cy="34.8182" r="1"></circle><circle cx="153.5" cy="57.6364" r="1"></circle><circle cx="153.5" cy="80.4545" r="1"></circle><circle cx="153.5" cy="103.273" r="1"></circle><circle cx="153.5" cy="126.091" r="1"></circle><circle cx="153.5" cy="148.909" r="1"></circle><circle cx="153.5" cy="171.727" r="1"></circle><circle cx="153.5" cy="194.545" r="1"></circle><circle cx="153.5" cy="217.364" r="1"></circle><circle cx="153.5" cy="240.182" r="1"></circle><circle cx="153.5" cy="263" r="1"></circle><circle cx="173.5" cy="12" r="1"></circle><circle cx="173.5" cy="34.8182" r="1"></circle><circle cx="173.5" cy="57.6364" r="1"></circle><circle cx="173.5" cy="80.4545" r="1"></circle><circle cx="173.5" cy="103.273" r="1"></circle><circle cx="173.5" cy="126.091" r="1"></circle><circle cx="173.5" cy="148.909" r="1"></circle><circle cx="173.5" cy="171.727" r="1"></circle><circle cx="173.5" cy="194.545" r="1"></circle><circle cx="173.5" cy="217.364" r="1"></circle><circle cx="173.5" cy="240.182" r="1"></circle><circle cx="173.5" cy="263" r="1"></circle><circle cx="193.5" cy="12" r="1"></circle><circle cx="193.5" cy="34.8182" r="1"></circle><circle cx="193.5" cy="57.6364" r="1"></circle><circle cx="193.5" cy="80.4545" r="1"></circle><circle cx="193.5" cy="103.273" r="1"></circle><circle cx="193.5" cy="126.091" r="1"></circle><circle cx="193.5" cy="148.909" r="1"></circle><circle cx="193.5" cy="171.727" r="1"></circle><circle cx="193.5" cy="194.545" r="1"></circle><circle cx="193.5" cy="217.364" r="1"></circle><circle cx="193.5" cy="240.182" r="1"></circle><circle cx="193.5" cy="263" r="1"></circle><circle cx="213.5" cy="12" r="1"></circle><circle cx="213.5" cy="34.8182" r="1"></circle><circle cx="213.5" cy="57.6364" r="1"></circle><circle cx="213.5" cy="80.4545" r="1"></circle><circle cx="213.5" cy="103.273" r="1"></circle><circle cx="213.5" cy="126.091" r="1"></circle><circle cx="213.5" cy="148.909" r="1"></circle><circle cx="213.5" cy="171.727" r="1"></circle><circle cx="213.5" cy="194.545" r="1"></circle><circle cx="213.5" cy="217.364" r="1"></circle><circle cx="213.5" cy="240.182" r="1"></circle><circle cx="213.5" cy="263" r="1"></circle><circle cx="233.5" cy="12" r="1"></circle><circle cx="233.5" cy="34.8182" r="1"></circle><circle cx="233.5" cy="57.6364" r="1"></circle><circle cx="233.5" cy="80.4545" r="1"></circle><circle cx="233.5" cy="103.273" r="1"></circle><circle cx="233.5" cy="126.091" r="1"></circle><circle cx="233.5" cy="148.909" r="1"></circle><circle cx="233.5" cy="171.727" r="1"></circle><circle cx="233.5" cy="194.545" r="1"></circle><circle cx="233.5" cy="217.364" r="1"></circle><circle cx="233.5" cy="240.182" r="1"></circle><circle cx="233.5" cy="263" r="1"></circle><circle cx="253.5" cy="12" r="1"></circle><circle cx="253.5" cy="34.8182" r="1"></circle><circle cx="253.5" cy="57.6364" r="1"></circle><circle cx="253.5" cy="80.4545" r="1"></circle><circle cx="253.5" cy="103.273" r="1"></circle><circle cx="253.5" cy="126.091" r="1"></circle><circle cx="253.5" cy="148.909" r="1"></circle><circle cx="253.5" cy="171.727" r="1"></circle><circle cx="253.5" cy="194.545" r="1"></circle><circle cx="253.5" cy="217.364" r="1"></circle><circle cx="253.5" cy="240.182" r="1"></circle><circle cx="253.5" cy="263" r="1"></circle><circle cx="273.5" cy="12" r="1"></circle><circle cx="273.5" cy="34.8182" r="1"></circle><circle cx="273.5" cy="57.6364" r="1"></circle><circle cx="273.5" cy="80.4545" r="1"></circle><circle cx="273.5" cy="103.273" r="1"></circle><circle cx="273.5" cy="126.091" r="1"></circle><circle cx="273.5" cy="148.909" r="1"></circle><circle cx="273.5" cy="171.727" r="1"></circle><circle cx="273.5" cy="194.545" r="1"></circle><circle cx="273.5" cy="217.364" r="1"></circle><circle cx="273.5" cy="240.182" r="1"></circle><circle cx="273.5" cy="263" r="1"></circle><circle cx="293.5" cy="12" r="1"></circle><circle cx="293.5" cy="34.8182" r="1"></circle><circle cx="293.5" cy="57.6364" r="1"></circle><circle cx="293.5" cy="80.4545" r="1"></circle><circle cx="293.5" cy="103.273" r="1"></circle><circle cx="293.5" cy="126.091" r="1"></circle><circle cx="293.5" cy="148.909" r="1"></circle><circle cx="293.5" cy="171.727" r="1"></circle><circle cx="293.5" cy="194.545" r="1"></circle><circle cx="293.5" cy="217.364" r="1"></circle><circle cx="293.5" cy="240.182" r="1"></circle><circle cx="293.5" cy="263" r="1"></circle><circle cx="313.5" cy="12" r="1"></circle><circle cx="313.5" cy="34.8182" r="1"></circle><circle cx="313.5" cy="57.6364" r="1"></circle><circle cx="313.5" cy="80.4545" r="1"></circle><circle cx="313.5" cy="103.273" r="1"></circle><circle cx="313.5" cy="126.091" r="1"></circle><circle cx="313.5" cy="148.909" r="1"></circle><circle cx="313.5" cy="171.727" r="1"></circle><circle cx="313.5" cy="194.545" r="1"></circle><circle cx="313.5" cy="217.364" r="1"></circle><circle cx="313.5" cy="240.182" r="1"></circle><circle cx="313.5" cy="263" r="1"></circle></svg></div><canvas class="Art-module__QRr6PW__Canvas"></canvas><div class="Art-module__QRr6PW__tenX"><svg width="9" height="7" viewBox="0 0 9 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 7V0H1V1H2V2H3V3H4V4H3V5H2V6H1V7H0Z"></path><path d="M5 7V0H6V1H7V2H8V3H9V4H8V5H7V6H6V7H5Z"></path></svg><div class="text-smallcaps">10x</div></div></div><div class="Art-module__QRr6PW__right"></div></div><div class="Art-module__QRr6PW__bottom"></div></div><div class="FeaturedPost-module__8Dh16G__copy"><a class="FeaturedPost-module__8Dh16G__copyLink" target="_blank" href="/blog/how-we-built-it-real-time-analytics-for-stripe-billing"><div class="text-md FeaturedPost-module__8Dh16G__title" data-testid="featured-post-title"><span class="FeaturedPost-module__8Dh16G__highlight">How we built it: Real-time analytics for Stripe Billing<span class="FeaturedPost-module__8Dh16G__arrow"><svg viewBox="0 0 6 6" fill="none" xmlns="http://www.w3.org/2000/svg"><rect y="5" width="1" height="1" fill="currentColor"></rect><rect x="1" y="4" width="1" height="1" fill="currentColor"></rect><rect x="2" y="3" width="1" height="1" fill="currentColor"></rect><rect x="3" y="2" width="1" height="1" fill="currentColor"></rect><rect x="4" y="1" width="1" height="1" fill="currentColor"></rect><rect x="5" width="1" height="6" fill="currentColor"></rect><rect width="6" height="1" fill="currentColor"></rect></svg></span></span></div><div class="text-sm FeaturedPost-module__8Dh16G__body" data-testid="featured-post-summary"><span class="FeaturedPost-module__8Dh16G__bodyHighlight">Among global business leaders surveyed, 84% agree that adapting pricing quickly will be a key competitive advantage. Our new real-time analytics...</span><div class="FeaturedPost-module__8Dh16G__tags"><div class="text-smallcaps Tag-module__zQcxqq__tag FeaturedPost-module__8Dh16G__tagHighlight">Billing</div><div class="text-smallcaps Tag-module__zQcxqq__tag FeaturedPost-module__8Dh16G__tagHighlight">Infrastructure</div><div class="text-smallcaps Tag-module__zQcxqq__tag FeaturedPost-module__8Dh16G__tagHighlight">Engineering</div></div></div></a></div></div></section><section class="section-module__Yglhya__section Footer-module__Grjkva__section"><div class="Footer-module__Grjkva__backgroundIcons"><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg></div><div class="Footer-module__Grjkva__docsSection"><div class="TableHeader-module__qdaoaq__label Footer-module__Grjkva__docsLabel text-smallcaps"><span>/</span>Docs</div><p class="text-sm Footer-module__Grjkva__docsDescription">Explore our guides and examples to integrate Stripe.</p><a target="_blank" class="buttonSm Footer-module__Grjkva__docsButton" href="https://docs.stripe.com">Learn more</a></div><div class="Footer-module__Grjkva__linksSection"><div class="TableHeader-module__qdaoaq__label Footer-module__Grjkva__linksLabel text-smallcaps"><span>/</span>Social</div><div class="Footer-module__Grjkva__linkList"><a href="https://www.youtube.com/stripedevelopers" class="text-smallcaps Tag-module__zQcxqq__tag" target="_blank">Youtube</a><a href="https://x.com/stripedev" class="text-smallcaps Tag-module__zQcxqq__tag" target="_blank">Twitter/X</a><a href="https://discord.com/channels/841573134531821608/841573134531821612" class="text-smallcaps Tag-module__zQcxqq__tag" target="_blank">Discord</a></div><div class="TableHeader-module__qdaoaq__label Footer-module__Grjkva__resourcesLabel text-smallcaps"><span>/</span>Resources</div><div class="Footer-module__Grjkva__linkList"><a href="https://docs.stripe.com" class="text-smallcaps Tag-module__zQcxqq__tag" target="_blank">Docs</a><a href="https://www.meetup.com/pro/stripe/" class="text-smallcaps Tag-module__zQcxqq__tag" target="_blank">Developer Meetups</a></div></div><div class="Footer-module__Grjkva__backgroundIcons Footer-module__Grjkva__backgroundIconsSecondRow"><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg></div><div class="Footer-module__Grjkva__copyright"><div class="GlobeIcon-module__AdM6KG__icon"><canvas class="GlobeIcon-module__AdM6KG__ellipseCanvas"></canvas><svg width="85" height="42" viewBox="0 0 83 42" fill="none"><circle cx="63" cy="21" r="19.5" stroke="var(--globeGraphicColor)"></circle><circle cx="19.5" cy="21" r="19.5" stroke="var(--globeGraphicColor)"></circle><path d="M3.5 9.75 35 9.75" stroke="var(--globeGraphicColor)"></path><path d="M0 21 39 21" stroke="var(--globeGraphicColor)"></path><path d="M3 32 35 32.5" stroke="var(--globeGraphicColor)"></path><path d="M54.096 16.056H57.948V16.788H58.68V17.532H59.424V24.336H58.68V25.08H57.948V25.836H54.096V16.056ZM57.816 24.948V24.216H58.56V17.664H57.816V16.92H54.984V24.948H57.816ZM60.336 16.056H65.664V16.92H61.224V20.496H64.92V21.372H61.224V24.948H65.664V25.836H60.336V16.056ZM68.076 22.116H67.332V19.152H66.576V16.056H67.464V19.02H68.196V21.984H68.94V24.216H69.552V21.984H70.296V19.02H71.04V16.056H71.904V19.152H71.16V22.116H70.428V24.336H69.684V25.836H68.808V24.336H68.076V22.116Z" fill="var(--globeGraphicColor)"></path></svg></div><span class="text-smallcaps">© <!-- -->2026<!-- --> Stripe, Inc.</span></div><div class="Footer-module__Grjkva__miscList Footer-module__Grjkva__linkList"><a href="https://stripe.com/privacy" class="text-smallcaps Tag-module__zQcxqq__tag" target="_blank">Privacy</a><a href="https://stripe.com/legal" class="text-smallcaps Tag-module__zQcxqq__tag" target="_blank">Legal</a><a href="https://stripe.com" class="text-smallcaps Tag-module__zQcxqq__tag" target="_blank">Stripe.com</a></div><div class="Footer-module__Grjkva__backgroundIcons"><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg><svg class="Footer-module__Grjkva__backgroundIcon BackgroundIcon-module__GtvU_G__icon" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 4.5V8H4.5V4.5H8V3.5H4.5V0H3.5V3.5H0V4.5H3.5Z" fill="currentColor"></path></svg></div></section><div class="EndlessFooter-module__1AI9IW__footer"><canvas class="EndlessFooter-module__1AI9IW__canvas"></canvas></div><div class="Console-module__X7eFnq__viewport"></div></div><!--$--><!--/$--></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"postData":{"slug":"how-stripes-document-databases-supported-99.999-uptime-with-zero-downtime-data-migrations","title":"How Stripe’s document databases supported 99.999% uptime with zero-downtime data migrations ","summary":"In this blog post we’ll share an overview of Stripe’s database infrastructure and discuss the design and application of the Data Movement Platform.","authors":["Jimmy Morzaria","Suraj Narkhede"],"date":"2024-06-06","location":[],"type":"Blog","topics":["Infrastructure","Engineering"],"artConfig":{"ampX":0.9568483278900385,"ampY":0.8432718716599047,"aspectRatio":0.8587627440901473,"axis":"xy","lump":-0.01795910948887467,"count":105,"freq":0.6620622467249633,"isDial":false,"isLineart":false,"isRing":true,"isSpiral":false,"left":31,"mouseX":0.8779975873460993,"mouseY":0.5441230994854122,"noise":0.008773796338587998,"scale":0.4291511720865965,"shape":"rect","top":-51,"twirl":0.5402620467543602,"twist":1.1264030070751907,"velocity":0.3,"isBalls":false,"isMatrix":false,"kaleids":6.969713980071246},"content":"\nIn 2023, Stripe processed $1 trillion in total payments volume, all while maintaining an uptime of 99.999%. We obsess over reliability. As engineers on the database infrastructure team, we provide a database-as-a-service (DBaaS) called DocDB as a foundation layer for our APIs.\n\nStripe’s DocDB is an extension of MongoDB Community—a popular open-source database—and consists of a set of services that we built in-house. It serves over five million queries per second from Stripe’s product applications. Our deployment is also highly customized to provide low latency and diverse access, with 10,000+ distinct query shapes over petabytes of important financial data that lives in 5,000+ collections distributed over 2,000+ database shards.\n\nWe chose to build DocDB on top of MongoDB Community because of the flexibility of its document model and its ability to handle massive volumes of real-time data at scale. MongoDB Atlas didn’t exist in 2011, so we built a self-managed cluster of MongoDB instances running in the cloud.\n\nAt the heart of DocDB is the Data Movement Platform. Built originally as a horizontal scaling solution to overcome vertical scaling limits of MongoDB compute and storage, we customized it to serve multiple purposes: merging underutilized database shards for improved utilization and efficiency, upgrading the major version of the database engine in our fleet for reliability, and transitioning databases from a multitenant arrangement to single tenancy for large users.\n\nThe Data Movement Platform enabled our transition from running a small number of database shards (each with tens of terabytes of data) to thousands of database shards (each with a fraction of the original data). It also provides client-transparent migrations with zero downtime, which makes it possible to build a highly elastic DBaaS offering. DocDB can split database shards during traffic surges and consolidate thousands of databases through bin packing when traffic is low.\n\nIn this blog post we’ll share an overview of Stripe’s database infrastructure, and discuss the design and application of the Data Movement Platform.\n\n### How we built our database infrastructure\n\nWhen Stripe launched in 2011, we chose MongoDB as our online database because it offered better developer productivity than standard relational databases. On top of MongoDB, we wanted to operate a robust database infrastructure that prioritized the reliability of our APIs, but we could not find an off-the-shelf DBaaS that met our requirements:\n\n- Meeting the highest standards of availability, durability, and performance\n- Exposing a minimal set of database functions to avert self-inflicted issues due to suboptimal queries from client applications\n- Supporting horizontal scalability with sharding\n- Offering first-class support for multitenancy with enforced quotas\n- Providing strong security through enforcement of authorization policies\n\nThe solution was to build DocDB—with MongoDB as the underlying storage engine—a truly elastic and scalable DBaaS, with online data migrations at its core.\n\nProduct applications at Stripe access data in their database through a fleet of database proxy servers, which we developed in-house in Go to enforce concerns of reliability, scalability, admission control, and access control. As a mechanism to horizontally scale, we made the key architectural decision to employ sharding. (If you want to learn more about database sharding, this is a helpful [primer](https://www.mongodb.com/resources/products/capabilities/database-sharding-explained).)\n\nThousands of database shards, each housing a small chunk of the cumulative data, now underlie all of Stripe’s products. When an application sends a query to a database proxy server, it parses the query, routes it to one or more shards, combines the results from the shards, and returns them back to the application.\n\nBut how do database proxy servers know which among thousands of shards to route the query to? They rely on a chunk metadata service that maps chunks to database shards, making it easy to look up the relevant shards for a given query. In line with typical database infrastructure stacks, change events resulting from writes to the database are transported to streaming software systems, and eventually archived in an object store via the change data capture (CDC) pipeline.\n\n\n\u003e High-level overview of Stripe’s database infrastructure\n\nAt the product application level, teams at Stripe use the in-house document database control plane to provision a logical container for their data—referred to as a logical database—housing one or more DocDB collections, and each comprising documents that have a related purpose. Data in these DocDB collections is distributed across several databases (referred to as physical databases), each of which is home to a small chunk of the collection. Physical databases on DocDB live on shards deployed as replica sets that comprise a primary node and several secondary nodes with replication and automated failover.\n\n\n\u003e A sharded collection\n\n### How we designed the Data Movement Platform\n\nIn order to build a DBaaS offering that is horizontally scalable and highly elastic—one that can scale in and out with the needs of the product applications—we needed the ability to migrate data across database shards in a client-transparent manner with zero downtime. This is a complex distributed systems problem, one that is further compounded by the unique requirements of important financial data:\n\n- **Data consistency and completeness:** We need to ensure that the data being migrated remains consistent and complete across both the source and target shards.\n- **Availability:** Prolonged downtime during data migration is unacceptable, as millions of businesses count on Stripe to accept payments from their customers 24 hours a day. Our goal is to keep the key phase of the migration process shorter than the duration of a planned database primary failover—typically lasting a few seconds, and in line with the retry budget of our product applications.\n- **Granularity and adaptability:** At Stripe’s scale, we need to support the migration of an arbitrary number of chunks of data from any number of sources to target shards—with no restrictions on the number of in-flight database chunk migrations in the fleet, and no restrictions on the number of migrations any given shard can participate in at any point in time. We also need to accommodate the migration of chunks of varying sizes at a high throughput, as several of our database shards contain terabytes of data.\n- **No performance impact to source shard:** When we migrate database chunks across shards, our goal is to preserve the performance and throughput of the source shard to preclude any adverse impact on performance and available throughput for user queries.\n\nTo address these requirements, we built the Data Movement Platform to manage online data migrations across database shards by invoking purpose-built services.\n\n\n\u003e Data Movement Platform within our database infrastructure stack\n\nThe Coordinator component in the Data Movement Platform is responsible for orchestrating the various steps involved in online data migrations—it invokes the relevant services to accomplish each of the constituent steps outlined below:\n\n#### Step 1: Chunk migration registration\n\nFirst we register the intent to migrate database chunks from their source shards to arbitrary target shards in the chunk metadata service. Subsequently, we build indexes on the target shards for the chunks being migrated.\n\n#### Step 2: Bulk data import\n\nNext, we use a snapshot of the chunks on the source shards at a specific time, denoted as time T, to load the data onto one or more database shards. The service responsible for performing bulk data import accepts various data filters, and only imports the chunks of data that satisfy the filtering criteria. While this step appeared simple at first, we encountered throughput limitations when bulk loading data onto a DocDB shard. Despite attempts to address this by batching writes and adjusting DocDB engine parameters for optimal bulk data ingestion, we had little success.\n\nHowever, we achieved a significant breakthrough when we explored methods to optimize our insertion order, taking advantage of the fact that DocDB arranges its data using a B-tree data structure. By sorting the data based on the most common index attributes in the collections and inserting it in sorted order, we significantly enhanced the proximity of writes—boosting write throughput by 10x.\n\n#### Step 3: Async replication\n\nOnce we have imported the data onto the target shard, we begin replicating writes starting at time T from the source to the target shard for the database chunks being migrated. Our async replication systems read the mutations resulting from writes on the source shards from the CDC systems and issue writes to the target shards.\n\nThe operations log, or oplog, is a special collection on each DocDB shard that keeps a record of all the operations that mutate data in databases on that shard. We transport the oplog from every DocDB shard to Kafka, an event streaming platform, and then archive it to a cloud object storage service such as Amazon S3. (If you want to learn more about oplog, this is a helpful [primer](https://www.mongodb.com/docs/manual/core/replica-set-oplog/).)\n\nWe built a service to replicate mutations from one or more source DocDB shards to one or more target DocDB shards using the oplog events in Kafka and Amazon S3. We relied on the oplog events from our CDC systems to ensure that we didn’t slow user queries by consuming read throughput that would otherwise be available to user queries on the source shard, and to avoid being constrained by the size of the oplog on the source shard. We designed the service to be resilient to target shard unavailability, and to support starting, pausing, and resuming synchronization from a checkpoint at any point in time. The replication service also exposes the functionality to fetch the replication lag.\n\nMutations of the chunks under migration get replicated bidirectionally—from the source shards to the target shards and vice versa—and the replication service tags the writes it issues to avert cyclical asynchronous replication. We made this design choice to provide the flexibility to revert traffic to the source shards if any issues emerge when directing traffic to the target shards.\n\n#### Step 4: Correctness check\n\nAfter the replication syncs between the source and target shard, we conduct a comprehensive check for data completeness and correctness by comparing point-in-time snapshots—a deliberate design choice we made in order to avoid impacting shard throughput.\n\n#### Step 5: Traffic switch\n\nOnce the data in a chunk is imported from the source to the target shard—and mutations are actively replicated—a traffic switch is orchestrated by the Coordinator. In order to reroute reads and writes to the chunk of data being migrated, we need to first: stop the traffic on the source shard for a brief period of time, update the routes in the chunk metadata service, and have the proxy servers redirect reads and writes to the target shards.\n\nThe traffic switch protocol is based on the idea of versioned gating. In steady state, each proxy server annotates requests to DocDB shards with a version token number. We added a custom patch to MongoDB that allows a shard to enforce that the version token number it receives on requests from the proxy servers is newer than the version token number it knows of—and only serve requests that satisfy this criterion. To update the route for a chunk, we use the Coordinator to execute the following steps:\n\n- First, we bump up the version token number on the source DocDB shard. The version token number is stored in a document in a special collection in DocDB, and all reads and writes on the chunk on the source shard are rejected at this point.\n- Then, we wait for the replication service to replicate any outstanding writes on the source shard.\n- Lastly, we update the route for the chunk to point to the target shard and the version token number in the chunk metadata service.\n\n\n\u003e Traffic switch process\n\nUpon completion, the proxy servers fetch the updated routes for the chunk and the most up-to-date version token number from the chunk metadata service. Using the updated routes for the chunk, the proxy servers route reads and writes for the chunk to the target shard. The entire traffic switch protocol takes less than two seconds to execute, and all failed reads and writes directed to the source shard succeed on retries.\n\n#### Step 6: Chunk migration deregistration\n\nFinally, we conclude the migration process by marking the migration as complete in the chunk metadata service and subsequently dropping the chunk data from the source shard.\n\n### Applications of the Data Movement Platform\n\nThe ability to migrate chunks of data across DocDB shards in an online manner helps us horizontally scale our database infrastructure to keep pace with the growth of Stripe. Engineers on the database infrastructure team are able to split DocDB shards for size and throughput with a click of a button, freeing up database storage and throughput headroom for product teams.\n\nIn 2023, we used the Data Movement Platform to improve the utilization of our database infrastructure. Concretely, we bin-packed thousands of underutilized databases by migrating 1.5 petabytes of data transparent to product applications, and reduced the total number of underlying DocDB shards by approximately three quarters. We also used the Data Movement Platform to upgrade our database infrastructure fleet by fork-lifting data to a later version of MongoDB in one step—without going through intermediate major and minor versions with an in-place upgrade strategy.\n\nThe database infrastructure team at Stripe is focused on building a robust and reliable foundation that scales with the growth of the internet economy. We are currently prototyping a heat management system that proactively balances data across shards based on size and throughput, and investing in shard autoscaling that dynamically responds to changes in traffic patterns.\n\nAt Stripe, we’re excited to solve hard distributed systems problems. If you are too, consider [joining our engineering team](https://stripe.com/jobs/search?query=engineer).\n","authorBio":"","additionalResources":[{"title":"Subscribe to Stripe Developers on YouTube.","url":"https://www.youtube.com/stripedevelopers"},{"title":"Check out the docs for the in-depth developer guidance.","url":"https://docs.stripe.com/"},{"title":"Join the Stripe Discord server to chat live with other developers.","url":"https://discord.com/invite/RuJnSBXrQn"},{"title":"Join a local Stripe Developer Meetup to learn about the latest features and network with your community.","url":"https://www.meetup.com/pro/stripe/"}],"relatedArticles":[{"slug":"building-a-data-plane-from-scratch-stripes-own-high-performance-distributed-proxy","title":"Building a data plane from scratch: Stripe’s own high-performance distributed proxy","summary":"To minimize failed payments for our users, Stripe targets 99.9995% reliability. As traffic grew beyond 1.6% of global GDP, this put intense strain on the service mesh. This is the story of the infrastructure team replacing Envoy, a popular solution, with an alternative architecture.","authors":["Jack Loughran","Cara Mecozzi"],"date":"2026-08-26","location":[],"type":"Blog","topics":["Engineering","Infrastructure"],"artConfig":{"ampX":0.34922884912043817,"ampY":0.366142391782254,"aspectRatio":3.5991310963975267,"axis":"xy","lump":0.33172155507281426,"count":70,"freq":0.4,"isDial":false,"isLineart":false,"isRing":true,"isSpiral":true,"left":4,"mouseX":0.5866846039371565,"mouseY":0.13641974309831856,"noise":0.08586734730005265,"scale":6.598315318033099,"shape":"rect","top":12,"twirl":0,"twist":1.4917267701253296,"velocity":2.061707329314202}},{"slug":"how-we-built-it-real-time-analytics-for-stripe-billing","title":"How we built it: Real-time analytics for Stripe Billing","summary":"Among global business leaders surveyed, 84% agree that adapting pricing quickly will be a key competitive advantage. Our new real-time analytics system for Stripe Billing helps them spot customer trends just as they emerge.","authors":["Reed Trevelyan"],"date":"2025-09-16","location":[],"type":"Blog","topics":["Billing","Infrastructure","Engineering"],"artConfig":{"ampX":1.9396925493329764,"ampY":2.2,"aspectRatio":1.6918080194145442,"axis":"xy","lump":2.787520623873919,"count":180,"freq":4.40652204734087,"isDial":false,"isLineart":false,"isRing":true,"isSpiral":false,"left":-7,"mouseX":0.2754157068183646,"mouseY":0.41637367344647647,"noise":0,"scale":1.2861224984526634,"shape":"rect","top":-17,"twirl":0,"twist":6.139713340558112,"velocity":0.493984429679811,"isBalls":false,"isMatrix":false,"kaleids":2.9024114716798066}}]},"authors":[{"name":"Jimmy Morzaria","slug":"jimmy-morzaria","profile":"Jimmy Morzaria is an engineer at Stripe who works on Database Infrastructure","posts":[]},{"name":"Suraj Narkhede","slug":"suraj-narkhede","profile":"Suraj Narkhede is an engineer at Stripe who works on Database Infrastructure","posts":[]}],"estimatedReadingTime":"11 min read"},"__N_SSG":true},"page":"/blog/[slug]","query":{"slug":"how-stripes-document-databases-supported-99.999-uptime-with-zero-downtime-data-migrations"},"buildId":"CpqpGfDouU7Dr4XKHLZDI","isFallback":false,"gsp":true,"scriptLoader":[]}</script></body></html> |