Let's say I have ip_hash;
turned on for load balancing between 4 different servers. So, client's IP address is used as a hashing key to determine which server his requests get routed to.
However, for file upload, it's best to keep all files in a single server. So, I want all /upload
requests get routed to server 1 for any client. This means all requests obey IP-hash, except POST /upload
which must be sent to server 1.
Is there a way to create this exception in NGINX? Thanks!