Nginx Plus for High Availability Load Balancing On AWS Cloud

If you have used AWS Elastic Load Balancers before, you might have come across this note while creating a new ELB:

Screen Shot 2014-11-25 at 6.10.40 pm

Because the set of IP addresses associated with a LoadBalancer can change over time, you should never create an “A” record with any specific IP address. If you want to use a friendly DNS name for your load balancer instead of the name generated by the Elastic Load Balancing service, you should create a CNAME record for the LoadBalancer DNS name, or use Amazon Route 53 to create a hosted zone. For more information, see Using Domain Names With Elastic Load Balancing.

While CNAMEs would be suitable for most use cases, there are certain situations where CNAMEs do not fit business requirements. Like,

  1. When the DNS provider does not allow CNAMEs for the naked domain. This is not an issue if you are using AWS Route53
  2. Where the client’s IT policy requires you to provide the A records for whitelisting purposes
  3. Where the application does not handle CNAMEs which resolve to multiple IPs (like Varnish)
  4. Where the application does not expire the TTLs correctly. Since the ELB IPs can change over a period of time, the application can stop working when the IP changes

In situation like above, you can run a various load balancer solutions thats available in the AWS Marketplace. Citrix Netscaler VPX Edition which runs on AWS Cloud is a very popular solution. However, these solutions require to run inside a VPC.

Nginx Plus, A commercial product which is available from the AWS Marketplace is a good fit for the following use case:

  1. Runs in Classic EC2 using a 2 instance setup
  2. Can do HTTP and HTTPs content serving along with reverse proxy features

In the next blog article, I’ll describe the setup and configuration of a 2 node Nginx Cluster on AWS Classic EC2 environment.

Shanker Balan

Shanker Balan is a devops and infrastructure freelancer with over 14 years of industry experience in large scale Internet systems. He is available for both short term and long term projects on contract. Please use the Contact Form for any enquiry.

More Posts - Website

Follow Me:
TwitterLinkedIn

Published by

Shanker Balan

Shanker Balan is a devops and infrastructure freelancer with over 14 years of industry experience in large scale Internet systems. He is available for both short term and long term projects on contract. Please use the Contact Form for any enquiry.

Leave a Reply