<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/stripe-uses-graph-search-and-state-machines-to-automate-database-remediation-gqgiu6am9" -->

---
title: Stripe Uses Graph Search and State Machines to Automate...
description: Stripe's engineering team automated database incident recovery by modeling their global MongoDB infrastructure as a graph, using graph search algorithms and...
canonical: https://daily.dev/posts/stripe-uses-graph-search-and-state-machines-to-automate-database-remediation-gqgiu6am9
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Stripe Uses Graph Search and State Machines to Automate Database Remediation | daily.dev
og:description: Stripe's engineering team automated database incident recovery by modeling their global MongoDB infrastructure as a graph, using graph search algorithms and...
og:url: https://daily.dev/posts/stripe-uses-graph-search-and-state-machines-to-automate-database-remediation-gqgiu6am9
og:image: https://api.daily.dev/og/posts/GqGIU6Am9.png
og:image:alt: Stripe Uses Graph Search and State Machines to Automate Database Remediation
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe Uses Graph Search and State Machines to Automate Database Remediation

**[InfoQ](https://daily.dev/sources/infoq)** · 3 min read · 0 upvotes · 0 comments

## Summary

Stripe's engineering team automated database incident recovery by modeling their global MongoDB infrastructure as a graph, using graph search algorithms and state machines to compute and execute remediation plans dynamically. The system replaced a fragile, hard-coded plugin-based approach that required frequent manual intervention. By adopting Dijkstra's algorithm over BFS, the planner prioritizes lower-cost recovery paths and can return partial remediation when no complete path exists. The result: a 30% reduction in database-related pager alerts, 200 fewer pages per year, and 12 fewer days of unhealthy shard states annually. Stripe plans to extend the framework to automate topology changes, blue-green deployments, and planned maintenance.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.infoq.com/news/2026/08/database-remediation-graph>

## Questions this post answers

### How did Stripe reduce database pager alerts using graph search and state machines?

Stripe modeled its MongoDB infrastructure as a graph where nodes represent components, edges capture relationships, and attributes describe current state. Using Dijkstra's algorithm to find lowest-cost recovery paths, the system dynamically computes remediation plans without hard-coded runbooks. This reduced database-related pager alerts by about 30%, translating to 200 fewer pages per year and eliminating roughly 12 days of unhealthy shard states annually.

_Teams managing on-call load for distributed databases track approaches like this on daily.dev._

### Why did Stripe switch from BFS to Dijkstra's algorithm for database remediation path finding?

Stripe initially used breadth-first search to find valid remediation paths but switched to Dijkstra's algorithm to prioritize lower-cost recovery plans, reducing unnecessary operations while preserving correctness. A key benefit is that Dijkstra's explores all reachable states, enabling partial remediation — when no complete recovery path exists, the algorithm returns the path to the least misconfigured state rather than failing entirely.

_Engineers designing self-healing infrastructure systems find related architectural patterns on daily.dev._

## Similar posts on daily.dev

- [Fraud Prevention with BigQuery Graph](https://daily.dev/posts/fraud-prevention-with-bigquery-graph-ijwfemqda) · Google Cloud · 0 upvotes · 0 comments
- [Stripe's Zero-Downtime Data Movement Platform Migrates Petabytes with Millisecond Traffic Switches](https://daily.dev/posts/stripe-s-zero-downtime-data-movement-platform-migrates-petabytes-with-millisecond-traffic-switches-e0msys40v) · InfoQ · 44 upvotes · 0 comments

---

Tags: [#mongodb](https://daily.dev/tags/mongodb)

[View this post on daily.dev](https://daily.dev/posts/stripe-uses-graph-search-and-state-machines-to-automate-database-remediation-gqgiu6am9)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Stripe Uses Graph Search and State Machines to Automate Database Remediation","url":"https://daily.dev/posts/stripe-uses-graph-search-and-state-machines-to-automate-database-remediation-gqgiu6am9","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/stripe-uses-graph-search-and-state-machines-to-automate-database-remediation-gqgiu6am9"},"datePublished":"2026-08-09T07:02:32.032Z","dateModified":"2026-08-09T07:02:56.139Z","description":"Stripe's engineering team automated database incident recovery by modeling their global MongoDB infrastructure as a graph, using graph search algorithms and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ccb0af0bcb505e67977e6634ac922221?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ccb0af0bcb505e67977e6634ac922221?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"InfoQ","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"InfoQ","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/afc3bced3e1e4b188dd9127017a60e0c","url":"https://daily.dev/sources/infoq"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/stripe-uses-graph-search-and-state-machines-to-automate-database-remediation-gqgiu6am9","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"mongodb","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"InfoQ","item":"https://daily.dev/sources/infoq"},{"@type":"ListItem","position":3,"name":"Stripe Uses Graph Search and State Machines to Automate Database Remediation"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/stripe-uses-graph-search-and-state-machines-to-automate-database-remediation-gqgiu6am9#faq","mainEntity":[{"@type":"Question","name":"How did Stripe reduce database pager alerts using graph search and state machines?","acceptedAnswer":{"@type":"Answer","text":"Stripe modeled its MongoDB infrastructure as a graph where nodes represent components, edges capture relationships, and attributes describe current state. Using Dijkstra's algorithm to find lowest-cost recovery paths, the system dynamically computes remediation plans without hard-coded runbooks. This reduced database-related pager alerts by about 30%, translating to 200 fewer pages per year and eliminating roughly 12 days of unhealthy shard states annually. Teams managing on-call load for distributed databases track approaches like this on daily.dev."}},{"@type":"Question","name":"Why did Stripe switch from BFS to Dijkstra's algorithm for database remediation path finding?","acceptedAnswer":{"@type":"Answer","text":"Stripe initially used breadth-first search to find valid remediation paths but switched to Dijkstra's algorithm to prioritize lower-cost recovery plans, reducing unnecessary operations while preserving correctness. A key benefit is that Dijkstra's explores all reachable states, enabling partial remediation — when no complete recovery path exists, the algorithm returns the path to the least misconfigured state rather than failing entirely. Engineers designing self-healing infrastructure systems find related architectural patterns on daily.dev."}}]}
```

