NOTE: This proposal and FS is Obsolete. Please find the re-vamped FS at https://cwiki.apache.org/confluence/display/CLOUDSTACK/portable+public+IP

Introduction

Amazon Wen Services (AWS) provides EIP (Elastic IP) addresses which are static IP's that are associated with account which allows users to dynamically re-map to any instances they own [1][2]. ElP addresses allow to mask instance or availability zone failures by programmatically remapping to any instance account owns. Static allocation and dynamic remapping capabilities signifies the 'elasticity' in EIP and differentiates from the default dynamically allocated public ip for the instance. EIP combined with availability zone are used to build fail-over application architecture in AWS [3].

CloudStack provides users with ability to acquire public IP's (that are static) that are associated with the account. Users also have control to create static nat with any instances they own but with the limitations. An acquired public IP is associated with a guest network, so public IP can only be used with instances in the guest network i.e there is no ability to re-use a acquired public IP, across the instances an account owns with in a zone. With 'regions' and 'object store' vision of CloudStack, users would be able to launch instances across the zones. But there is no ability to transfer static public IP allocated to account across the zones to build a fail over strategy. It is desirable to bring the elastic characteristics of EIP in to CloudStack. 

Goals

This proposal would like to introduce following functionality.

  1. EIP service with in 'basic' zone where acquired zone level public IP can be mapped (establish a static NAT) to any instance account owns in that zone. This will allow users to keep the services available against infrastructure failure within a basic zone
  2. EIP service with in 'advanced' zone where acquired zone level public IP can be mapped to any instance account owns in that zone. This will allow users to keep the services available against infrastructure failure within a advanced zone
  3. to introduce a new category of public IP called 'EIP' that are provisioned by admin at region level and are available for user consumption
  4. to provide EIP service across zones (both basic and advanced) where acquired region level public IP can be mapped any instance an account owns in that region. This will allow users to keep the services available against entire zone failure.

Rational for #3, is that transferring a public IP from a zone (data center) to another geographically distinct zone would need additional operational and infrastructural requirements (e.g. ability to route advertise from both data centers, ability to advertise /32 host routes etc) compared to the general public IP pool configured per zone. So these set of IP's that can be transferred across zones be treated separately (similar to AWS which maintains a public IP pool and an 'elastic IP' pool).

Purpose

Purpose of this document is to present the functional requirements and details design to achieve the goals #2, #3, #4 mentioned above. CloudStack already supports for  #1, so this document just describes how it will fit in to region level EIP service.

Document History

Version

Author

Date

Changes

Draft

Murali Reddy

15-Mar 2012

 

References

[1] http://aws.amazon.com/articles/1346

[2] http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html

[3] http://support.rightscale.com/09-Clouds/AWS/02-Amazon_EC2/Designing_Failover_Architectures_on_EC2/00-Best_Practices_for_using_Elastic_IPs_(EIP)_and_Availability_Zones

[4] http://docs.aws.amazon.com/AWSEC2/latest/APIReference/OperationList-query.html

[5] https://cwiki.apache.org/confluence/display/CLOUDSTACK/GSLB+(Global+Server+Load+Balancing)+Functional+specification+and+Design+Document

Scope & Assumptions

Functional requirements & non-requirements

EIP semantics

EIP service shall be provided at zone (basic and advanced) level and also at region level with below semantics 

EIP in AWS has the below semantics [2]:

EIP service at region level combined with advanced/basic zone level EIP service together shall provide AWS EIP like (with semantics differences) semantics.

Described region level EIP service differs from AWS EIP in following ways

Region level EIP Detailed Design

This section presents the detailed design for the region level EIP service functionality. User API are derived from the corresponding Amazon Web Services (AWS) actions ( AllocateAddress, AssociateAddress, DisassociateAddress, ReleaseAddress) [4]. 

User API

Current set of associateIpAddress, disassociateIpAddress API's used to acquire and release a public IP is restricted to zone level public IP. Also, associateIpAddress actually combines acquiring and associating the IP with a network. Once associated with a network, there is only disassociate operation available on public IP, so public IP association can not be changed from one network to another. Due to semantic differences its not best way to extend the existing set of API's dealing with public IP management to be extended to manage EIP pool of IP's. With this premise following set of API's shall be introduced.

allocateElasticIPAddress

acquires an EIP IP from the pool of elastic IP's provisioned at region level

Request parameters:

API Response: ElasticIpAddressReponse

releaseElasticIpAddress

release EIP acquired previously

Request parameters:

API response: will return 'SuccessResponse' on success. api call shall throw exception if the EIP still associated with a VM

associateElasticIpAddress

Associate acquired elastic IP with VM instance in a zone. 

Request parameters:

API Response: ElasticIpAddressReponse

disassociateElasticIpAddress

Disassociate elastic IP from a VM instance in a zone with the elastic IP

Request parameters:

API response: will return 'SuccessResponse' on success

Admin API

Following administrator API shall be introduced to add/delete/list IP addresses in to/from EIP pool

createElasticIpAddressRange

Request parameters:

API Response: list of ElasticIpAddressReponse objects

deleteElasticIpAddressRange

Request parameters:

API response: will return 'SuccessResponse' on success

User & Admin API

listElasticIpAddress

Request parameters:

API Response: list of ElasticIpAddressReponse objects

Api Response

'ElasticIpAddressReponse' shall be introduced as API response object with following details

zone id, vm id, nic id, guest IP shall be not null only if 'associated' is true.  account name and domain id shall be not null only if state is allocated or releasing

Service Layer changes

A new service 'ElasticIPService' shall be introduced with following service definitions

Region service provider

As part of GSLB feature[5] notion of region level services and providers were introduced. EIP being another region level service, A new region level service 'EIP' shall be added as region level service. New interface 'EipServiceProvider' extending 'RegionLevelServiceProivder' shall be introduced with following interface methods

NetScaler plugin changes

Schema changes

'elastic_ip_address' table shall be added with following columns

Auditing

Action Events

When user transfers from EIP from zone to another zone admin needs to be aware of the transfer so that required out-of-band actions (for e.g enabling EIP to be advertised from the new zone etc.) can be taken. A new 'Action Event' shall be generated on every association and re-association of EIP with a VM in same zone or different zone with details of source and destination zone details.

Usage events

When a EIP is acquired or released an usage event shall be generated.

Upgrade

A basic zone with EIP service will fit in to region level EIP service semantics presented. There is no upgrade specific actions to be performed for basic zones with EIP service.

UI

TBD

Limitation

Open Issues 

none