Performance of REST and gRPC in Microservices: Java Blocking vs. Python Non-Blocking I/O

Authors

Agustinus Noertjahyana

Informatics Department, Petra Christian University, Indonesia (Indonesia)

Kartika Gunadi

Informatics Department, Petra Christian University, Indonesia (Indonesia)

Joseph Justin Harsono

Informatics Department, Petra Christian University, Indonesia (Indonesia)

Andreas Handojo

Informatics Department, Petra Christian University, Indonesia (Indonesia)

Article Information

DOI: 10.51584/IJRIAS.2026.11060258

Subject Category: Computer Science

Volume/Issue: 11/6 | Page No: 3365-3371

Publication Timeline

Submitted: 2026-07-01

Accepted: 2026-07-06

Published: 2026-07-15

Abstract

The selection of communication protocols and underlying concurrency models profoundly impacts the performance and resource efficiency of microservice architectures. While existing studies frequently compare protocols like REST and gRPC, they often overlook the compounded effects of language-specific I/O paradigms during complex service chaining, as well as system behavior under edge-case failures. This study evaluates the performance disparities between Blocking I/O (Java Spring Boot) and Non-Blocking I/O (Python FastAPI) architectures utilizing REST and gRPC protocols. A containerized educational platform, simulating a three-tier service chain, was developed and subjected to rigorous load testing and fault injection scenarios. System performance was measured across varying payload sizes (1 KB, 50 KB, and 1 MB) to capture P99 latency, request throughput, CPU utilization, and memory footprint. The empirical findings indicate that while gRPC over HTTP/2 significantly enhances throughput, its efficiency is heavily modulated by the host language's thread management and serialization libraries. Furthermore, we identify the exact payload crossover threshold where multi-threaded blocking models outperform asynchronous event loops and analyze system resilience during simulated network partitions. The findings provide reproducible guidelines for software architects in selecting optimal protocol-language combinations, balancing raw performance with cognitive burden and fault tolerance.

Keywords

Concurrency Model, gRPC, Microservices, REST, Service Chaining, Blocking I/O, Event Loop.

Downloads

References

1. N. Dragoni et al., "Microservices: Yesterday, Today, and Tomorrow," Springer, 2017, pp. 195–216. [Google Scholar] [Crossref]

2. M. Pirhonen et al., "The Pains and Gains of Microservices Revisited," Springer, 2025, pp. 238–254. [Google Scholar] [Crossref]

3. K. Cebeci and Ö. Korçak, "Design of an Enterprise Level Architecture Based on Microservices," Bilişim Teknol. Derg., vol. 13, no. 4, pp. 357–371, 2020. [Google Scholar] [Crossref]

4. M. Hui et al., "Unveiling the microservices testing methods, challenges, solutions, and solutions gaps," J. Syst. Softw., vol. 220, p. 112232, 2025. [Google Scholar] [Crossref]

5. Bhayani, "Why gRPC Uses HTTP2," Arpit Bhayani Blog, 2024. [Google Scholar] [Crossref]

6. Shafabakhsh, "Research on Interprocess Communication in Microservices Architecture," KTH Royal Inst. of Technol., 2020. [Google Scholar] [Crossref]

7. M. Niswar et al., "Performance Evaluation of Microservices Communication with REST, GraphQL, and gRPC," Int. J. Electron. Telecommun., vol. 70, no. 2, pp. 429–436, 2024. [Google Scholar] [Crossref]

8. S. Weerasinghe and I. Perera, "Optimized Strategy for Inter-Service Communication in Microservices," Int. J. Adv. Comput. Sci. Appl., vol. 14, no. 2, 2023. [Google Scholar] [Crossref]

9. Protobuf vs JSON Explained: Speed, Size & When to Use Each, DEV Community, 2025. [Google Scholar] [Crossref]

Metrics

Views & Downloads

Similar Articles