upstream apachereadonly {
server 10.10.11.10:8011;
server 10.10.11.11:8011;
server 10.10.11.12:8011;
hash $remote_addr consistent;
}
Please note the ip_hash
of nginx only cares the first thress parts of client ip, so 10.0.0.1/24
all will go to the same backend server.
https://nginx.org/en/docs/http/ngx_http_core_module.html#variables
https://www.nginx.com/products/nginx/load-balancing/#load-balancing-methods