On Fri, Apr 25, 2014 at 07:32:50PM -0700, Gergo Tisza wrote:
Merging filerepoinfo/imageinfo/imageusage/globalusage into a single API call should be possible even on the client side, but it would mean that we cannot cache anything; not sure how that affects server load (I suppose the API has its own caching mechanism, but even that must have some overhead compared to Varnish). Similarly, merging multiple calls to the same API would be possible but would make caching mostly useless.
Varnish & HTTP caching isn't employed just to reduce appserver load. In contrast to appservers, we have Varnishes deployed in all of our different locations (currently esams & ulsfo to serve Europe/Africa & North America west coast/Asia, respectively), essentially serving as our own CDN.
The difference in RTT has a multiplied effect on the total page load time. As Analytics can tell you from our recent experience with the deployment of ulsfo, this reduction in RTT can have a tremendous effect in the user experience. While backend caching (memcache), appserver speedups (HHVM) and other protocols (SPDY) can help, CDNs are ultimately the only way you can beat the speed of light.
If the content is more-or-less static (can be invalidated by either a TTL or explicit purges on content changes) and isolated, caching at the HTTP layer should be preferred.
Regards, Faidon