PROXY protocol support in Varnish

A tech talk with Combell tech evangelist Thijs Feryn, about the power of the combination of Varnish & HAProxy.

Why an extra proxy?

At Combell, you can also choose performance hosting, which includes caching provided via Varnish. Varnish, a reverse caching proxy server, gives wings to your website and has now become a standard in web hosting. But Varnish also has a few weaknesses. For instance, it cannot support SSL (and the secure https:// connection) without extra help. Moreover, Varnish does not display the visitor’s real IP on your app. Actually, you would need another proxy server to solve this problem, but adding multiple proxies in front of a web server turns out to be a quite complicated and demanding task.

However, the PROXY Protocol designed by HAProxy found a way to solve the problem. Via a separate protocol, the information about the original connection between the client and the proxy right in front of it is stored and submitted. This is a significant improvement, because the information about the IP of the visitor is very important for many applications – if only for web stats and SEO.

In addition, HAProxy is capable of handling SSL sessions, processing all incoming connections, and balancing the load correctly (load balancing).

What about the implementation?

What HAProxy exactly does and how you should implement it is no bed of roses for the average user. But if there is one person who can explain this in plain language, it is undeniably Combell tech evangelist Thijs Feryn, who is the man behind several tech talks you probably already read before.