Avaliação de Desempenho de Dois Padrões de Resiliência para Microsserviços: Retry e Circuit Breaker

  • Thiago M. Costa UNIFOR
  • Davi M. Vasconcelos UNIFOR
  • Carlos M. Aderaldo UNIFOR
  • Nabor C. Mendonça UNIFOR

Resumo


Desenvolvedores de microsserviços cada vez mais utilizam padrões de resiliência, como Retry, Fail Fast, e Circuit Breaker, para lidar com falhas durante a invocação de serviços remotos. Porém, ainda há poucos trabalhos na literatura sobre o impacto do uso desses padrões no desempenho das aplicações. Este trabalho apresenta uma avaliação experimental do impacto de desempenho dos padrões de resiliência Retry e Circuit Breaker, tais como implementados por duas populares bibliotecas de resiliência de código aberto: Polly, para a linguagem C#, e Resilience4j, para a linguagem Java. Os resultados da avaliação mostram que o padrão Retry pode ser mais efetivo que o padrão Circuit Breaker na redução da contenção por recursos externos da aplicação, com ambos os padrões causando de leve a moderado impacto no seu tempo de execução.

Referências

Aderaldo, C. M. et al. (2017). Benchmark Requirements for Microservices Architecture Research. In 1st Int. Workshop on Establishing the Community-Wide Infrastructure for Architecture-Based Software Engineering (ECASE), pages 8–13.

App vNext (2022). Polly. https://github.com/App-vNext/Polly. [Último acesso em 23 de Abril de 2022].

Aquino, G. et al. (2019). The circuit breaker pattern targeted to future IoT applications. In Int. Conf. Service Oriented Computing (ICSOC), pages 390–396. Springer.

Birolini, A. (2013). Reliability Engineering: Theory and Practice. Springer Science & Business Media.

Di Francesco, P., Lago, P., and Malavolta, I. (2019). Architecting with microservices: A systematic mapping study. Journal of Systems and Software, 150:77–97.

Fowler, M. (2014). CircuitBreaker. [link]. [Último acesso em 23 de Abril de 2022].

Ibryam, B. (2017). It takes more than a Circuit Breaker to create a resilient application. [link]. [Último acesso em 23 de Abril de 2022].

Istio.io (2022). The Istio Service Mesh. https://istio.io/. [Último acesso em 23 de Abril de 2022].

Jagadeesan, L. J. and Mendiratta, V. B. (2020). When failure is (not) an option: Reliability models for microservices architectures. In IEEE Int. Symp. Software Reliability Engineering Workshops (ISSREW), pages 19–24.

Jamshidi, P. et al. (2018). Microservices: The journey so far and challenges ahead. IEEE Software, 35(3):24–35.

Jolie Language (2020). Jolie: The first language for Microservices. https://www.jolie-lang.org/. [Último acesso em 23 de Abril de 2022].

Kwiatkowska, M., Norman, G., and Parker, D. (2007). Stochastic Model Checking. In Bernardo, M. and Hillston, J., editors, Formal Methods for the Design of Computer, Communication and Software Systems: Performance Evaluation (SFM’07), volume 4486 of LNCS (Tutorial Volume), pages 220–270. Springer.

Mendonca, N. C. et al. (2020). Model-based analysis of microservice resiliency patterns. In IEEE Int. Conf. Software Architecture (ICSA), pages 114–124.

Merkel, D. (2014). Docker: lightweight linux containers for consistent development and deployment. Linux journal, 2014(239):2.

Microsoft Azure (2017). Resiliency patterns. [link]. [Último acesso em 23 de Abril de 2022].

Minkowski, P. (2020). Circuit breaker and retries on Kubernetes with Istio and Spring Boot. Piotr’s TechBlog, [link]. [Último acesso em 23 de Abril de 2022].

Montesi, F. and Weber, J. (2016). Circuit breakers, discovery, and api gateways in microservices. arXiv preprint arXiv:1609.05830.

Mozilla (2012). Vaurien, the Chaos TCP Proxy. https://vaurien.readthedocs.io/. [Último acesso em 23 de Abril de 2022].

Nygard, M. (2007). Release It!: Design and Deploy Production-Ready Software. Pragmatic Bookshelf.

Postman (2017). httpbin(1): HTTP Request & Response Service. https://github.com/postmanlabs/httpbin. [Último acesso em 23 de Abril de 2022].

Preuveneers, D. and Joosen, W. (2017). QoC2 Breaker: intelligent software circuit breakers for fault-tolerant distributed context-aware applications. Journal of Reliable Intelligent Environments, 3(1):5–20.

Resilience4j (2021). Fault tolerance library designed for functional programming. https://github.com/resilience4j/resilience4j. [Último acesso em 23 de Abril de 2022].

Rosenthal, C. et al. (2017). Chaos Engineering: Building Confidence in System Behavior through Experiments. O’Reilly.

Saleh Sedghpour, M. R., Klein, C., and Tordsson, J. (2022). An Empirical Study of Service Mesh Traffic Management Policies for Microservices. In ACM/SPEC Int. Conf. Performance Engineering (ICPE), pages 17–27.

Scott, C. (2018). Designing Resilient Systems: Circuit Breakers or Retries? (Part 1). Grab Tech Blog, https://engineering.grab.com/designing-resilient-systems-part-1. [Último acesso em 23 de Abril de 2022].
Publicado
23/05/2022
Como Citar

Selecione um Formato
COSTA, Thiago M.; VASCONCELOS, Davi M.; ADERALDO, Carlos M.; MENDONÇA, Nabor C.. Avaliação de Desempenho de Dois Padrões de Resiliência para Microsserviços: Retry e Circuit Breaker. In: SIMPÓSIO BRASILEIRO DE REDES DE COMPUTADORES E SISTEMAS DISTRIBUÍDOS (SBRC), 40. , 2022, Fortaleza. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2022 . p. 517-530. ISSN 2177-9384. DOI: https://doi.org/10.5753/sbrc.2022.222363.

Artigos mais lidos do(s) mesmo(s) autor(es)