Harden Performance of REST calls using Spring WebFlux
Blog post from Steadybit
The text discusses enhancing the performance of a microservices-based online shop system by using Spring WebFlux to optimize REST API calls. Initially, the system's Gateway microservice sequentially fetched product data from three independent microservices, which could lead to increased response times under network delays. By simulating such delays using Steadybit, a tool that allows for experimentation with network conditions, the response time was shown to increase significantly. The solution proposed involves parallelizing the API requests using Spring WebFlux, which supports reactive programming, thus reducing response times by executing calls concurrently. The revised implementation was validated through re-running the experiment, demonstrating improved performance with reduced response times. The article concludes by emphasizing the importance of testing the new implementation for potential issues and re-evaluating it after any code changes.