COSCUP x UbuCon Asia 2026 Logo
  • About
  • Session
  • Transportation
  • Venue
  • Communities
  • Sponsors
    • Participate Guide
    • First Timer
    • Activity
    • Speaker Participation
    • Welcome Party
    • For Overseas Visitors
    • Open Source Communities
    • Sponsorship Partners
    • Invitation Letter Guide
  • Staff
  • Fringe Events / BoF
  • Blog
  • CoC
中文

Stoplight: Circuit Breakers for Ruby in the AI Era

Time
2026-08-08 14:10 ~ 14:40
Speaker
Georgy Asfur
Room
TR514
Co-write
Ruby Taiwan IntermediateEnglish

Abstract

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

Speaker

Georgy Asfur

Georgy Asfur

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.

Diamond

Canonical

Gold

Consecutive2 YrsInformation Management AssociationConsecutive2 YrsCathay Financial HoldingsConsecutive5 YrsE.SUN BankCumulative12 YrsMySQLCumulative6 YrsBerry AINitra

Silver

Cumulative16 YrsGamesofa Inc.

Bronze

KKTIXNational Center for High-performance ComputingONLYOFFICEQNAP Systems, Inc.Consecutive16 YrsThe Archilife Research FoundationSUN SQUARE Co., Ltd

Friend

Consecutive3 YrsAndes Technology CorporationAppier

Special Thanks

Consecutive2 YrsDepartment of Information Technology, Taipei City GovernmentSiFiveRozeta AI

Co-host

Collaborator9 YrsNTUST - Department of Electronic and Computer Engineering

Co-organizer

Collaborator12 YrsOpen Culture Foundation

COSCUP x UbuCon Asia 2026

Conference for Open Source Coders, Users, and Promoters | Asia's largest open source community conference.

Contact

  • Attendee Services
  • Sponsorship
  • Call for Proposals
  • Marketing

Resources

  • COSCUP Blog
  • Newsletter Subscription
  • Event Photos

Sitemap

  • Home
  • About
  • Transportation
20062007200820092010201120122013201420152016201720182019202020212022202320242025