Our company use our own CDN based on nginx caching. 7 high loaded (40 000 RPS per server) servers in 2 datacenters.
And periodically I observer some deviations in delivery time. from 0.15 to 7.5 or even 30 seconds.
We have nginx SLA module + Graphics and monitoring. But I need to test all servers for anomaly delivery time.
#!/bin/bash
for l in ip1.x.x.x \
ip2.x.x.x \
....
ipN.x.x.x; do
echo $l;
for i in {1..1024}; do
curl -s -w "%{time_total} -- %{time_connect}\n" -o /dev/null --resolve it.randomthemes.com:443:$l https://it.randomthemes.com/favicon.ico >> ./$l.txt
done
done
for l in ip1.x.x.x \
ip2.x.x.x \
....
ipN.x.x.x; do
echo $l;
for i in {1..1024}; do
curl -s -w "%{time_total} -- %{time_connect}\n" -o /dev/null --resolve it.randomthemes.com:443:$l https://it.randomthemes.com/favicon.ico >> ./$l.txt
done
done
Then analyse ipN.x.x.x.txt any way you like.
cat | sort -n | tail -n 25
etc.
Have a nice day. I really like curl and hope this will help someone.
0 Comments.