Does micronaut/Netty create separate thread for Client call?

Viewed 119

I am unable to understand the micronaut documentation when they as if your interactions with an HTTP client involve CPU-intensive work, it may be worthwhile configuring a separate EventLoopGroup for one or all clients.

Would separate thread would be used for calling the HTTP Client ?

Let's say there are two services service-A andservice-B and a request come to serviceA to fetch some data , to fetch data service-A will call to service-B via some HTTP Client. So how the threads will be created/picked for the above scenario ?

When request comes to service-A, a new thread(let's say nio-EventLoopGroup-1) will be assigned to request from event-loop and when service-A tries to call service-B, then again another new thread (nio-EventLoopGroup-2) will be assigned to that HttpClient task.

Two question on the above scenario :

  1. If new thread (nio-EventLoopGroup-2) will assigned to HttpClient call then what will happend to the first thread (nio-EventLoopGroup-1) ?
  2. If same thread (nio-EventLoopGroup-1) will be calling to the client then what is the meaning of creating separate event-loop for client call ?
0 Answers
Related