RS host 192.168.100.4 中,nginx返回值中设为 1
RS host 192.168.100.5中,nginx 返回值中设为 2
root@ubuntu22-1:~# cat /var/www/html/index.nginx-debian.html
This is Server 1 !
root@ubuntu22-2:~# cat /var/www/html/index.nginx-debian.html
This is Server 2 !
服务器ping 负载均衡器,连同正常
root@ubuntu22:~# ping 192.168.100.100
PING 192.168.100.100 (192.168.100.100) 56(84) bytes of data.
64 bytes from 192.168.100.100: icmp_seq=1 ttl=64 time=0.381 ms
64 bytes from 192.168.100.100: icmp_seq=2 ttl=64 time=0.106 ms
^C
--- 192.168.100.100 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1026ms
rtt min/avg/max/mdev = 0.106/0.243/0.381/0.137 ms
root@ubuntu22:~# ping 192.168.100.200
PING 192.168.100.200 (192.168.100.200) 56(84) bytes of data.
64 bytes from 192.168.100.200: icmp_seq=1 ttl=64 time=0.295 ms
64 bytes from 192.168.100.200: icmp_seq=2 ttl=64 time=0.125 ms
^C
--- 192.168.100.200 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1005ms
rtt min/avg/max/mdev = 0.125/0.210/0.295/0.085 ms