DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
HomeDeveloper UtilitiesCircuit Breaker Simulator

Example: Circuit Breaker Simulator

A worked example, rendered from real sample data. Sign in to run the tool on your own input.

Input
failure_threshold=5
success_threshold=2
half_open_after_ms=30000
interval_ms=250
requests=200
failure_rate=0.6
recovers_at=90
seed=demo
Output
═══ What this tool did ═══
✗ Nothing was measured. No service was called, no failure rate was observed, and no breaker in your system was inspected. This page runs entirely on the server that rendered it and makes no outbound network calls.
✓ It runs a circuit-breaker state machine over synthetic traffic: 200 calls, 250ms apart, each one failing with probability 0.60 drawn from a generator seeded with "demo". Same seed, same run, every time.
✓ You set recovers_at=90, so from call 90 onwards the synthetic downstream never fails. That is how the half-open → closed path gets exercised.

═══ Configuration read from your input ═══
setting             value    means
------------------  -------  ------------------------------------------------------------
failure_threshold   5        consecutive failures in CLOSED before the breaker opens
success_threshold   2        consecutive successes in HALF_OPEN before it closes again
half_open_after_ms  30000ms  how long OPEN lasts before one probe is allowed through
half_open_calls     2        calls allowed through while HALF_OPEN, the rest are rejected
timeout_ms          2000ms   per-call timeout; a timeout counts as a failure
interval_ms         250ms    gap between the synthetic calls
failure_rate        0.60     probability the synthetic downstream fails a call

═══ State transitions ═══
• 2250ms  CLOSED → OPEN after 5 consecutive failures
• 32250ms  OPEN → HALF_OPEN after 30000ms — one probe is let through
• 32500ms  HALF_OPEN → CLOSED after 2 consecutive successes

═══ Call by call ═══
t        call     state on entry  outcome
----
…

About Circuit Breaker Simulator

Circuit Breaker Simulator preview - Developer Utilities tool

Run a seeded, reproducible circuit-breaker state machine over synthetic traffic and see exactly when it trips, opens and closes. Part of the DevTools Surf developer suite. Browse more tools in the Developer Utilities collection.

Use Cases

  • Simulate a flapping downstream service to tune failure threshold parameters
  • Demonstrate circuit breaker state transitions (closed, open, half-open) to team members
  • Design retry budget policies for external API dependencies
  • Plan resilience architecture for microservice dependency graphs

Tips

  • Set the failure threshold percentage and minimum request count before the circuit opens — too sensitive and it trips on transient errors; too lenient and it fails to protect downstream services
  • The half-open state timeout controls how quickly the circuit allows probe requests after tripping — tune this based on your dependency's typical recovery time
  • Use the concurrent request slider to simulate traffic spikes and see how the circuit breaker limits cascading failure under load

Fun Facts

  • The circuit breaker pattern in software was popularized by Michael Nygard in his book 'Release It!' (2007) — one of the first books to systematically describe resilience patterns for distributed systems. Netflix's Hystrix library (2011) made it mainstream.
  • Netflix's Hystrix library, which popularized the circuit breaker pattern in microservices, was deprecated in 2018. It was succeeded by Resilience4j, which uses a functional (non-blocking) design compatible with reactive frameworks.
  • Electrical circuit breakers were invented by Charles Grafton Page in 1836. The software pattern borrowed the name because it has the same function: automatically interrupting a fault before it causes damage to the broader system.

FAQ

What are the three circuit breaker states?
Closed (normal operation — requests pass through), Open (circuit tripped — requests fail fast without calling the dependency), Half-Open (test state — a single probe request is allowed to check if the dependency has recovered).
How is a circuit breaker different from a timeout?
A timeout waits for a slow response and eventually gives up. A circuit breaker monitors failure rates and proactively stops sending requests after a threshold is crossed — protecting the downstream service from additional load while it recovers.
Where should circuit breakers be placed in an architecture?
At every external dependency boundary: outbound HTTP calls, database queries, message queue consumers, and third-party API calls. Each should have independently configured thresholds based on that dependency's SLA.

Related Developer Utilities Tools

Collection JSON → cURLGit Diff → HTMLRegex VisualizerMakefile ExplainerShell Script LinterGitHub Actions VisualizerHAR File ViewerAPI Response Mocker
New · Flagshipsimple REST client

REST Handler — Collections, env vars, history, cURL converter

Send requests, save collections (nested), swap environments, and convert between cURL / Collection JSON / REST Handler YAML.

Open

Popular tools

The most-used tools on DevToolsSurf, one click away.

Encoding & crypto

  • Base64 Encode
  • Base64 Decode
  • URL Encoder
  • URL Decoder
  • Hash Generator
  • JWT Decoder
  • JWT Encoder
  • UUID Generator
  • ULID Generator
  • Password Generator
  • Bcrypt Hash Tester

Converters

  • CSV to JSON
  • JSON to CSV
  • XML to JSON
  • JSON to XML
  • HTML → Markdown
  • HTML → React JSX
  • cURL to Code
  • Collection JSON → cURL
  • Swagger to Collection JSON
  • JSON → Go Struct
  • JSON → TypeScript Types

JSON & YAML

  • JSON Formatter
  • JSON Validator
  • JSON Viewer
  • JSON Minifier
  • JSON Diff
  • JSONPath Tester
  • YAML Formatter
  • YAML to JSON
  • JSON to YAML

Text & regex

  • Regex Tester
  • Text Diff
  • Case Converter
  • Word Counter
  • Markdown Preview
  • Slug Generator
  • Lorem Ipsum Generator
  • Markdown → PDF

CSS & color

  • CSS Beautifier
  • Minify CSS
  • Color Converter
  • Gradient Generator
  • Contrast Checker
  • Color Palette Generator
  • Flexbox Playground
  • Tailwind → CSS

Generators

  • QR Code Generator
  • Mock Data Generator
  • Favicon Generator
  • .gitignore Builder
  • README.md Generator
  • Dockerfile Generator
  • Sitemap Generator

API & networking

  • REST Handler
  • HTTP Header Analyzer
  • IP Address Lookup
  • CIDR Calculator
  • User-Agent Parser
  • HTTP Status Reference
  • OpenAPI Viewer

Date & time

  • Timestamp Converter
  • Timezone Converter
  • Cron Expression Parser
  • Duration Calculator
  • Age Calculator
  • Date Format Converter

Images

  • Image Converter
  • Image Resizer (Batch)
  • SVG Optimizer
  • Base64 ↔ Image
  • WebP ↔ AVIF Converter
  • Image Compressor

PDF tools

  • PDF Merger
  • PDF Splitter
  • PDF Compressor
  • Markdown → PDF
  • EPUB → PDF
  • MOBI / AZW → PDF
  • DOCX → PDF
  • HTML → PDF

Resources

  • Community feed
  • Themes marketplace
  • Pricing & credits
  • Privacy policy
  • Terms of service
  • Sitemap
  • robots.txt

Your account

  • Sign in
  • Dashboard
  • Run history
  • My profile
  • Settings
DevTools Surf logo
DevTools Surf919+ tools

Fast · privacy-first · client-side · © 2026

Home·Feed·ThemesPricing·Sign inPrivacy·Sitemap Feedback