配置范例:
配置指导
syntax: ip_hash
context: upstream
This directive causes requests to be distributed between upstreams based on the IP-address of the client. The key for the hash is the class-C network address of the client. This method guarantees that the client request will always be transferred to the same server. But if this server is considered inoperative, then the request of this client will be transferred to another server. This gives a high probability clients will always connect to the same server.
范例:
ip_hash;
server backend4.example.com;
default: none
context: upstream