Creating an Instance Pool

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 one or more load balancers 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.

Instance pools are supported for virtual machine (VM) and bare metal instances.

Caution

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 granted security access in a policy  by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don’t have permission or are unauthorized, verify with your administrator what type of access you have 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.

Important

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.

Tagging Resources

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.

Distributing Instances Across Fault Domains for High Availability

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.

Prerequisites

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.

    Note

    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

  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instance Pools.
  2. Click Create Instance Pool.

  3. On the Add Basic Details page, do the following:

    1. Select the compartment to create the instance pool in.
    2. 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).
    3. Select the Instance configuration that you want to use.
    4. Specify the targeted Number of instances for the instance pool.
    5. 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.
  4. Click Next.
  5. On the Configure Pool Placement page, select the location where you want to place the instances. Do the following:

    1. Select the Availability domain to launch the instances in.
    2. For the Fault domains box, do one of the following things:

      • If you want the system to make a best effort to distribute instances across fault domains based on capacity, leave the box blank.
      • If you want to require that the instances in the pool are distributed evenly in one or more fault domains, select the fault domains to place the instances in. The pool will not launch or scale successfully if sufficient capacity is unavailable in the selected fault domains. For more information, see Distributing Instances Across Fault Domains for High Availability.
    3. In the Primary VNIC section, configure the network details for the instances:

      • Virtual cloud network: The virtual cloud network (VCN) to create the instances in.
      • 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.
    4. If secondary VNICs are defined by the instance configuration, a Secondary VNIC section appears. Select the secondary VCN and subnet for the instance pool.
    5. If you want the instance pool to create instances in more than one availability domain, click + Another Availability Domain. Then, repeat the previous steps.
  6. If you want to associate a load balancer with the instance pool, select the Attach a load balancer check box. Then, do the following:

    1. Select the Load balancer to associate with the instance pool.
    2. Select the Backend set on the load balancer to add instances to.
    3. In the Port box, enter 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.
    4. In the VNIC list, select 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.
    5. If you want to associate additional load balancers with the instance pool, click + Another Load Balancer. Then, repeat the previous steps. Do this for each additional load balancer you want to associate with the instance pool.

    For background information about load balancers, see Overview of Load Balancing.

  7. Click Next.
  8. Review the instance pool details, and then click Create.

    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.