Formal Verification of Circuit-Breaker Fleets Under Two Downstream Overload Semantics

Marian Ileana, Vassil Milev, Pavel Petrov

Abstract


Circuit breakers protect a downstream dependency from a fleet of independent clients that retry after a shared failure. Engineering practice recommends adding jitter to the breaker's open-timeout so the fleet does not retry in lockstep, but the strength of this recommendation is rarely stated precisely: is jitter merely an efficiency improvement, or is it required for correctness? We show the answer depends on an assumption about the downstream dependency that is easy to leave implicit. Under fail-together overload semantics, where a batch of concurrent probes exceeding the dependency's capacity fails in its entirety, an unjittered fleet never recovers: explicit-state model checking finds a permanent livelock in every one of 14 tested fleet configurations. Under admission-control semantics, where only the first C arrivals of an overloaded batch are served, the same fleet always recovers, and jitter is merely beneficial: the exhaustive model predicts a 1.7x to 3.8x recovery speedup depending on fleet size, and an independent asyncio prototype confirms the effect directly, measuring a 2.2x speedup for the two fleet sizes it tests. We give a deterministic, modulo-based jitter assignment, prove its round-one safety bound by a pigeonhole argument cross-checked independently in Z3, and report a residual transient-overload limitation left open for future work.

Keywords


circuit breaker; jitter, retry storm; explicit-state model checking; SMT verification; distributed web systems; resilience patterns

Full Text:

PDF

References


M. T. Nygard, Release It! Design and Deploy Production-Ready Software, 2nd ed. Raleigh, NC: Pragmatic Bookshelf, 2018.

M. Fowler, “CircuitBreaker,” martinfowler.com, 2014. [Online]. Available: https://martinfowler.com/bliki/CircuitBreaker.html.

Netflix, “Hystrix: Latency and Fault Tolerance Library.” [Online]. Available: https://github.com/Netflix/Hystrix.

resilience4j, “resilience4j: fault tolerance library designed for Java8 and functional programming.” [Online]. Available: https://github.com/resilience4j/resilience4j.

App-vNext, “Polly: .NET resilience and transient-fault-handling library.” [Online]. Available: https://github.com/App-vNext/Polly.

Envoy Proxy, “Outlier detection,” Envoy documentation. [Online]. Available: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/outlier.

Microsoft, “Circuit Breaker pattern,” Azure Architecture Center, Microsoft Learn. [Online]. Available: https://learn.microsoft.com/en-us/azure/architecture/patterns/circuit-breaker.

Kubernetes, “Liveness, Readiness, and Startup Probes,” Kubernetes Documentation. [Online]. Available: https://kubernetes.io/docs/concepts/workloads/pods/probes/.

M. Brooker, “Exponential Backoff And Jitter,” AWS Architecture Blog, Mar. 4, 2015. [Online]. Available: https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

M. Brooker, “Timeouts, retries, and backoff with jitter,” Amazon Builders' Library, Dec. 2019. [Online]. Available: https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/

M. Ulrich, “Addressing Cascading Failures,” in Site Reliability Engineering: How Google Runs Production Systems, B. Beyer, C. Jones, J. Petoff, N. R. Murphy, Eds. Sebastopol, CA: O'Reilly Media, 2016, ch. 22.

J. Dean, L. A. Barroso, “The Tail at Scale,” Communications of the ACM, vol. 56, no. 2, pp. 74-80, Feb. 2013.

N. Bronson, A. Aghayev, A. Charapko, T. Zhu, “Metastable Failures in Distributed Systems,” in Proc. Workshop on Hot Topics in Operating Systems (HotOS '21), Ann Arbor, MI, USA, ACM, 2021, pp. 221-227.

P. Huang, C. Guo, L. Zhou, J. R. Lorch, Y. Dang, M. Chintalapati, R. Yao, “Gray Failure: The Achilles' Heel of Cloud-Scale Systems,” in Proc. 16th Workshop on Hot Topics in Operating Systems (HotOS '17), ACM, 2017.

M. Ileana, “A Dynamic Load Balancing Algorithm for Distributed Web Systems,” Proceedings of the 62nd Annual Scientific Conference of Angel Kanchev University of Ruse, vol. 62, book 3.2, 2023.

M. Ileana, P. Petrov, V. Milev, “Intelligent Intrusion Detection in IoT with Explainable AI and Distributed Web Systems,” in 2025 International Conference on Cybersecurity and AI-Based Systems (Cyber-AI), IEEE, 2025, pp. 124-127, doi: 10.1109/Cyber-AI66431.2025.11233693.

M. Ileana, P. Petrov, V. Milev, “Optimizing CRM Platforms with Distributed Cloud Architectures for Scalable Performance and Security,” in 2024 8th International Symposium on Innovative Approaches in Smart Technologies (ISAS), IEEE, 2024, pp. 1-6, doi: 10.1109/ISAS64331.2024.10845520.

D. A. Popescu, M. Ileana, N. Bold, “Analyzing the Performance of Distributed Web Systems Within an Educational Assessment Framework,” in Breaking Barriers with Generative Intelligence. Using GI to Improve Human Education and Well-Being, A. Basiouni, C. Frasson, Eds., Communications in Computer and Information Science, vol. 2162. Cham: Springer Nature Switzerland, 2024, pp. 102-115, doi: 10.1007/978-3-031-65996-6_9.

R. Alur, D. L. Dill, “A Theory of Timed Automata,” Theoretical Computer Science, vol. 126, no. 2, pp. 183-235, 1994.

G. Behrmann, A. David, K. G. Larsen, “A Tutorial on Uppaal,” in Formal Methods for the Design of Real-Time Systems (SFM-RT 2004), LNCS vol. 3185, Springer, 2004, pp. 200-236.

L. Lamport, Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers. Boston: Addison-Wesley, 2002.

L. de Moura, N. Bjørner, “Z3: An Efficient SMT Solver,” in Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2008), LNCS vol. 4963, Springer, 2008, pp. 337-340.

M. van Steen, A. S. Tanenbaum, Distributed Systems, 3rd ed., distributed-systems.net, 2017.

G. J. Holzmann, The SPIN Model Checker: Primer and Reference Manual, Addison-Wesley, 2003.

C. Rosenthal, N. Jones, Chaos Engineering: System Resiliency in Practice. Sebastopol, CA: O'Reilly Media, 2020.




DOI: http://dx.doi.org/10.5281/zenodo.22016737

Refbacks

  • There are currently no refbacks.
We use cookies.