Is your load balanced website using more bandwidth under load than a single server would? In a previous article (“Status code 200 didn’t match expected: 304”), we discussed how a website may return full data content back to a client, even when the browser had the resource cached. If you believed that adding an extra server and a load balancer will increase your performance, this can be an unsettling surprise. The problem arises when two web servers are delivering different Entity Tags for the same static resource:
In this example, we have two requests made to the same public URL, but these requests were routed to different servers behind the load balancer. Notice that each server creates a slightly different ETag for the same file. As noted earlier, the client uses ETags in order to detect if a file has changed. If the load balancer redirects the client to a different server since the last time the user has visited the site, then their cache is effectively invalidated.
There are some ways to remedy this behavior. Yahoo has recommendations to remove ETags entirely if they are not being utilized by the site: http://developer.yahoo.com/performance/rules.html#etags
For IIS v6 customers, it may be easier to synchronize the ETAG_CHANGENUMBER between each server, as discussed at http://blogs.iis.net/chrisad/archive/2006/12/18/iis7-deployments-calls-for-etag-usage-review-if-using.aspx
-Frank, Engineer at Web Performance