michael.friscia at yale.edu
Thu May 10 13:17:42 UTC 2018
I’m working on a project to perform A/B testing with the web hosting platform. The simple version is that we are hosted everything on Azure and want to compare using their Web Apps versus running a VM with IIS.
My question is about load balancing since there seems to be two ways to go about this. First is to use a simple config where I setup the three hosts I’m testing like this:
This works but I am not sure how to set a header to indicate which host is being used.
The alternative is to use split_client and the same configuration looks like this:
split_clients "$arg_token" $ymhost
Granted the $arg_token will change to something else but for now I use that since I can manipulate it easier.
The benefit of the second is that I can add a header like X-UpstreamHost $ymhost and then I can see which host I am hitting.
The benefit of the first is using the least connected round robin approach but I can’t add a header to indicate which host is being hit. For good reasons I won’t get into, adding the header at the web app is not an option.
My question is three part
1. Which is considered the best approach to load balance for this sort of testing?
2. Is there a way to get the name of the host being used if I stick with the simpler approach that uses just the single upstream configuration?
3. What would be the best variable to use for the split_client approach to achieve closest to a round robin?
Office of Communications
Yale School of Medicine
(203) 737-7932 - office
(203) 931-5381 - mobile
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx