Sitemap
ABOUT YOU TECH blog

ABOUT YOU Development and Engineering articles. Check out more content and our tech job openings on https://aboutyou.tech!

May 24, 2017

Glad to hear you will try Varnish!

For a 100% resiliency you will have to use 2 varnish servers, 2 backend (application) servers and 2 DB servers (replicated or master-master).

For the varnish servers you can setup Round-Robin DNS, so your domain will resolve in 2 IPs of your varnish servers (check our domain, www.aboutyou.de), this way the browser will try the other one if one is down. Please note the sick server has to be completely down, or respond with connection refused for the browsers to try the other one, and some clients like curl don’t have this functionality, they stick with one IP.

Another approach is to have a HA load balancer in front of your 2 varnish servers like AWS Elastic Load Balancer or Google Cloud Load Balancer that can scale with no failed requests and periodically health-check the upstream with probes too.

Regarding the second question, varnish will not redirect the user browser, but internally proxy the request to one of your application servers, without the user knowing what server responded. You can add some custom X header to debug the connections. For this to work, you just have to define 2 or more application servers in backend/cluster config as per our tutorial and make sure they respond with HTTP code 200 to the probe-url. You can check your backends with `sudo varnishadm backend.list`.

Hope this helps, good luck with your project!

--

--

ABOUT YOU TECH blog
ABOUT YOU TECH blog

Published in ABOUT YOU TECH blog

ABOUT YOU Development and Engineering articles. Check out more content and our tech job openings on https://aboutyou.tech!

ABOUT YOU TECH
ABOUT YOU TECH

Written by ABOUT YOU TECH

ABOUT YOU Development and Engineering articles. Check out more content and tech job openings on https://aboutyou.tech!

No responses yet