Share » Learn » eZ Publish » Using the Squid Reverse Proxy to...

Using the Squid Reverse Proxy to Improve eZ Publish Performance

Thursday 11 January 2007 11:23:00 am

  • Currently 3 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Squid is an Open Source proxy application that can also be used as a reverse proxy. The difference between a proxy and a reverse proxy is that a proxy delivers content from multiple webservers to one user, while a reverse proxy delivers content from one webserver to multiple users. For example, a normal proxy might be used to provide a degree of anonymity to a user or to access servers that would otherwise be blocked; the proxy would access many other servers on the user's behalf. On the other hand, one of the reasons for using a reverse proxy is to speed up the delivery of content to all visitors of a particular server. This article shows how to use Squid with eZ Publish to improve the performance of your website.

Squid overview

Squid is an application that caches HTTP requests, subsequently serving the same request more quickly. When requests are served from the cache, the webserver does not have to expend resources to regenerate pages, transfer images, and so on. Squid stores XHTML pages, images, CSS files, JavaScript and other data transmitted over HTTP via the proxy as long as the data is configured as cacheable by the application (eZ Publish in this case). With eZ Publish you can cache the following:

  • Complete pages by using the header override features (available in eZ Publish 3.8 and greater)
  • Static files such as CSS and JavaScript
  • Database content such as images, media and binary files

The diagram below shows an example architecture using Squid.

An example architecture using Squid

Squid resides on a separate server in front of the eZ Publish webserver(s). The Squid server caches the user HTTP requests, speeding up the serving of pages and files and also lowering the load on the eZ Publish server. With Squid, many requests are only sent through to the webserver the first time. Subsequently, they are intercepted and served by Squid until the requested item's cache expires. (Cache expiry will be discussed later in this article.) This frees up resources for unique or dynamic requests that need processing by the webserver. If you are running eZ Publish in a clustered environment, Squid should reside in front of the load balancer. This is the simplest setup and allows you to cache all servers at the same time.

36 542 Users on board!

Tutorial menu

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)