Q: Varnish "inside each" load-balanced Web Servers will work? I have 2 load-balanced Web Servers. Then i do not want to put additional Varnish Servers in-between of these 2 Web Servers and the top Load Balancer.
So my question is:


*

*Can Varnish be installed inside each of load-balanced Web Servers?

*If so, how will be the result of serving the load-balanced domain? Will i get the same performance result like putting the Varnish on the top?


A: Yes you can certainly install varnish on each web server, and assuming your hit rate is high, you will see a performance and capacity improvement. As to whether you'll see more of an improvement over running varnish on a separate server, that can only be determined by benchmarking both scenarios. CPU-wise, varnish has a pretty small footprint.  But there are I/o considerations, file descriptor limits, memory usage calculations, etc that need to be worked out. One thing you want to be sure of is that varnish can fit its entire configured cache size in physical memory, which becomes a more complicated equation when the machine has other processes with substantial memory requirements that can grow and shrink over time.  
