Skip to main content
QUICK REVIEW

[Paper Review] Circuit Breakers, Discovery, and API Gateways in Microservices

Fabrizio Montesi, Janine Weber|arXiv (Cornell University)|Sep 19, 2016
Software System Performance and ReliabilityComputer Science12 references44 citations
TL;DR

This paper presents a systematic analysis of three core microservices patterns—circuit breakers, service discovery, and API gateways—demonstrating their implementation in Jolie, a native microservices programming language. It reveals novel insights on deploying circuit breakers beyond client-side use, highlights parametric reusability for evolving APIs, and advocates for compositional, pattern-based design to enhance system resilience and flexibility in microservice architectures.

ABSTRACT

We review some of the most widely used patterns for the programming of microservices: circuit breaker, service discovery, and API gateway. By systematically analysing different deployment strategies for these patterns, we reach new insight especially for the application of circuit breakers. We also evaluate the applicability of Jolie, a language for the programming of microservices, for these patterns and report on other standard frameworks offering similar solutions. Finally, considerations for future developments are presented.

Motivation & Objective

  • To analyze and compare deployment strategies for key microservices patterns: circuit breakers, service discovery, and API gateways.
  • To investigate how circuit breakers can be effectively applied beyond client-side use, improving system resilience and fault tolerance.
  • To evaluate the suitability of Jolie for implementing these patterns, emphasizing parametricity and reusability.
  • To identify gaps in existing formal models for service choreographies and propose directions for future integration with these patterns.
  • To provide a unified, principled overview of these patterns to guide developers in building more reliable and scalable microservice systems.

Proposed method

  • Systematically analyzes the state machine behavior of circuit breakers using a three-state model: closed, open, and half-open.
  • Proposes a Jolie-based prototype of a circuit breaker that is parametric on the target service interface, enabling transparent reuse across deployment locations.
  • Evaluates client-side and server-side service discovery strategies, contrasting Eureka (client-based) and AWS ELB (server-based) approaches.
  • Demonstrates how API gateways can be composed from reusable components in Jolie, integrating circuit breakers and load balancing for security, monitoring, and traffic management.
  • Uses Jolie’s native support for service composition and interface definition to implement and verify the patterns in a type-safe, modular way.
  • Identifies limitations in current formal choreography models and proposes extensions for timeouts, faults, dynamic binding, and parametric behavior to support these patterns.

Experimental results

Research questions

  • RQ1How can circuit breakers be effectively deployed beyond client-side use to improve system-wide resilience in microservices?
  • RQ2What are the trade-offs between client-side and server-side service discovery in terms of scalability, fault tolerance, and performance?
  • RQ3How can API gateways be composed from modular, reusable components to support dynamic API management and cross-cutting concerns?
  • RQ4To what extent can existing formal choreography models support the implementation of circuit breakers, service discovery, and API gateways?
  • RQ5What role does interface parametricity play in enabling the long-term maintainability and reusability of patterns like circuit breakers in evolving microservice systems?

Key findings

  • Circuit breakers can be deployed transparently at any point in the communication chain—not just at the client—offering broader protection against cascading failures.
  • The Jolie-based circuit breaker prototype supports interface parametricity, allowing it to be reused across services even when their interfaces evolve, unlike Hystrix which requires re-implementation for new operations.
  • Client-side discovery (e.g., Eureka) is more resilient due to client-side caching, while server-side discovery (e.g., AWS ELB) can become a bottleneck under high load.
  • API gateways built with Jolie can be composed from modular components such as circuit breakers and load balancers, enabling separation of concerns and extensibility.
  • Existing formal choreography models lack native support for key pattern features like timeouts, faults, and dynamic binding, indicating a need for enhanced models.
  • The integration of circuit breakers, service discovery, and API gateways into a single formal model remains an open challenge, requiring extensions to current frameworks in process calculi and component-based systems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.