Databases Reference
In-Depth Information
Table 1-1. Benchmarking mod_gzip Compression
mod_gzip Off
mod_gzip On
Factor
Connection rate (conn/s)
3.2
34.6
~ 11 times faster
Connection rate (ms/conn)
312.7
28.9
~ 11 times faster
Session lifetime (sec)
4.9
3.8
~ 1.2 times faster
Total content size returned (MB)
7.4
1.5
~ 5 times smaller
Average session rate (sessions/sec)
1.06
11.55
~ 11 times faster
You can see from the benchmarks that when mod gzip is enabled, the web server is able to handle
roughly eleven times as many active connections; in other words, an order of magnitude more
connections. That is a huge benefit from a relatively simple server configuration change. You can also
see that the bandwidth savings are significant too (in terms of the difference). It is easy to overlook the
benefit that a reduction in bandwidth would have; after all, network speeds are getting faster and faster
all the time, so who really cares? Well, even though network speeds are increasing all the time, we are
also using more and more features in our websites—for example, third-party Javascript libraries—which
increase the “weight” of our page. If we can reduce the size of the data that has to be downloaded to each
user,then we are also decreasing the amount of network traffic on our infrastructure, which means that
other applications using the same infrastructure can benefit, too. It's a win all round.
Expiry Headers
In the previous section we covered compressing the web server output. In this section, we will cover the
expiry headers features which enabled browsers to cache static content locally rather than requesting it
from the web server every time. If we look again at YSlow , you can see in Figure 1-15 that we get graded
an F for the Add Expires headers test.
Search WWH ::




Custom Search