Mercury

BEng Thesis

Overview

“The world-wide web has grown rapidly from a research tool in 1991 to a part of everyday life for most people. In this same time the content available has evolved from bland text pages with few images to rich multimedia, interactive and often dynamically generated pages. An ever-growing strain is placed on popular websites to handle increasing volumes of traffic and deliver pages quickly to users with a constantly decreasing attention span.”

The primary aim of this project is to produce a web switch, which enables a pool of web servers to present themselves as a single virtual server. This web switch supports throttling or downgrading of content under high load situations, attempting to ensure that “everybody gets something” rather than “some people get everything and some people get nothing”.

Details

The architecture of the proxy was split into two layers: The Routing Layer which receives requests and queries the Control Layer to determine where it should obtain the response from. It also provides monitoring data to the Control Layer detailing how long requests took. The Control Layer determines which file on which server the request should be directed to using the file system configuration data and monitoring data. It is also responsible for storing and collecting monitoring data.

The dispatching algorithm and monitors used by the Control Layer are completely configurable, and a Java API is available to allow new monitors and dispatching algorithms to be created and plugged in to the system. The default dispatching algorithm attempts to downgrade pages to lower bandwidth versions under high load to prevent the server’s outbound connection from being flooded. It also attempts to switch dynamic (CGI) pages for static (HTML) pages when the backend servers are under heavy load and responding slowly.

The two layer architecture allows the throttling functionality to be retro-fitted to any Java web switch code. In the test implementation, RabbIT was used.