I am trying to figure out a way to detect round trip times for each IP that connects to port 80 on my server. What is a good way to do this?
There are far to many connections, and pinging each ip is not practical. I was thinking, somehow measuring the time difference between when server send the syn/ack packet and when server receives the ack for it.
Is there a way to log this cheaply? Maybe using some magic tcpdump filter?
The goal of this exercise is to aggregate the data and figure if there are any routing inefficiencies. Say one ISP in one region maybe routing incorrectly, etc.
FWIW the webserver is nginx.