Varnish is a great tool for speeding up cacheable page requests, however getting it setup with HTTPS, Elastic Load Balancers and making it redundant and highly available is harder to get right.
We’ve been running Varnish with HTTPS in a simpler environment for quite some time but our recent move to AWS and a dockerised application with requirements for greater redundancy meant we found we had a number of problems to solve.
Varnish by default does not cache secure content, that is, anything served over HTTPS. In a typical setup you place Varnish in front of your web server and configure it to listen on port 80 (rather than its default 6081), then proxy any cache misses to the backend web server which you configure to listen on another port. …