08.08.2026 –, TR514
A slow third-party API can take down your entire Rails app. One service starts timing out, requests pile up waiting for it, threads block, memory fills, and suddenly nothing responds - not even the parts of your app that have nothing to do with the failing service. This is a cascading failure.
Until recently, this was a problem for large engineering teams running dozens of services. But in 2026, even a small startup is calling out to LLMs, OCR engines, and other third-party APIs. Every one of those calls is a potential domino. Circuit breakers belong in any Ruby app shipping AI features.
This talk introduces the circuit breaker pattern through Stoplight, an MIT-licensed Ruby gem, I co-maintain with Tema Bolshakov. I'll start by unpacking how a single slow dependency cascades into a full outage, then walk through how Stoplight prevents it - and why its traffic-light metaphor (green/yellow/red) is more intuitive than the classical open/closed/half-open vocabulary.
The second half peels back the curtain on how we made Stoplight fast. Coordinating circuit breaker state across multiple Ruby processes means hitting Redis on every call, and a naive implementation incurs several round-trips per check. We'll look at how we collapsed those into single atomic Lua scripts - a technique that improved Stoplight's performance substantially and applies to anyone building Ruby tooling on top of Redis.
Outline (30 min):
- (5 min) Cascading failures in the AI era
- (6 min) The circuit breaker pattern and the traffic-light reframe
- (6 min) Stoplight in practice: defaults, fallbacks, Rails integration
- (8 min) Gem internals: improving performance with Lua scripts
- (5 min) Stoplight admin panel, takeaways, Q&A
Target audience: Ruby and Rails developers building apps with external or AI service dependencies. However, the concepts from this talk translate to any language.
Background: Basic Ruby and a rough idea of what Redis is. No prior exposure to the circuit breaker pattern or the concept of cascading failure is needed.
Links:
- Stoplight gem: https://github.com/bolshakov/stoplight
- Companion article: https://evilmartians.com/chronicles/circuit-breakers-and-ruby-in-2025-dont-break-your-launch
I'm Georgy (ゲオルギ), and I build backend applications written in Ruby (and sometimes in Go). Currently, I'm based in Osaka, Japan, and work at Evil Martians (https://evilmartians.com/), which puts a lot of effort into OSS. I occasionally contribute to OSS projects, but mainly I co-maintain Stoplight (https://github.com/bolshakov/stoplight/) - an OSS implementation of the circuit breaker pattern in Ruby.
Besides writing code, I'm a huge coffee junkie, so I'll appreciate any coffee shop recommendations in Taipei.