|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.eureka.util.EIPManager
public class EIPManager
An AWS specific elastic ip binding utility for binding eureka
servers for a well known IP address.
Eureka clients talk to Eureka servers bound with well known
IP addresses since that is the most reliable mechanism to
discover the Eureka servers. When Eureka servers come up they bind
themselves to a well known elastic ip
This binding mechanism gravitates towards one eureka server per zone for resilience.Atleast one elastic ip should be slotted for each eureka server in a zone. If more than eureka server is launched per zone and there are not enough elastic ips slotted, the server tries to pick a free EIP slotted for other zones and if it still cannot find a free EIP, waits and keeps trying.
| Method Summary | |
|---|---|
void |
bindToEIP()
Binds an EIP to this instance. |
java.lang.String |
getCandidateEIP(java.lang.String myInstanceId,
java.lang.String myZone,
java.lang.String myPublicIP)
Get the EIP for this instance to bind to. |
static EIPManager |
getInstance()
|
void |
unbindEIP()
Unbind the EIP that this instance is associated with. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static EIPManager getInstance()
public void bindToEIP()
public void unbindEIP()
public java.lang.String getCandidateEIP(java.lang.String myInstanceId,
java.lang.String myZone,
java.lang.String myPublicIP)
if an EIP is already bound to this instance this method simply returns. Otherwise, this method tries to find an unused EIP based on the registry information. If it cannot find any unused EIP, it waits until a free EIP is available.
myInstanceId - the instance id for this instancemyZone - the zone where this instance is in.myPublicIP - the public ip of this instance
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||