Is it a good practice to pool HTTPConnections? I want to speed up access to a server which is accessed via HTTPConnection.
Thank you.
-Saha
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
There is really no point on pooling HTTP connections. HTTP is a connection-less protocol: you connect, send a request, receive a response, and it disconnects. With HTTP 1.1. you can use keep-alive, which lets a connection live even after the response has been received, but only for a short time. And it would need to be for the same server to begin with, so: if you have a need to connect to the same server multiple times, and not for the same session/clickstream, then you should reconsider your architecture/design.
Thank you Ulf. I connect to the same server. I only require stateless functionality (not necessary to keep same session). What are the other options? The protocol is https.
-Saha
R Ramesh
Greenhorn
Joined: Oct 08, 2004
Posts: 9
posted
0
In continuation to the post, Let's say if a client made a request to server, by that time if the server is responding to another request then would this request be queued by the server and respond after it completes it current service? Since the client is waiting for the response from server would there any exception thrown at the client end? If yes, what is the time limit the client could expect an exception?
Originally posted by R Ramesh: In continuation to the post, Let's say if a client made a request to server, by that time if the server is responding to another request then would this request be queued by the server and respond after it completes it current service?
Yes, though a well-written server will service multiple clients simultaneously.
Since the client is waiting for the response from server would there any exception thrown at the client end?
While the client is waiting? No. If the connection times out, yes.
If yes, what is the time limit the client could expect an exception?