Hi,
I was reading the HFServlets and
JSP book when I noticed this -
There is a subtle difference between getServerPort and getLocalPort, while the former says to which port the request was originally sent the latter says on which port the request end up. The difference being although requests are sent to a single port the server turns around and finds a different local port for each thread so that the app can handle multiple request at the same time
It is the last line I'm confused about, if each
thread ends up in a separate port then theoretically the app shouldn't be able to handle more than 65,535 requests at a time since it is the maximum number of ports available on a computer. of course some of them are reserved ports which makes the concurrent requests to be less than 65,535. I'm assuming that each request will be executed in a separate thread and going by the book each thread will have a specific port. So does it mean that an app deployed on a single instance of a server cannot handle more than 65,535 requests at a time? I don't think so . Am I missing something here?
Any thoughts appreciated.
Thanks !