Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2016-10-21 16:59 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (289 votes). Check out past polls.