{"id":16501,"date":"2017-06-03T07:22:02","date_gmt":"2017-06-02T22:22:02","guid":{"rendered":"https:\/\/jirak.net\/wp\/high-availability-for-nginx-plus-on-aws-with-keepalived-and-elastic-ip-address\/"},"modified":"2017-06-03T07:34:24","modified_gmt":"2017-06-02T22:34:24","slug":"high-availability-for-nginx-plus-on-aws-with-keepalived-and-elastic-ip-address","status":"publish","type":"post","link":"https:\/\/jirak.net\/wp\/high-availability-for-nginx-plus-on-aws-with-keepalived-and-elastic-ip-address\/","title":{"rendered":"High Availability for NGINX Plus on AWS with keepalived and Elastic IP Address"},"content":{"rendered":"<p>High Availability for NGINX Plus on AWS with keepalived and Elastic IP Address<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jirak.net\/wp\/wp-content\/uploads\/2017\/06\/aws-elastic-ip-address-switch.png\" width=\"1024\" height=\"502\"><\/p>\n<p>Part of the appeal of cloud computing is the promise of greater uptime. To achieve that, all parts of your architecture must be highly available, including the load balancer. Now you can achieve high availability (HA) for NGINX&nbsp;Plus on AWS with a new <a href=\"https:\/\/www.nginx.com\/resources\/admin-guide\/active-passive-ha-aws-elastic-ip-address\/\">solution<\/a> that combines <code>keepalived<\/code> and the AWS Elastic IP address feature.<\/p>\n<p>One widely used approach for HA on AWS is to put Elastic Load Balancer (ELB) in front of NGINX&nbsp;Plus instances. While this approach can be a good starting point, using ELB not only increases complexity and cost, but also imposes the following limitations:<\/p>\n<ul>\n<li>ELB does not expose a static IP address, which is critical requirement for some applications.<\/li>\n<li>ELB IP addresses are published using a DNS <code>CNAME<\/code> record; you cannot map a root domain (for example, <strong>example.com<\/strong>) to a <code>CNAME<\/code> unless you delegate all DNS to Route&nbsp;53.<\/li>\n<li>ELB does not support UDP, so you cannot take advantage of NGINX&nbsp;Plus&#8217; UDP load balancing.<\/li>\n<li>ELB doesn\u2019t scale quickly, so large traffic spikes can result in dropped traffic.<\/li>\n<\/ul>\n<p>To avoid these limitations, our solution eliminates ELB in favor of a combination of <code>keepalived<\/code> and an AWS <a target=\"_blank\" href=\"http:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/elastic-ip-addresses-eip.html\">Elastic IP address<\/a>. An Elastic IP address is a single static IP address assigned to an active&#8209;passive pair of NGINX&nbsp;Plus instances. If the master NGINX&nbsp;Plus instance goes out of service, <code>keeaplived<\/code> automatically promotes the backup instance to master and transfers the Elastic IP address to it as shown in the figure. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn-1.wp.nginx.com\/wp-content\/uploads\/2017\/05\/aws-elastic-ip-address-switch.png\" alt=\"When two NGINX Plus nodes hosted in AWS share an elastic IP address, the address switches to the backup automatically when the master goes down, preserving high availability\" width=\"1024\" height=\"502\" class=\"aligncenter size-full wp-image-50259\" style=\"border:2px solid #666666;padding:2px;margin:2px\" \/><\/p>\n<p>For more information, including step&#8209;by&#8209;step  instructions, see the <a href=\"https:\/\/www.nginx.com\/resources\/admin-guide\/active-passive-ha-aws-elastic-ip-address\/\">NGINX&nbsp;Plus Admin&nbsp;Guide<\/a>, where you can also find solutions for <a href=\"https:\/\/www.nginx.com\/resources\/admin-guide\/#ha\">on&#8209;premises HA and clustering<\/a>.<\/p>\n<p>New to NGINX&nbsp;Plus on AWS? Try it free for 30&nbsp;days. For links to the available AMIs, see <a href=\"https:\/\/www.nginx.com\/resources\/admin-guide\/setting-nginx-plus-environment-amazon-ec2\/\">Installing NGINX&nbsp;Plus on Amazon&nbsp;EC2<\/a>.<\/p>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/www.nginx.com\/blog\/high-availability-nginx-plus-aws-keepalived-elastic-ip-address\/\">High Availability for NGINX Plus on AWS with keepalived and Elastic IP Address<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/www.nginx.com\">NGINX<\/a>.<\/p>\n<p>Source: <a href=\"https:\/\/www.nginx.com\/blog\/high-availability-nginx-plus-aws-keepalived-elastic-ip-address\/\" target=\"_blank\">High Availability for NGINX Plus on AWS with keepalived and Elastic IP Address<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>High Availability for NGINX Plus on AWS with keepalived and Elastic IP Address Part of the appeal of cloud computing is the promise of greater uptime. To achieve that, all parts of your architecture must be highly available, including the load balancer. Now you can achieve high availability (HA) for NGINX&nbsp;Plus on AWS with a new solution that combines keepalived and the AWS Elastic IP address feature. One widely used approach for HA on AWS is to put Elastic Load Balancer (ELB) in front of NGINX&nbsp;Plus instances. While this approach can be a good starting point, using ELB not only increases complexity and cost, but also imposes the following limitations: ELB does not expose a static IP address, which is critical requirement for some applications. ELB IP addresses are published using a DNS CNAME record; you cannot map a root <a class=\"mh-excerpt-more\" href=\"https:\/\/jirak.net\/wp\/high-availability-for-nginx-plus-on-aws-with-keepalived-and-elastic-ip-address\/\" title=\"High Availability for NGINX Plus on AWS with keepalived and Elastic IP Address\">[ more&#8230; ]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":16502,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[169],"tags":[652],"class_list":["post-16501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-nginx"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/posts\/16501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/comments?post=16501"}],"version-history":[{"count":1,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/posts\/16501\/revisions"}],"predecessor-version":[{"id":16503,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/posts\/16501\/revisions\/16503"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/media\/16502"}],"wp:attachment":[{"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/media?parent=16501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/categories?post=16501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jirak.net\/wp\/wp-json\/wp\/v2\/tags?post=16501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}