.
# with http load balancing
$ for ((i=1;i<=10;i++)); do echo total_time: $(echo "`curl -s -o /dev/null -w '1000*%{time_total}\n' -s http://34.120.28.161`" | bc); done
total_time: 115.000
total_time: 129.000
total_time: 105.000
total_time: 118.000
total_time: 105.000
total_time: 119.000
total_time: 126.000
total_time: 127.000
total_time: 127.000
total_time: 107.000
# with tcp
$ for ((i=1;i<=10;i++)); do echo total_time: $(echo "`curl -s -o /dev/null -w '1000*%{time_total}\n' -s http://34.70.109.104`" | bc); done
total_time: 208.000
total_time: 201.000
total_time: 198.000
total_time: 200.000
total_time: 199.000
total_time: 200.000
total_time: 199.000
total_time: 200.000
total_time: 198.000
total_time: 200.000
# the performance changed from
# previous
# $ cat /proc/sys/net/ipv4/tcp_rmem
# 4096 87380 6291456
[ 3] local 10.40.0.2 port 34290 connected with 34.77.51.166 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.2 sec 6.38 MBytes 5.26 Mbits/sec
$ sudo sysctl -w net.ipv4.tcp_rmem="4096 65536 131072"
# later
[ 3] local 10.40.0.2 port 34290 connected with 34.77.51.166 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.2 sec 6.38 MBytes 5.26 Mbits/sec