Setting up a cluster of servers using Amazon EC2 / Amazon WS

From Resin 4.0 Wiki

Jump to: navigation, search

There are many ways to setup up a cluster of Resin servers in Amazon EC2 / Amazon WS. You may recall that the heart of every Resin cluster is a Triad. A Triad is a group of one to three servers. The Triad is static. All other servers in a cluster can be dynamic (also called Elastic).

The problem with Amazon EC2 and second generation virtualized environments like EC2 is that the internal IP addresses change. The servers do not have a fixed IP address ahead of time. Resin configuration needs a way to determine the IP address of the Triad servers. Also you do not want cluster communication over Elastic IP addresses because it gets billed at a higher cost, and is less secure.

There a three main ways to do this:

  1. Use DNS names to register your Triad servers combined with Amazon's Route 53 (DNS Service).
  2. Use Amazon Elastic IPs and then configure Resin to exchange private IP addresses over the Elastic IP address.
  3. Setup a virtual private cloud in Amazon.

Option 3 is the most secure but the hardest to setup. Option 1 is much easier to setup and almost as secure as Option 3. Option 2 is not as clean as Option 1, and is almost as secure. All options are secure. Option 1 is likely to be the most popular option.

To simplify the discussion lets name the options as follows:

  1. DNS
  2. Elastic IP
  3. VPC (VPC is for Virtual Private Cloud)

The DNS approach means you have to start up an Amazon EC2 instance, grab its IP address, then configure that server in Amazon's DNS Service Route 53. Every time the servers are restarted or changed, the DNS server records need to be updated. If a server went down, then you would spin up a new instance, and configure the DNS entry.

The Elastic IP approach....

The VPC approach...

Personal tools
TOOLBOX
LANGUAGES