Varnish (software)

Varnish is a web accelerator for dynamic web pages with lots of content. Unlike other Webbeschleunigern that often arose from client-side proxies or servers, Varnish was designed from the ground up as a Web accelerator.

Formation

The project was initiated by the online branch of the Norwegian tabloid Verdens Gang. Architect and main developer is the independent Danish software developer Poul -Henning Kamp. Management, infrastructure and additional development were also provided by the Norwegian Linux consulting firm Linpro available originally. Support, management and development of Varnish was later outsourced to an independent company, Varnish Software.

Varnish is free software, which is under the BSD license. Commercial support is offered, among others, Varnish Software.

Versions

Architecture

Varnish stores data in virtual memory and lets the operating system decide what stay in memory and what is to be swapped out to disk. This helps to avoid situations in which the operating system begins to cache data as it is written by the application to the hard disk.

In addition, Varnish is heavily thread -based. Each connect to a client is treated as a separate worker thread. Is this preset limit is reached of active worker threads, incoming connections are placed in a queue overflow. Only when the preset limit this queue is reached, incoming connections are rejected.

The main configuration mechanism is the Varnish Configuration Language ( VCL), a domain-specific language that is used to write on critical issues in the request handling hooks. Most of these decisions remain left to the VCL code, which Varnish significantly more configurable and customizable than most other makes web accelerator. If a VCL script is loaded, finds a translation instead of in C, it is compiled as a shared object and linked directly into the accelerator.

A number of run-time settings control parameters such as the maximum and minimum number of worker threads and various timeouts. An interface from the command line allows you to change these parameters and compiling, loading and activating new VCL scripts without a restart of the accelerator.

In order to reduce the number of system calls to a minimum, the log data in the shared memory are stored and passed the tasks of filtering, formatting, and storage on hard disk to a separate application.

Speed

While Varnish has been developed so that threads can run side by side as smoothly as possible, the performance of Varnish can only be as good as the implementation of pthreads on the operating system. A bad malloc implementation can also unnecessary resource use and thus limit the performance.

Load distribution

Varnish supports load balancing also controlled by chance both in the round-robin method as.

799164
de