Several weeks ago I was working on a task where I have to do millions of REST HTTP calls from java app to external service. First I tried to use Spring’s RestTemplate, but it was too slow for my case because it’s synchronous(lets say server response rate 30ms and I have to make 2M requests, which leads us to approx 16 hours, in single thread mode). Then I started looking for something asynchronous and luckily Spring has AsyncRestTemplate. It has similar functionality as RestTemplate, but only difference is that it returns ListenableFuture.
Continue reading “Spring’s WebClient testing + findings from Async/RestTemplate.”