Configuring Elastic IP Address
Amazon EC2 provides two types of IP addresses:
1) Instance IP address: each instance is assigned a dynamic IP address, assigned by DHCP. These are on the internal, private network, assigned by DHCP. They will be different each time a SoftNAS instance is booted.
2) Elastic IP address: these are static IP addresses, and highly-recommended for use with SoftNAS. These IP addresses are public-facing, static IP addresses which are "associated" with a particular instance. While associated with an instance, these IP addresses are always the same, so you have a predictable way to address each SoftNAS instance in the environment. Elastic IP addresses are termed "elastic" as they can be dynamically reassigned (moved) from once instance to another.
Elastic IP's, HA and Dynamic DNS
Elastic IP's provide the flexibility to create a high-availability configuration.
For example, let's say you have two SoftNAS instances with replication between them configured as an Active-Passive HA pair in different availability zones in the same region (or across regions, as applicable to your needs). Let's call these SoftNAS instances "A" and "B", where "A" is currently the active, primary NAS.
You could assign three elastic IP addresses - one for A, one for B, and one "floating" elastic IP used for failover. Applications and DNS for SoftNAS would reference the third elastic IP, as shown below.
Elastic IP Assigned To
-------------- --------------------------
IP 1 SoftNAS Instance "A"
IP 2 SoftNAS Instance "B"
IP 3 DNS - points to Instance "A" initially
In this configuration, IP 1 and IP 2 are used to administer and perform replication between SoftNAS instances. DNS points to "A", which is the active SoftNAS instance. In this configuration, replication is configured to flow from "A" to "B", so that "B" is effectively a mirror of "A", always ready for a failover.
In the event of a zone failure, physical disk failure or scheduled downtime / maintenance, IP 3 can be reassigned to "B", which becomes the active instance. When "A" is restored, replication can be reconfigured to flow from "B" to "A".
Note: It can take up to thirty seconds for an elastic IP reassignment to a different instance to be completed.
Alternatively, you could simply use IP 1 and IP 2 (without IP 3) and use dynamic DNS with a short TTL (time to live) and perform failover by simply reassigning the IP 1 or IP 2 via dynamic DNS.
There are many different ways to configure HA and IP addresses - the above represents just a few ways, provided to illustrate the flexibility provided by elastic IP addressing and/or dynamic DNS.
For more information, refer to the following links.