Welcome to WebmasterWorld Guest from 18.104.22.168
GET fileName HTTP/1.1
And we get a response back. We then make another, similar, request on the same connection, and we get a response back, but there's a huge delay in-between sending our request and getting the response for the second request.
To give you an idea of the times:
request 1: sent at 0 ms, received at 1 ms
request 2: sent at 1 ms, received at 41 ms
request 3: sent at 41 ms, received at 81 ms
request 4: sent at 81 ms, received at 121 ms
And we see this 40 ms delay all throughout. Clearly it doesn't take that long to deliver the file, so we're not sure what gives...why the delay? Just FYI, we're testing on a high-bandwidth, low-latency network.
Also, we do HTTP pipelining, and when we send all these requests at once on one connection, we get the response back extremely quick--we're just not sure why the 40 ms or so delay between requests on the same persistent connection and not on the pipelined connection. There's almost no lag between the machine, so we're not sure what's up.
Not sure if it's a setting we can change, something we're doing wrong, or something apache's just doing slowly.
This is a C program we are writing (not a typical client). We get the first response back fine (as we do for all of the other ones...they are just slow). We know we are waiting on the Unix read command. Maybe it doesn't write() immediately on our second request, but it does return (not sure how Unix handles it) and there's no delay for the first request.
Any other suggestions?