Running EC2 Environments that require static Private IP Pools - Spotinst

Running EC2 Environments That Require Static Private IP Pools

Reading Time: 2 minutes

At Spotinst, we have begun operating under the belief that any use case can be a good use case for Spot Instances given the right set of tools.

This has led us to work hard in order to release support for running Stateful applications with both 100% availability and data consistency. Since then, Stateful applications have become a major part of our offering.

And today, we excited to announce Private IP Pools, allowing our customers to run workloads using specific private IP addresses that will be kept throughout the entire workload lifecycle.

How it works

When selected, Private IP Pooling will ensure that your instances will be associated with specific Private IPs from your Amazon VPC’s specific Subnet.

Here’s what happens under the hood:

  1. You define a list of Private IPs for the cluster. Each one of these will then be allocated to an instance in your Elastigroup.
  2. When the Private IP is in use, Elastigroup will not be able to start the requested instance and its state will be ‘paused’. At any point in time, when the private IP is free, you can “resume” the instance.
  3. Elastigroup will create the ENI and associate it to the newly created instance.  The IP address will be kept through the entire lifecycle, including any points where your Spot Instances are interrupted.
  4. When an instance replacement is taking place, Elastigroup will first save the ENI upon termination of the instance. Only then will it terminate the original instance and launch a new instance with the saved ENI.

NOTE: If the number of requested instances exceeds the number of provided address in the pool, a random IP from the subnet will be assigned to the instance.

Common Use Cases

  • A cluster that communicates internally based on private IPs
  • Customers who manage their workloads based on IP addresses
  • Migrating existing services without having to change configuration
  • Load-balanced instances that register based on private IP
  • NoSQL (Cassandra / Scylla / Mongo) databases that require a fixed set of Private IPs


  1. Log in to your Spotinst console. (
  2. Create a new Elastigroup or edit an existing group. On the ‘Compute’ page, scroll down to the ‘Stateful’ section.
  3. Check the ‘Maintain Private IP’ and ‘Assign Specific Private IPs’ checkboxes.
  4. Specify any requested IPs and add them using the blue ‘add’ button
    * Any specified IP will be added to a list of configured IPs and will be presented at the bottom of the section

API & 3rd Party Provisioning Tools

  "group": {
      "strategy": {
          "persistence": {
              "shouldPersistPrivateIp": true
      "compute": {
         "privateIps": [

That’s it! Using Private IP Pools will simplify the way you consume EC2 resources and allow you to save even more on stateful apps and other complex use cases. If you have any further questions, don’t hesitate to contact our customer success engineers at