The situation:
- There is a remote server.
- I am running a client program that makes calls to the server and requests data.
- These requests perform very slowly.
- The server limits the number of results to 50, and paginates the rest. So if there are 300 total results, I have to make a total of 6 separate requests.
- (Per James' comment) The data is in JSON text format.
- (Per James' other comment) The connection is an https (SSL) connection.
The owner of the server has offered to increase the number of results per page so that I can make fewer requests.
While I think this will help, I am worried that it still won't make the transaction fast enough for my purposes. I wonder: What if the problem is not the server's overhead for retrieving data? What if the biggest hit to performance is due to network bandwidth and latency?
How would I figure this out? I don't have access to the server at all. Let's say that a request takes 3 seconds to complete. Then:
- What portion of that 3 seconds is spent opening the TCP connection?
- What portion is spent sending the request data?
- What portion is spent waiting for the server to retrieve the data?
- What portion is spent waiting for all of the requested data to arrive at my machine?
I don't really want to have to roll my own TCP/IP code to get the low-level access needed to measure things like this.
I'm sure there have to be tools written for this. As I Google around, I see programs like netstat, ss, netperf, ttcp, etc. But I'm not even sure what words to use in a Google search to look for solutions to this problem.
Any ideas?