Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^4: TCP socket and fork

by adismaug (Acolyte)
on Jul 04, 2009 at 12:45 UTC ( #777223=note: print w/replies, xml ) Need Help??

in reply to Re^3: TCP socket and fork
in thread TCP socket and fork

Dear Alexander,
My concern is not about the TCP handshake but more on the server resources.
Lets say I need the get 10 pages from the server, each page takes 1 second to retrieve so theoretically if I use 10 threads it should take one second to get 1 page or 10 pages.
The problem starts when the server is busy with a lot of requests, it needs to allocate resources for each request and there for some of then take longer the 1 second.
If my client was to use the same resource allocated by the server (same TCP socket) for all my threads then I will not suffer from the delay because the server already allocated the resources for me.
On the other hand if each thread opens a new socket then for some threads the server will delay the replay.
This is a big problem and I cannot find a way to solve it.
Any ideas?
Best Regards,

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://777223]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2018-05-26 18:00 GMT
Find Nodes?
    Voting Booth?