Reputation: 987
While making the following call http://localhost:8080/test for the the TestController I was not able to get more the 6 responses from the server in parallel. The requests just keep waiting for the request I made before to finish. Is there a way to increase this number per API(Controller)?
TestController
@RestController
@RequestMapping("/test")
class TestController() {
@GetMapping(produces = [MediaType.TEXT_EVENT_STREAM_VALUE])
fun test(): Flux<String> {
return Flux
.interval(Duration.ofSeconds(1))
.map { t -> "test $t"}
}
}
Number of CPUs in the machine running the application: 8
Upvotes: 0
Views: 466
Reputation: 9947
I'm assuming you're calling your server from an internet browser. Max 6 connections to a domain is a known browser limitation. HTTP/2 or WebSocket can offer a solution.
Upvotes: 2