Network Persistence
Stateful Node Network Persistence works by maintaining the EC2 node's Elastic Network Interface (ENI), allowing the persistence of both public and private IPs associated with the node.
Private IP Persistence
Private IP Persistence maintains the same private IP address for the node during Spot Node replacements. To Enable Private IP Persistence:
- If the Spot console, go to Elastigroup > Stateful Nodes and select the stateful node.
- Click Actions > Edit Configuration.
- On the Persistent Resources tab, go to Network and select
Persist Private IP. - Optionally, specify a particular private IP that the stateful node will use, otherwise a random IP is selected from the Subnet.
- The Private IP is retained in every node replacement.
Public IP Persistence
Public IP persistence maintains the nodes Elastic IP. To enable elastic IP persistence:
- If the Spot console, go to Elastigroup > Stateful Nodes and select the stateful node.
- Click Actions > Edit Configuration.
- On the Configuration tab, go to Advanced and make sure
Public IP Assignmentis set to assign a public IP (can also be set toAccording to Subnet Defaultif subnet is configured to assign a public IP). - On the Persistent Resources tab, go to Network and select a specific Elastic IP to associate with the node.
- A satateful node launched with the associated Elastic IP will then persist that IP during recycles and replacements.
Backend Actions
When the stateful node is configured to persist the public or private IP address, these actions are performed in the backend:
- An ENI is created the first time the node is Resumed and is associated with the newly created node.
- The ENI is kept throughout the entire SMI lifecycle, including when the node is Paused. This makes sure that the IP addresses remain available when the SMI is Resumed.
tip
The persisted ENI is required to maintain the stateful node. Do not delete it directly from AWS.
Example Use Cases
- A cluster that communicates internally based on private IPs.
- You need to manage your workloads based on IP addresses.
- Migrating existing services without having to change the configurations.
- Load-balanced nodes that register based on private IP.
- NoSQL (Cassandra/Scylla/Mongo) databases that require a fixed private IP.