{"id":1344,"date":"2019-02-18T08:51:34","date_gmt":"2019-02-18T08:51:34","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw93\/?p=1344"},"modified":"2019-03-07T19:21:19","modified_gmt":"2019-03-07T19:21:19","slug":"docker-load-balancing-now-available-in-rancher-0-16","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw93\/index.php\/2019\/02\/18\/docker-load-balancing-now-available-in-rancher-0-16\/","title":{"rendered":"Docker Load Balancing Now Available in Rancher 0.16"},"content":{"rendered":"<p>Hello, my name is Alena Prokharchyk and I am a part of the software<br \/>\ndevelopment team at Rancher Labs. In this article I\u2019m going to give an<br \/>\noverview of a new feature I\u2019ve been working on, which was released this<br \/>\nweek with Rancher 0.16 &#8211; a Docker Load Balancing service. One of the<br \/>\nmost frequently requested Rancher features, load balancers are used to<br \/>\ndistribute traffic between docker containers. Now Rancher users<br \/>\ncan configure, update and scale up an integrated load balancing service<br \/>\nto meet their application needs, using either Rancher\u2019s UI or API. To<br \/>\nimplement our load balancing functionality we decided to use HAproxy,<br \/>\nwhich is deployed as a contianer, and managed by the Rancher<br \/>\norchestration functionality. With Rancher\u2019s Load Balancing capability,<br \/>\nusers are now able to use a consistent, portable load balancing service<br \/>\non any infrastructure where they can run Docker. Whether it is running<br \/>\nin a public cloud, private cloud, lab, cluster, or even on a laptop, any<br \/>\ncontainer can be a target for the load balancer.<\/p>\n<h3>Creating a Load Balancer<\/h3>\n<p>Once you have an environment running in Rancher, it is simple to create<br \/>\na Load Balancer. You\u2019ll see a new top level tab in the Rancher UI<br \/>\ncalled \u201cBalancing\u201d from which you can create and access your load<br \/>\nbalancers. <a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/Screen-Shot-2015-04-12-at-8.24.47-PM.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/Screen-Shot-2015-04-12-at-8.24.47-PM-1024x365.png\" alt=\"Screen Shot 2015-04-12 at 8.24.47\nPM\" \/><\/a><br \/>\nTo create a new load balancer click on <em>+ Add Load Balancer<\/em>. You\u2019ll<br \/>\nbe given a configuration screen to provide details on how you want the<br \/>\nload balancer to function. <a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/Screen-Shot-2015-04-12-at-8.25.05-PM.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/Screen-Shot-2015-04-12-at-8.25.05-PM-1024x798.png\" alt=\"Screen Shot 2015-04-12 at 8.25.05\nPM\" \/><\/a><br \/>\nThere are a number of different options for configuration, and I\u2019ve<br \/>\ncreated a video demonstration to walk through the process.<\/p>\n<h3>Updating an active Load Balancer<\/h3>\n<p>In some cases after your Load Balancer has been created, you might want<br \/>\nto change its settings &#8211; for example to add or remove listener ports,<br \/>\nconfigure a health check, or simply add more target containers. Rancher<br \/>\nperforms all the updates without any downtime for your application. To<br \/>\nupdate the Load Balancer, bring up the Load Balancer \u201cDetails\u201d view by<br \/>\nclicking on its name in the UI:<br \/>\n<a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/UpdateNavigation.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/UpdateNavigation-1024x486.png\" alt=\"UpdateNavigation\" \/><\/a><br \/>\nThen navigate to the toolbar of the setting you want to change, and<br \/>\nmake the update:<br \/>\n<a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/LBUpdateConfig.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/LBUpdateConfig-1024x348.png\" alt=\"LBUpdateConfig\" \/><\/a><\/p>\n<p>###<\/p>\n<h3>Understanding Health Checks<\/h3>\n<p>Health checks can be incredibly helpful when running a production<br \/>\napplication. Health checks monitor the availability of target<br \/>\ncontainers, so that if one of the load balanced containers in your app<br \/>\nbecomes unresponsive, it can be excluded from the list of balanced<br \/>\nhosts, until its functioning again. You can delegate this task to the<br \/>\nRancher Load Balancer by configuring the health check on it from the UI.<br \/>\nJust provide a monitoring URL for the target container, as well as<br \/>\ncheck intervals and healthy and unhealthy response thresholds. You can<br \/>\nsee the UI for this in the image below.<br \/>\n<a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/healthCheck.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/healthCheck-1024x358.png\" alt=\"healthCheck\" \/><\/a><\/p>\n<h3>Stickiness Policies<\/h3>\n<p>Some applications require that a user continues to connect to the same<br \/>\nbackend server within the same login session. This persistence is<br \/>\nachieved by configuring Stickiness policy on the Load Balancer. With<br \/>\nstickiness, you can control whether the session cookie is provided by<br \/>\nthe application, or directly from the load balancer.<\/p>\n<h3>Scaling your application<\/h3>\n<p>The Load Balancer service is primarily used to help scale up<br \/>\napplications as you add additional targets to the load balancer.<br \/>\nHowever, to provide an additional layer of scaling, the load balancer<br \/>\nitself can also scale across multiple hosts, creating a clustered load<br \/>\nbalancing service. With the Load Balancer deployed on multiple hosts,<br \/>\nyou can use a Global Load Balancing service, such as Amazon Web<br \/>\nServices, Route 53, to distribute incoming traffic across load<br \/>\nbalancers. This can be especially useful when running load balancers in<br \/>\ndifferent physical locations. The diagram below explains how this can be<br \/>\ndone. <a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/Screen-Shot-2015-04-08-at-5.55.10-PM.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/04\/21135821\/Screen-Shot-2015-04-08-at-5.55.10-PM.png\" alt=\"Screen Shot 2015-04-08 at 5.55.10\nPM\" \/><\/a><\/p>\n<h3>Load Balancing and Service Discovery<\/h3>\n<p>This new load balancing support has plenty of independent value, but it<br \/>\nwill also be an important part of the work we\u2019re doing on service<br \/>\ndiscovery, and support for Docker Compose. We\u2019re still working on this<br \/>\nand testing it, but you should start to see this functionality in<br \/>\nRancher over the next four to six weeks. If you\u2019d like to learn about<br \/>\nload balancing, Docker Compose, service discovery and running<br \/>\nmicroservices with Rancher, please join our next online meetup where<br \/>\nwe\u2019ll be covering all of these topics by clicking the button<br \/>\nbelow.\u00a0 Alena Prokharchyk @lemonjet <a href=\"https:\/\/github.com\/alena1108\">https:\/\/github.com\/alena1108<\/a><\/p>\n<p><a href=\"https:\/\/rancher.com\/load-balancing-support-for-docker-in-rancher\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello, my name is Alena Prokharchyk and I am a part of the software development team at Rancher Labs. In this article I\u2019m going to give an overview of a new feature I\u2019ve been working on, which was released this week with Rancher 0.16 &#8211; a Docker Load Balancing service. One of the most frequently &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw93\/index.php\/2019\/02\/18\/docker-load-balancing-now-available-in-rancher-0-16\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Docker Load Balancing Now Available in Rancher 0.16&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1344","post","type-post","status-publish","format-standard","hentry","category-kubernetes"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/1344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/comments?post=1344"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/1344\/revisions"}],"predecessor-version":[{"id":1418,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/1344\/revisions\/1418"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/media?parent=1344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/categories?post=1344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/tags?post=1344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}