Your circuit breaker stops at the service layer. Slow SQL needs one too.
A single slow query can take down an entire service in seconds. This post starts with a production cascade failure and walks through how I built a Spring Boot Starter that does circuit breaking at the MyBatis interceptor layer, keyed by SQL type + SQL fingerprint — plus a few design trade-offs worth talking about. The SDK is open source, on Maven Central, and takes one dependency + a bit of YAML to wire in.
🔗 Source: GitHub · Gitee (a Star ⭐ helps if you find it useful)
1. A short war story: how one slow query took down a service
One evening at peak traffic, the order service started timing out everywhere and alerts went off. The root cause was mundane: a list query had picked up a new filter condition that wasn't covered by an index, turned into a full table scan, and took 30+ seconds per call.
The thing is, it doesn't stop at "slow once":
One slow query holds a DB connect
Discussion
Say something first
It all starts with you—share your thoughts now.