ABOUT YOU TECH
May 24, 2017 · 1 min read

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

Want to know more ABOUT TECH?

ABOUT YOU TECH

Written by

AY Dev news — fast & flexible. Check our vacancies https://corporate.aboutyou.de/en/jobs or our large-scale eCommerce infrastructure https://cloud.aboutyou.com

ABOUT YOU TECH blog

Do you want to know more ABOUT TECH? What we're developing? Which technologies we're using? Have a look at corporate.aboutyou.de/de/jobs. We successfully launched the 1st eCommerce infrastructure for large scale & innovative retail - ABOUT YOU CLOUD see https://cloud.aboutyou.com

ABOUT YOU TECH

Written by

AY Dev news — fast & flexible. Check our vacancies https://corporate.aboutyou.de/en/jobs or our large-scale eCommerce infrastructure https://cloud.aboutyou.com

ABOUT YOU TECH blog

Do you want to know more ABOUT TECH? What we're developing? Which technologies we're using? Have a look at corporate.aboutyou.de/de/jobs. We successfully launched the 1st eCommerce infrastructure for large scale & innovative retail - ABOUT YOU CLOUD see https://cloud.aboutyou.com

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store