Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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,
Adi.


Comment on Re^4: TCP socket and fork

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://777223]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (14)
As of 2014-09-23 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (228 votes), past polls