Benchmark

Changing HttpClient in Spring RestTemplate

If you’re a Spring boot user, you might have definitely used RestTemplate. If you read the official documentation carefully, you might read that RestTemplate will be deprecated in the future and we must use WebClient which offers Synchronous, Asynchronous and Streaming scenarios such as Server-Sent Events, WebSockets, etc. Majority of the applications in production uses RestTemplates and will be practically a long way before it is completely replaced with Reactive WebFlux. It is important to know how we can customize the RestTemplate changing different Http clients. The default HttpClient used in the RestTemplate is provided by the JDK. It is...

Continue reading...

Zuul and Spring Cloud Gateway – Comparison, Benchmarks, LoadTesting

Spring Cloud Gateway and Zuul are different projects from the Spring community aimed to provide a developer-friendly way of writing Gateway services. While a many of the Spring Cloud users aware of the Zuul project, S-C Gateway is relatively framework which Spring Web Flux (Project Reactor) and the new SpringBoot2. You can refer the question which I asked some time ago in StackOverflow for differences. I have been using Netflix’s Zuul for over two years now and I am so far happy with its performance. I am eagerly waiting to see the much-purported Zuul2 which we can expect anytime. But...

Continue reading...