3 Tips to Boost the Performance of your Varnish Cache
阿新 • • 發佈:2018-12-29
TIP #3 : Browser optimization
Browser limits the number of concurrently HTTP requests on the same domain (RFC2616). Of course, you cannot change the client’s browser configuration, but you can work around this limitation.
To override this limit, multiple DNS A entries have to be created: cache-{s}.domain.com
For example, an image is about 30ko and could be downloaded in approximately 320ms, which is nearly 3 images per second. Let say we have a standard browser which can handle 6 connections simultaneous.
A = number of images per second in one connectionB = number of connection simultaneous in the browserC = number of subdomains D = number of images per second
A x B x C = D
In this example, a standard browser can display 72 images per second, instead of 18.
This limit can be reached when you fetch a lot of images to display a large mosaic, for instance Google Maps tiles.