How are Threads allocated to handle Servlet request

How are Threads allocated to handle Servlet request?

  1. https://stackoverflow.com/questions/7457190/how-are-threads-allocated-to-handle-servlet-request

Thread per request

How are threads allocated to handle HTTP requests?

Thread per request means that, when an HTTP request is made, a thread is created or retrieved from a pool to serve it. One thread serves the whole request.

Thread per connection

Thread per connection would be the same thing except the thread is used for an entire connection, which could be multiple requests and could also have a lot of dead time in between requests. Servlet containers are thread per request. There may be some implementations that offer thread per connection, but I don’t know, and it seems like it would be very wasteful.