{"action":"created","comment":{"url":"https://api.github.com/repos/linode/docs/pulls/comments/215411552","pull_request_review_id":152671157,"id":215411552,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTQxMTU1Mg==","diff_hunk":"@@ -0,0 +1,119 @@\n+---\n+author:\n+  name: Linode\n+  email: docs@linode.com\n+description: 'Using a NodeBalancer to begin managing a simple web application.'\n+keywords: [\"nodebalancers\", \"nodebalancer\", \"load balancers\", \"load balancer\", \"load balancing\", \"high availability\", \"ha\"]\n+license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'\n+aliases: ['nodebalancers/getting-started/','linode-platform/nodebalancer-howto/']\n+modified: 2018-08-21\n+modified_by:\n+  name: Linode\n+published: 2015-02-12\n+title: Getting Started with NodeBalancers\n+hiddenguide: true\n+---\n+\n+![Getting Started with NodeBalancers](Getting-Started-with-NodeBalancers-smg.jpg)\n+\n+Nearly all applications that are built using Linodes can benefit from load balancing, and load balancing itself is the key to expanding an application to larger numbers of users. Linode now provides NodeBalancers, which can ease the deployment and administration of a load balancer.\n+\n+NodeBalancers are built for high availability and designed to be \"set and forgotten\". The most difficult part of transitioning to a NodeBalancer is simply making sure your application works well in the new environment. In this guide, we will examine a common use case: using a NodeBalancer to load balance a website and prepare it for scaling to thousands of users.\n+\n+This guide provides a high-level overview of transitioning to a NodeBalancer, but it's outside this page's scope to explain each application a NodeBalancer could balance. For more information on various applications that might be useful behind NodeBalancer, see the rest of Linode Guides & Tutorials.\n+\n+## Overview\n+\n+A NodeBalancer listens on a public IP address for incoming connections, then uses configurable rules to select a backend node (out of one or more) to which to send the connection. In HTTP mode, NodeBalancers can reach into the incoming web request and make decisions based on it.\n+\n+A NodeBalancer allows the incoming load to your application to be spread over any number of Linodes. This, however, comes with new challenges: many web applications have sessions that do not exist outside of the backend node. For this reason, NodeBalancers allow you to specify that the same client should land on the same backend Linode.\n+\n+As an example, this guide will start with a typical, simple web application.\n+\n+![The web application when the guide starts.](806-starting-point.png)\n+\n+There are a few drawbacks to making this application scale, namely that any modifications require updating DNS (which takes time) or inflicting users with downtime. NodeBalancers can bring administrative ease to this application by becoming its front face.\n+\n+![Diagram after putting NodeBalancer in charge of the web application.](807-first-step.png)\n+\n+Now, backend Linodes can be added or removed to the work load seamlessly, without end users noticing any downtime.\n+\n+![Diagram after adding a second web server node.](808-scaling.png)\n+\n+Additionally, NodeBalancer will watch each backend for failure, rerouting users to working backends transparently and without any manual intervention.\n+\n+## Configuring a NodeBalancer\n+\n+Sticking with the simple web application example above, the backend Linode currently powering it must have a private IP address. If it does not, add one now and configure the Linode for [static networking](/docs/networking/configuring-static-ip-interfaces/) -- this will also be a good opportunity to do the same for the database server, since private network traffic is unbilled. Reboot if necessary, and configure your web application to respond on the private IP address, if it is not already.\n+\n+1.  Visit the NodeBalancers page in the Linode Manager and select **Add a NodeBalancer**.\n+\n+    [![The NodeBalancer page.](nodebalancers-tab-small.png \"The NodeBalancers page\")](nodebalancers-tab.png)\n+\n+2.  For the example web application, only one NodeBalancer is needed. Add one in the same data center that your backend Linodes are located in.\n+\n+    [![The NodeBalancer creation screen.](nodebalancers-create-choose-region-small.png \"The NodeBalancer creation screen.\")](nodebalancers-create-choose-region.png)\n+\n+3.  A NodeBalancer is configured using ports, and let's say our example web application uses only one: port 80 for regular HTTP traffic.\n+\n+    ![Adding a port configuration to a NodeBalancer.](nodebalancers-settings.png \"Adding a port configuration to a NodeBalancer\")\n+\n+    **HTTP**\n+\n+    For the traditional web application, the settings in the screenshot above are a good start. HTTP cookie stickiness is preferred so that the same client will always land on the same backend -- for a simple web application that keeps sessions in memory, this is necessary to avoid session errors on clients.\n+\n+    **HTTPS**\n+\n+    If you select the HTTPS protocol, two new fields will appear where you can add your SSL certificate, chained certificates (if applicable) and a private key (which must not have passphrase protection).\n+\n+    Every ten seconds, NodeBalancer will request the root of the web application and look for a valid response code. With our example setup, there is only one backend node (which we will add shortly); if the backend goes down, NodeBalancer will serve a plain 503 Service Unavailable error page. This is more desirable than refusing connections or making browsers wait for a timeout.\n+\n+4.  Now we must add the single backend node to the NodeBalancer's configuration. Point this at the private IP address of your web server Linode.\n+\n+    [![Adding a backend node to a NodeBalancer.](nodebalancers-backend-nodes-small.png \"Adding a backend node to a NodeBalancer\")](nodebalancers-backend-nodes.png)\n+\n+    These configuration changes will take a few moments to be reflected by your NodeBalancer. If everything is configured on your backend correctly, once the changes have gone through, the **Node Status** column will update to **1 up / 0 down**.\n+\n+    [![The backend node has been added, and is now status UP.](nodebalancers-1up-small.png \"The backend node has been added, and is now status UP\")](nodebalancers-1up.png)\n+\n+    If the backend status reports **0 up / 1 down**, check to make sure that your web application is configured to respond on the Linode's private IP address.  You do this by adding the private IP address to your /etc/hosts file on your Linode and then reboot your Linode. There might be a virtual host mismatch as well -- check the notes in the next section.\n+\n+5.  Now that the backend is up, go directly to your NodeBalancer's IP address in a browser. You should see your web application as the NodeBalancer proxies the traffic through.\n+\n+    [![Viewing the NodeBalancer-driven web site in a browser.](nodebalancers-hello-world.png)](nodebalancers-hello-world.png)\n+\n+### A Note about Virtual Hosts\n+\n+You might not see the web application that you expect when you go directly to the NodeBalancer's IP address. This is due to virtual hosts, and is not an issue unique to NodeBalancers. In the default configurations of many web servers, an application might only be configured to respond for certain hostnames. This can impact testing NodeBalancers as well as the behavior of their health checks.\n+\n+It is important to configure the \"default\" virtual host in your web server to point at something useful. NodeBalancer will pass the Host header from a browser untouched, so virtual hosts will work entirely normally once you are pointing a domain at the NodeBalancer. It is only mentioned here because testing NodeBalancers can demonstrate quirks in a web server's configuration, particularly when browsing by the NodeBalancer's IP address.\n+\n+ {{< note >}}\n+Health checks are transmitted with a Host header (in HTTP/1.0 mode).\n+{{< /note >}}\n+\n+## Putting the NodeBalancer in Charge\n+\n+Your NodeBalancer is now working and is able to pass traffic to your web application. It is important to note at this point that configuring the NodeBalancer has not impacted your application's normal operations at all -- you can test NodeBalancer without your users ever knowing. The only exception to this would be when adding a private IP address, if necessary.","path":"docs/platform/nodebalancer/getting-started-with-nodebalancers-new-manager/index.md","position":97,"original_position":97,"commit_id":"5633b3df506bfa318f03efb65604821a86adabce","original_commit_id":"5633b3df506bfa318f03efb65604821a86adabce","user":{"login":"Jskobos","id":1624067,"node_id":"MDQ6VXNlcjE2MjQwNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/1624067?v=4","gravatar_id":"","url":"https://api.github.com/users/Jskobos","html_url":"https://github.com/Jskobos","followers_url":"https://api.github.com/users/Jskobos/followers","following_url":"https://api.github.com/users/Jskobos/following{/other_user}","gists_url":"https://api.github.com/users/Jskobos/gists{/gist_id}","starred_url":"https://api.github.com/users/Jskobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jskobos/subscriptions","organizations_url":"https://api.github.com/users/Jskobos/orgs","repos_url":"https://api.github.com/users/Jskobos/repos","events_url":"https://api.github.com/users/Jskobos/events{/privacy}","received_events_url":"https://api.github.com/users/Jskobos/received_events","type":"User","site_admin":false},"body":"\"The only exception to this would be when adding a private IP address, if necessary.\" <-- this is a little unclear. You can add a private IP to a Linode without affecting anything. Please explain.","created_at":"2018-09-05T20:17:40Z","updated_at":"2018-09-05T20:31:25Z","html_url":"https://github.com/linode/docs/pull/1984#discussion_r215411552","pull_request_url":"https://api.github.com/repos/linode/docs/pulls/1984","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/linode/docs/pulls/comments/215411552"},"html":{"href":"https://github.com/linode/docs/pull/1984#discussion_r215411552"},"pull_request":{"href":"https://api.github.com/repos/linode/docs/pulls/1984"}}},"pull_request":{"url":"https://api.github.com/repos/linode/docs/pulls/1984","id":209920864,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5OTIwODY0","html_url":"https://github.com/linode/docs/pull/1984","diff_url":"https://github.com/linode/docs/pull/1984.diff","patch_url":"https://github.com/linode/docs/pull/1984.patch","issue_url":"https://api.github.com/repos/linode/docs/issues/1984","number":1984,"state":"open","locked":false,"title":"[UPDATE]Getting Started with NodeBalancers","user":{"login":"andystevensname","id":3906823,"node_id":"MDQ6VXNlcjM5MDY4MjM=","avatar_url":"https://avatars3.githubusercontent.com/u/3906823?v=4","gravatar_id":"","url":"https://api.github.com/users/andystevensname","html_url":"https://github.com/andystevensname","followers_url":"https://api.github.com/users/andystevensname/followers","following_url":"https://api.github.com/users/andystevensname/following{/other_user}","gists_url":"https://api.github.com/users/andystevensname/gists{/gist_id}","starred_url":"https://api.github.com/users/andystevensname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andystevensname/subscriptions","organizations_url":"https://api.github.com/users/andystevensname/orgs","repos_url":"https://api.github.com/users/andystevensname/repos","events_url":"https://api.github.com/users/andystevensname/events{/privacy}","received_events_url":"https://api.github.com/users/andystevensname/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-21T18:47:42Z","updated_at":"2018-09-05T20:31:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1444c6d95a5b207091f1b501e75a1dae72bfc44","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/linode/docs/pulls/1984/commits","review_comments_url":"https://api.github.com/repos/linode/docs/pulls/1984/comments","review_comment_url":"https://api.github.com/repos/linode/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linode/docs/issues/1984/comments","statuses_url":"https://api.github.com/repos/linode/docs/statuses/5633b3df506bfa318f03efb65604821a86adabce","head":{"label":"andystevensname:getting-started-with-nodebalancers-new-manager","ref":"getting-started-with-nodebalancers-new-manager","sha":"5633b3df506bfa318f03efb65604821a86adabce","user":{"login":"andystevensname","id":3906823,"node_id":"MDQ6VXNlcjM5MDY4MjM=","avatar_url":"https://avatars3.githubusercontent.com/u/3906823?v=4","gravatar_id":"","url":"https://api.github.com/users/andystevensname","html_url":"https://github.com/andystevensname","followers_url":"https://api.github.com/users/andystevensname/followers","following_url":"https://api.github.com/users/andystevensname/following{/other_user}","gists_url":"https://api.github.com/users/andystevensname/gists{/gist_id}","starred_url":"https://api.github.com/users/andystevensname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andystevensname/subscriptions","organizations_url":"https://api.github.com/users/andystevensname/orgs","repos_url":"https://api.github.com/users/andystevensname/repos","events_url":"https://api.github.com/users/andystevensname/events{/privacy}","received_events_url":"https://api.github.com/users/andystevensname/received_events","type":"User","site_admin":false},"repo":{"id":144504870,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ1MDQ4NzA=","name":"docs","full_name":"andystevensname/docs","owner":{"login":"andystevensname","id":3906823,"node_id":"MDQ6VXNlcjM5MDY4MjM=","avatar_url":"https://avatars3.githubusercontent.com/u/3906823?v=4","gravatar_id":"","url":"https://api.github.com/users/andystevensname","html_url":"https://github.com/andystevensname","followers_url":"https://api.github.com/users/andystevensname/followers","following_url":"https://api.github.com/users/andystevensname/following{/other_user}","gists_url":"https://api.github.com/users/andystevensname/gists{/gist_id}","starred_url":"https://api.github.com/users/andystevensname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andystevensname/subscriptions","organizations_url":"https://api.github.com/users/andystevensname/orgs","repos_url":"https://api.github.com/users/andystevensname/repos","events_url":"https://api.github.com/users/andystevensname/events{/privacy}","received_events_url":"https://api.github.com/users/andystevensname/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andystevensname/docs","description":"Linode guides and tutorials.","fork":true,"url":"https://api.github.com/repos/andystevensname/docs","forks_url":"https://api.github.com/repos/andystevensname/docs/forks","keys_url":"https://api.github.com/repos/andystevensname/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andystevensname/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andystevensname/docs/teams","hooks_url":"https://api.github.com/repos/andystevensname/docs/hooks","issue_events_url":"https://api.github.com/repos/andystevensname/docs/issues/events{/number}","events_url":"https://api.github.com/repos/andystevensname/docs/events","assignees_url":"https://api.github.com/repos/andystevensname/docs/assignees{/user}","branches_url":"https://api.github.com/repos/andystevensname/docs/branches{/branch}","tags_url":"https://api.github.com/repos/andystevensname/docs/tags","blobs_url":"https://api.github.com/repos/andystevensname/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andystevensname/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andystevensname/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/andystevensname/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andystevensname/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/andystevensname/docs/languages","stargazers_url":"https://api.github.com/repos/andystevensname/docs/stargazers","contributors_url":"https://api.github.com/repos/andystevensname/docs/contributors","subscribers_url":"https://api.github.com/repos/andystevensname/docs/subscribers","subscription_url":"https://api.github.com/repos/andystevensname/docs/subscription","commits_url":"https://api.github.com/repos/andystevensname/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/andystevensname/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/andystevensname/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/andystevensname/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/andystevensname/docs/contents/{+path}","compare_url":"https://api.github.com/repos/andystevensname/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andystevensname/docs/merges","archive_url":"https://api.github.com/repos/andystevensname/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andystevensname/docs/downloads","issues_url":"https://api.github.com/repos/andystevensname/docs/issues{/number}","pulls_url":"https://api.github.com/repos/andystevensname/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/andystevensname/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/andystevensname/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andystevensname/docs/labels{/name}","releases_url":"https://api.github.com/repos/andystevensname/docs/releases{/id}","deployments_url":"https://api.github.com/repos/andystevensname/docs/deployments","created_at":"2018-08-12T22:22:33Z","updated_at":"2018-08-28T12:26:39Z","pushed_at":"2018-09-05T15:09:26Z","git_url":"git://github.com/andystevensname/docs.git","ssh_url":"git@github.com:andystevensname/docs.git","clone_url":"https://github.com/andystevensname/docs.git","svn_url":"https://github.com/andystevensname/docs","homepage":"https://www.linode.com/docs/","size":354261,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"linode:master","ref":"master","sha":"76cd31a5271b41ff5a80dee2137dcb5e76296b93","user":{"login":"linode","id":5184305,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxODQzMDU=","avatar_url":"https://avatars0.githubusercontent.com/u/5184305?v=4","gravatar_id":"","url":"https://api.github.com/users/linode","html_url":"https://github.com/linode","followers_url":"https://api.github.com/users/linode/followers","following_url":"https://api.github.com/users/linode/following{/other_user}","gists_url":"https://api.github.com/users/linode/gists{/gist_id}","starred_url":"https://api.github.com/users/linode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linode/subscriptions","organizations_url":"https://api.github.com/users/linode/orgs","repos_url":"https://api.github.com/users/linode/repos","events_url":"https://api.github.com/users/linode/events{/privacy}","received_events_url":"https://api.github.com/users/linode/received_events","type":"Organization","site_admin":false},"repo":{"id":22214885,"node_id":"MDEwOlJlcG9zaXRvcnkyMjIxNDg4NQ==","name":"docs","full_name":"linode/docs","owner":{"login":"linode","id":5184305,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxODQzMDU=","avatar_url":"https://avatars0.githubusercontent.com/u/5184305?v=4","gravatar_id":"","url":"https://api.github.com/users/linode","html_url":"https://github.com/linode","followers_url":"https://api.github.com/users/linode/followers","following_url":"https://api.github.com/users/linode/following{/other_user}","gists_url":"https://api.github.com/users/linode/gists{/gist_id}","starred_url":"https://api.github.com/users/linode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linode/subscriptions","organizations_url":"https://api.github.com/users/linode/orgs","repos_url":"https://api.github.com/users/linode/repos","events_url":"https://api.github.com/users/linode/events{/privacy}","received_events_url":"https://api.github.com/users/linode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linode/docs","description":"Linode guides and tutorials.","fork":false,"url":"https://api.github.com/repos/linode/docs","forks_url":"https://api.github.com/repos/linode/docs/forks","keys_url":"https://api.github.com/repos/linode/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linode/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linode/docs/teams","hooks_url":"https://api.github.com/repos/linode/docs/hooks","issue_events_url":"https://api.github.com/repos/linode/docs/issues/events{/number}","events_url":"https://api.github.com/repos/linode/docs/events","assignees_url":"https://api.github.com/repos/linode/docs/assignees{/user}","branches_url":"https://api.github.com/repos/linode/docs/branches{/branch}","tags_url":"https://api.github.com/repos/linode/docs/tags","blobs_url":"https://api.github.com/repos/linode/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linode/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linode/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/linode/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linode/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/linode/docs/languages","stargazers_url":"https://api.github.com/repos/linode/docs/stargazers","contributors_url":"https://api.github.com/repos/linode/docs/contributors","subscribers_url":"https://api.github.com/repos/linode/docs/subscribers","subscription_url":"https://api.github.com/repos/linode/docs/subscription","commits_url":"https://api.github.com/repos/linode/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/linode/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/linode/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/linode/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/linode/docs/contents/{+path}","compare_url":"https://api.github.com/repos/linode/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linode/docs/merges","archive_url":"https://api.github.com/repos/linode/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linode/docs/downloads","issues_url":"https://api.github.com/repos/linode/docs/issues{/number}","pulls_url":"https://api.github.com/repos/linode/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/linode/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/linode/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linode/docs/labels{/name}","releases_url":"https://api.github.com/repos/linode/docs/releases{/id}","deployments_url":"https://api.github.com/repos/linode/docs/deployments","created_at":"2014-07-24T13:57:47Z","updated_at":"2018-09-04T19:13:46Z","pushed_at":"2018-09-05T19:25:50Z","git_url":"git://github.com/linode/docs.git","ssh_url":"git@github.com:linode/docs.git","clone_url":"https://github.com/linode/docs.git","svn_url":"https://github.com/linode/docs","homepage":"https://www.linode.com/docs/","size":350908,"stargazers_count":875,"watchers_count":875,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":773,"mirror_url":null,"archived":false,"open_issues_count":45,"license":null,"forks":773,"open_issues":45,"watchers":875,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linode/docs/pulls/1984"},"html":{"href":"https://github.com/linode/docs/pull/1984"},"issue":{"href":"https://api.github.com/repos/linode/docs/issues/1984"},"comments":{"href":"https://api.github.com/repos/linode/docs/issues/1984/comments"},"review_comments":{"href":"https://api.github.com/repos/linode/docs/pulls/1984/comments"},"review_comment":{"href":"https://api.github.com/repos/linode/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linode/docs/pulls/1984/commits"},"statuses":{"href":"https://api.github.com/repos/linode/docs/statuses/5633b3df506bfa318f03efb65604821a86adabce"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Jskobos"}}