{"id":12067,"date":"2022-01-17T06:00:26","date_gmt":"2022-01-17T11:00:26","guid":{"rendered":"https:\/\/blog.litespeedtech.com\/?p=12067"},"modified":"2022-01-17T06:00:26","modified_gmt":"2022-01-17T11:00:26","slug":"failover-strategy-for-web-adc","status":"publish","type":"post","link":"https:\/\/lswp.store\/index.php\/2022\/01\/17\/failover-strategy-for-web-adc\/","title":{"rendered":"The New Failover Strategy for Web ADC"},"content":{"rendered":"<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-large wp-image-12069\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-1024x512.png\" alt=\"Failover Strategy with LiteSpeed Web ADC\" width=\"1024\" height=\"512\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-1024x512.png 1024w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-300x150.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-768x384.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-1536x768.png 1536w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-2048x1024.png 2048w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-1320x660.png 1320w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-600x300.png 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>LiteSpeed Web ADC is a high-performing HTTP load balancer and application delivery controller. Load balancing optimizes response time by efficiently distributing incoming traffic across a cluster of backend servers. There are a variety of strategies that can be used to determine the optimal server for a task\u2019s delegation, including Web ADC\u2019s new strategy: Failover.<\/p>\n<h2>Web ADC Load Balancing Strategies<\/h2>\n<p>LiteSpeed Web ADC provides five load-balancing strategies to choose from. These algorithms define how the backend servers should be used by the ADC when distributing requests.<\/p>\n<p>The first four of these, you may already be familiar with:<\/p>\n<ul>\n<li><strong>Round Robin<\/strong>: Cycle through a list of backend server instances in order<\/li>\n<li><strong>Least Load<\/strong>: Choose the server with the lightest current workload<\/li>\n<li><strong>Least Session<\/strong>: Choose the server with the fewest associated sessions<\/li>\n<li><strong>Fastest Response<\/strong>: Choose the server that responds fastest to a backend worker ping<\/li>\n<\/ul>\n<p>And the new strategy:<\/p>\n<ul>\n<li><strong>Failover<\/strong>: Always choose one primary server, and switch to one of the backups, only if the primary server fails<\/li>\n<\/ul>\n<h2>The New Web ADC Failover Strategy<\/h2>\n<p>Let\u2019s talk more about the new <strong>Failover<\/strong> strategy. You assign priorities to each backend server, and the Failover algorithm chooses the one with the highest priority. If that node becomes unhealthy, the node with the next highest priority is selected. Once the higher-priority node recovers, it is put back into rotation with its original priority restored.<\/p>\n<p>It\u2019s worth noting that this load balancing strategy is not really about balance at all. In Web ADC\u2019s other four strategies, the idea is to share the load among all backend servers in a way that does not overwhelm any one of them.<\/p>\n<p>But Failover is not about sharing the load. It is about making sure there are fallbacks in place to keep data highly available.<\/p>\n<h3>Example<\/h3>\n<p>Let\u2019s compare the Failover strategy with Round Robin, to see how requests are distributed under normal circumstances, and in the situation where a server fails.<\/p>\n<p>We have three backend servers:<\/p>\n<ol type=\"A\">\n<li>Highest priority<\/li>\n<li>Medium priority<\/li>\n<li>Lowest priority<\/li>\n<\/ol>\n<p>Here\u2019s how the Round Robin and Failover strategies would distribute six requests (1,2,3,4,5,6), each from a unique IP:<\/p>\n<ul>\n<li>Round Robin: A, B, C, A, B, C<\/li>\n<li>Failover: A, A, A, A, A, A<\/li>\n<\/ul>\n<p>What if Server A went down, was unavailable for the fourth request, and did not recover?<\/p>\n<ul>\n<li>Round Robin: A, B, C, B, C, B<\/li>\n<li>Failover: A, A, A, B, B, B<\/li>\n<\/ul>\n<p>What if Server A failed on the fourth request, but had recovered in time for the sixth?<\/p>\n<ul>\n<li>Round Robin: A, B, C, B, C, A<\/li>\n<li>Failover: A, A, A, B, B, A<\/li>\n<\/ul>\n<h2>How to Change Web ADC\u2019s Load Balancing Strategy<\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-12073\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-a-1024x752.png\" alt=\"Configure Load Balancing Failover Strategy\" width=\"1024\" height=\"752\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-a-1024x752.png 1024w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-a-300x220.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-a-768x564.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-a-600x441.png 600w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover-a.png 1047w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>You\u2019ll find the load balancing strategies in general cluster configuration.<\/p>\n<p>In LiteSpeed Web ADC\u2019s WebAdmin Console, navigate to <strong>Clusters<\/strong>, and <strong>Edit<\/strong> the cluster you want to change. Then, in the <strong>General<\/strong> tab, click <strong>Edit<\/strong> and select your desired <strong>Strategy<\/strong> from the drop-down list. Save your changes, and restart Web ADC.<\/p>\n<p><strong><em>NOTE<\/em><\/strong><em>: Strategy configuration is available for <\/em><em><a href=\"https:\/\/www.litespeedtech.com\/products\/litespeed-web-adc\/features\/webadc-zero-conf\">ZeroConf<\/a>, but it is not yet possible to specify a priority per backend server. We&#8217;re planning to add this functionality, though, and we\u2019ll let you know when it\u2019s ready!<\/em><\/p>\n<h2>Conclusion<\/h2>\n<p>Different organizations have their own uses and requirements for having a proxy like Web ADC in front of their application servers. Maybe the backend is very heavy (like for a Magento store), or the site is exceptionally busy. In both of these cases, multiple backends help support the load and keep the site available.<\/p>\n<p>Web ADC\u2019s new Failover algorithm provides confidence for you, and uninterrupted service for your visitors. In the event of primary backend server failure, Web ADC delivers requests seamlessly to the other servers, and keeps your data highly available.<\/p>\n<p>Don\u2019t have LiteSpeed Web ADC yet? <a href=\"https:\/\/www.litespeedtech.com\/products\/litespeed-web-adc\/download\/get-a-trial-license\">Then try it for free!<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>LiteSpeed Web ADC has added a Failover strategy as the fifth algorithm available in the cluster load balancing configuration.<\/p>\n","protected":false},"author":1,"featured_media":12069,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[26],"tags":[163],"class_list":["post-12067","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-load-balancer","tag-load-balancing"],"jetpack_featured_media_url":"https:\/\/lswp.store\/wp-content\/uploads\/2022\/01\/adc-failover.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/12067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/comments?post=12067"}],"version-history":[{"count":0,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/12067\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media\/12069"}],"wp:attachment":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media?parent=12067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/categories?post=12067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/tags?post=12067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}