Varnish
Varnish
Varnish is a web-application accelerator and caching HTTP reverse proxy designed for dynamic, high-traffic websites. On the platform, it is bundled with NGINX so HTTPS traffic can be decrypted by NGINX and then passed to Varnish for caching and further processing.
Varnish Overview
Varnish focuses primarily on HTTP acceleration and caching. Within the platform implementation, NGINX runs on port 443 as the HTTPS proxy. After incoming encrypted traffic is decrypted, NGINX forwards it to Varnish on port 80.
varnishstat, varnishhist, and the live traffic analyzer varnishlog.systemd initialization daemon.Varnish Load Balancer Installation
- Log in to the PaaS dashboard.
- Click New environment in the upper-left corner.

- Open the required programming-language tab and activate the Balancing section.
- Select Varnish from the corresponding load-balancer list.
- Configure the remaining topology: application servers, other nodes, cloudlet limits, and public IPs where required.
- Enter an environment name, for example
varnish, and click Create.

The environment is created within a few minutes and Varnish is placed in front of the configured backend application servers.

Varnish Server Configurations
The Varnish load balancer can be configured through either of these platform tools:
- Connect directly to the Varnish server through the platform SSH Gateway.
- Use the embedded Configuration File Manager to edit configuration files from the dashboard.


Link Backend Servers
Backend servers can be linked even when they belong to other environments. Add a backend definition at the beginning of:
vcl > default.vcl
Use this format:
backend server_identifier {
.host = "server_internal_ip";
.port = "80";
}
Then, in the sub vcl_init section below the new myclust = directors.hash(); line, add:
myclust.add_backend(server_identifier, 1);

Save the changes and restart the Varnish load-balancer server to apply the updated backend configuration.
Custom Varnish Modules
Custom Varnish modules can be applied by uploading them into the vmods directory.

Varnish Daemon Parameters
Initial Varnish daemon parameters are read every time the balancer starts. These values can be adjusted in:
sysconfig > varnish

Expected Result
Varnish is deployed as an HTTP caching reverse proxy in front of the selected backend application servers. HTTPS traffic can be terminated by the bundled NGINX proxy, cached traffic is handled by Varnish, and backend, module, and daemon settings can be managed through the dashboard or SSH.
Important Notes
- Varnish is focused on HTTP acceleration and caching rather than advanced load-balancing logic.
- NGINX handles HTTPS traffic on port 443 and forwards decrypted requests to Varnish on port 80.
- A public IP is required for direct HTTP/3 communication.
- Backend servers from other environments can be linked through
default.vcl. - Save configuration changes and restart the Varnish server when required.
- Custom modules are uploaded to the
vmodsdirectory. - Startup daemon parameters are managed in
sysconfig > varnish.
