Avaliação de Desempenho de Dois Padrões de Resiliência para Microsserviços: Retry e Circuit Breaker
Abstract
Microservice developers increasingly use resiliency patterns, such as Retry, Fail Fast, and Circuit Breaker, to cope with failures during the invocation of remote services. However, there is still little research on the impact of those resiliency patterns on application performance. This paper presents an experimental evaluation of the performance impact of the Retry and Circuit Breaker resilience patterns, as implemented by two popular open-source resilience libraries: Polly, for C#, and Resilience4j, for Java. The evaluation results show that the Retry pattern can be more effective than the Circuit Breaker pattern in reducing the application's contention for external resources, with both patterns causing a slight to moderate impact on its execution time.
References
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].
