Torben
Torben

Reputation: 102

Load balancer for building a hybrid cloud with AWS

I have several Tomcat instances deployed in an AWS cloud(ElasticBeansTalk). There is load balancer in EC2, but only to balance the load between the AWS tomcats. Now I want to integrate some tomcats hosted on a private server. My thought was to use Route53 from Amazon but apparently I cannot add 2 different cnames to the same (sub)domain. Is there a way to integrate these tomcats?

Upvotes: 1

Views: 281

Answers (1)

Michael - sqlbot
Michael - sqlbot

Reputation: 179174

A CNAME is a pointer to the "canonical" (real) name of host, so, by definition, there can only be one such value for any hostname.

Route 53 introduced the Alias concept to work around this, so what you probably need to be doing is creating weighted resource record set, using an alias A record to reference your ELB, instead of a cname.

http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/WeightedResourceRecordSets.html

Depending on the locations of the cloud and private machines, machine capacity, availability, you motivation for wanting to hybridize things, the cost of connectivity vs thr value of uptime, and probably a lot of other factors, load balancing with DNS may be too primitive, so you might alternately consider an EC2-hosted http reverse proxy (standalone, or behind an ELB, itself) to make more sophosticated balancing decisions.

I route a significant portion of my web requests through a group of HAProxy instances running on EC2 even when the destination machines are not cloud-hosted because of the flexibility and availability benefits I see in that approach, which (to me) outweigh the cost of the EC2 instances and bandwidth. So far, I've never had an outage event caused by that portion of the stack.

Upvotes: 1

Related Questions