Use instance pools to create multiple compute instances from the same configuration, within the same region. You can manage the instances in an instance pool as a group. For more information about instance pools and instance configurations, see Managing Compute Instances.
Optionally, you can associate a load balancer with an instance pool. If you do this, when you add an instance to the instance pool, the instance is automatically added to the load balancer's backend set . After the instance reaches a healthy state (the instance is listening on the configured port number), incoming traffic is automatically routed to the new instance. For background information about the Load Balancing service, see Overview of Load Balancing.
Avoid entering confidential information when assigning descriptions, tags, or friendly names to your cloud resources through the Oracle Cloud Infrastructure Console, API, or CLI.
Required IAM Policy
To use Oracle Cloud Infrastructure, you must be given the required type of access in a policy written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which compartment you should work in.
For administrators: For a typical policy that gives access to instance pools and instance configurations, see Let users manage Compute instance configurations, instance pools, and cluster networks.
See this known issue for information about the policy statements that are required if the instance configuration or load balancer associated with the instance pool includes defined tags.
You can add tags to your resources to help you organize them according to your business needs. You can add tags at the time you create a resource, or you can update the resource later with the desired tags. For general information about applying tags, see Resource Tags.
By default, the instances in a pool are distributed across all fault domains in a best-effort manner based on capacity. If capacity isn't available in one fault domain, the instances are placed in other fault domains to allow the instance pool to launch successfully.
In a high availability scenario, you can require that the instances in a pool are evenly distributed across each of the fault domains that you specify. When sufficient capacity isn't available in one of the fault domains, the instance pool will not launch or scale successfully, and a work request for the instance pool will return an "out of capacity" error. To fix the capacity error, either wait for capacity to become available, or use the UpdateInstancePool operation to update the placement configuration (the availability domain and fault domain) for the instance pool.
Before you can create an instance pool, you need:
An instance configuration. An instance configuration is a template that defines the settings to use when creating instances. For more information, see Creating an Instance Configuration.
You cannot create an instance pool from an instance configuration where the image source is a boot volume.
- If you want to associate the instance pool with a load balancer, you need a load balancer and backend set. For steps to create a load balancer, see Managing Load Balancers.
Using the Console
- Open the navigation menu. Under Core Infrastructure, go to Compute and click Instance Pools.
Click Create Instance Pool.
In the Create in Compartment list, select the compartment that you want to create the instance pool in.
Enter a name for the instance pool. It doesn't have to be unique, and it cannot be changed later in the Console (but you can change it with the API).
Specify the targeted Number of Instances for the instance pool.
To select the instance configuration that you want to use, enter the following:
- Instance Configuration Compartment: The compartment that the instance configuration is in.
- Instance Configuration: The instance configuration to use.
If you want to associate a load balancer with the instance pool, select the Attach a Load Balancer check box. Then, enter the following:
- Load Balancer Compartment: The compartment that the load balancer is in.
- Load Balancer: The load balancer to associate with the instance pool.
- Backend Set: The name of the backend set on the load balancer to add instances to.
- Port: The server port on the instances to which the load balancer must direct traffic. This value applies to all instances that use this load balancer attachment.
- VNIC: The VNIC to use when adding the instance to the backend set. Instances that belong to a backend set are also called backend servers. The private IP address is used. This value applies to all instances that use this load balancer attachment.
For background information about load balancers, see Overview of Load Balancing.
Select the location where you want to place the instances:
- In the Availability Domain list, select the availability domain to launch the instances in.
If you want the instances in the pool to be placed evenly in one or more fault domains, select the Distribute instances evenly across selected fault domains check box. Then, select the fault domains to place the instances in. For more information, see Distributing Instances Across Fault Domains for High Availability.
In the Primary VNIC section, configure the network details for the instances:
- Virtual cloud network compartment: The compartment containing the network to create the instances in.
- Virtual cloud network: The virtual cloud network (VCN) to create the instances in.
- Subnet compartment: The compartment containing a subnet within the cloud network to attach the instances to.
- Subnet: A subnet within the cloud network to attach the instances to. The subnets are either public or private. Private means the instances in that subnet can't have public IP addresses. For more information, see Access to the Internet. Subnets can also be either AD-specific or regional (regional ones have "regional" after the name). We recommend using regional subnets. For more information, see About Regional Subnets.
- If secondary VNICs are defined by the instance configuration, a Secondary VNIC section appears. Select the compartments, and then select the secondary VCN and subnet for the instance pool.
- If you want the instance pool to create instances in more than one availability domain, click + Additional Selection and select a different availability domain for the instance pool. Then, repeat the previous step to specify the network information for the second availability domain.
Show Tagging Options: Optionally, you can add tags. If you have permissions to create a resource, you also have permissions to add free-form tags to that resource. To add a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you are not sure if you should add tags, skip this option (you can add tags later) or ask your administrator.
Click Create Instance Pool.
To track the progress of the operation, you can monitor the associated work request. For more information, see Using the Console to View Work Requests.
Using the API
For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.
Use these API operations to create and manage instance pools: