I intend to run a few tiny ARM "physical cloud" servers behind a load balancer(either HAProxy or nginx itself), but i can't decide where to put Varnish in the whole mess.
I can either have it on each instance, doing the job locally, but seeing that the contents will be the same it seems kind of a waste.
I can also have it on the same instance as the load balancer - but that creates the question - in front of or behind it? To me, logically, it should be in front of - if it can fetch the page from cache, there's no need to bother the load balancer with the request. And, i can even remove the load balancer and use Varnish to round robin between the backend instances.
But i found a multitude of different solutions online, without any (recent) benchmarks or pros/cons of either variant, so i can't decide are there any problems with my "ideal" scenario (Varnish as a load balancer and caching engine).
So - is it feasible to use Varnish as a load balancer? If not, should i put it in front of or behind the load balancer itself?