BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//pretalx//pretalx.coscup.org//coscup-2026//talk//GMJZEK
BEGIN:VTIMEZONE
TZID:CST
BEGIN:STANDARD
DTSTART:20000101T000000
RRULE:FREQ=YEARLY;BYMONTH=1
TZNAME:CST
TZOFFSETFROM:+0800
TZOFFSETTO:+0800
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:pretalx-coscup-2026-GMJZEK@pretalx.coscup.org
DTSTART;TZID=CST:20260808T141000
DTEND;TZID=CST:20260808T144000
DESCRIPTION:A slow third-party API can take down your entire Rails app. One
  service starts timing out\, requests pile up waiting for it\, threads blo
 ck\, 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 casca
 ding failure.\n\nUntil recently\, this was a problem for large engineering
  teams running dozens of services. But in 2026\, even a small startup is c
 alling out to LLMs\, OCR engines\, and other third-party APIs. Every one o
 f those calls is a potential domino. Circuit breakers belong in any Ruby a
 pp shipping AI features.\n\nThis talk introduces the circuit breaker patte
 rn through Stoplight\, an MIT-licensed Ruby gem\, I co-maintain with Tema 
 Bolshakov. I'll start by unpacking how a single slow dependency cascades i
 nto a full outage\, then walk through how Stoplight prevents it - and why 
 its traffic-light metaphor (green/yellow/red) is more intuitive than the c
 lassical open/closed/half-open vocabulary.\n\nThe second half peels back t
 he curtain on how we made Stoplight fast. Coordinating circuit breaker sta
 te 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 build
 ing Ruby tooling on top of Redis.\n\n**Outline (30 min):**\n- (5 min) Casc
 ading failures in the AI era\n- (6 min) The circuit breaker pattern and th
 e traffic-light reframe\n- (6 min) Stoplight in practice: defaults\, fallb
 acks\, Rails integration\n- (8 min) Gem internals: improving performance w
 ith Lua scripts\n- (5 min) Stoplight admin panel\, takeaways\, Q&A\n\n**Ta
 rget audience**: Ruby and Rails developers building apps with external or 
 AI service dependencies. However\, the concepts from this talk translate t
 o any language.\n\n**Background**: Basic Ruby and a rough idea of what Red
 is is. No prior exposure to the circuit breaker pattern or the concept of 
 cascading failure is needed.\n\n**Links:**\n- **Stoplight gem**: https://g
 ithub.com/bolshakov/stoplight\n- **Companion article**: https://evilmartia
 ns.com/chronicles/circuit-breakers-and-ruby-in-2025-dont-break-your-launch
DTSTAMP:20260713T142500Z
LOCATION:TR514
SUMMARY:Stoplight: Circuit Breakers for Ruby in the AI Era - Georgy Asfur
URL:https://pretalx.coscup.org/coscup-2026/talk/GMJZEK/
END:VEVENT
END:VCALENDAR
