1. : One socket connection, several client requests?
I have a TCP/IP application where a client machine may be
sending several (100 a minute) separate small requests in
the form of 20 bytes to a server across the network. Each
request requires only one short response, and may wait five
or more seconds for it.
I'm currently using a connection-oriented server. For each
new request, the client connect()s to the server, the server
fork()s, a new socket descriptor is returned, and the client
and server interact over the new socket descriptor...
It was suggested that due to the volume and frequency of
requests, that the number of connect()s required is
not efficient.
It was then suggested that we could send several requests
across an already open connection, and only open a new socket
when the number of requests per socket reached a predefined
number, say five.
The client processes would need to keep track of which response
goes with which request using a request id in the request,
which the server would copy and pass back with the response.
The server would still fork a new process for each request,
and each of those processes would be able to write on the
one socket descriptor.
Does this sound reasonable? The suggestion was made to
reduce the connect()s, and improve response times for clients,
who wouldn't be waiting the extra time that it takes for
connections to be established.
However, I have never heard of this being done before, and
I'm just a bit skeptical.
If anyone does respond, feel free to refer to any of Richard
Stevens' books.
--
+---------------+------------------------------------------------+
+ +------------------------------------------------+
+ | Insert something witty here |
+---------------+------------------------------------------------+
2. Eliant 820 8mm on Solaris
3. once server reaches MaxClients setting, does this child server still accept request as normal?
4. Excessive heat and temperatures in server room
5. Cannot accept chooser connection Software caused connection abort
6. samba shares + M$
7. RH5.1 PPP connection: PPP connection persists, telnet session times out
8. Any one run msql on NT as a service?
9. Limit maximum TCP connections for NAT connection
10. internet connection dies sometims after usenet connection times out
11. cable connection died - can't do connection anymore?
12. FTP error: Can't build data connection: Connection refused.
13. How can I route to a cable modem connection AND a DSL connection?