Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 romping around the Monastery: (12)
As of 2015-07-31 10:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls