AWS EC2 Spot Fleet Test

AWS Spot instances are spare instances that you can bid on. These spot instances run whenever capacity is available and the maximum price per hour for your request exceeds the Spot price. This means that if 's capacity declines or the maximum price drops, spot instances may be terminated. To automatically replenish these instances and maintain your target capacity, you can use Spot fleets.

A Spot Fleet is a collection, or fleet, of Spot Instances that is launched based on criteria that you specify when placing a Spot Fleet Request. A typical Spot Fleet Request specifies the number of instances required (target capacity) or the performance characteristics (eg., vCPUs, memory, storage, etc.) you require for your application workload, the instance types, the availability zones, and the maximum price you are willing to pay for the instances. The Spot Fleet then attempts to launch the number of Spot Instances that are required to meet the target capacity that you specified in the Spot Fleet request. Spot Instances can also be terminated if any interruptions occur due to an increase in Spot price over maximum price, an increase in demand for Spot instances, or a decrease in supply of Spot instances.

By keeping tabs on each of the Spot Fleets, administrators can quickly identify those Spot Fleets that are unable to maintain the target capacity requested. Such Spot Fleet requests could be candidates for modification. Administrators should also keep an eye out for those Spot Fleets in which too many spot instances are being terminated owing to interruptions; this can reveal if the interruptions could be the reason for the wide gap (if any) between the target and allocated capacity of the Spot Fleet. The AWS EC2 Spot Fleet test provides administrators with these useful insights, so that they can change their Spot Fleet requests (if required and possible) to maximize availability of their applications and minimize the cost of their application workload!

This test automatically discovers the Spot Fleet requests and reports the target capacity, fulfilled capacity, and pending capacity of each request. In the process, the test reveals those requests for which is unable to achieve / maintain the requested capacity. The test also reports the count of instance pools that are included in Spot Fleet requests and the number of pools that are actually eligible for fulfilling these requests. This way, the test points to those Spot Fleets with very few eligible instance pools to launch instances from. The corresponding Spot Fleet request can be scrutinized to understand the reason for the same, and modified (if required). Additionally, the test alerts administrators if many instances launched in response to a Spot Fleet request are terminating, so that they can investigate what is causing the termination.

Optionally, you can configure the test to report metrics for each instance type or Availability Zone included in the Spot Fleet requests. This analysis will help administrators further fine-tune their Spot Fleet request specifications.

Target of the test: Amazon Cloud

Agent deploying the test : A remote agent

Outputs of the test : One set of results for each Spot Fleet request / Instance type / Availability Zone

First-level descriptor: AWS Region

Second-level descriptor: Spot Fleet request / Instance type / Availability Zone, depending upon the option chosen from the Spot Filter Name.

Configurable parameters for the test
Parameter Description

Test Period

How often should the test be executed.

Host

The host for which the test is to be configured.

Access Type

eG Enterprise monitors the AWS cloud using AWS API. By default, the eG agent accesses the AWS API using a valid AWS account ID, which is assigned a special role that is specifically created for monitoring purposes. Accordingly, the Access Type parameter is set to Role by default. Furthermore, to enable the eG agent to use this default access approach, you will have to configure the eG tests with a valid AWS Account ID to Monitor and the special AWS Role Name you created for monitoring purposes.

Some AWS cloud environments however, may not support the role-based approach. Instead, they may allow cloud API requests only if such requests are signed by a valid Access Key and Secret Key. When monitoring such a cloud environment therefore, you should change the Access Type to Secret. Then, you should configure the eG tests with a valid AWS Access Key and AWS Secret Key.

Note that the Secret option may not be ideal when monitoring high-security cloud environments. This is because, such environments may issue a security mandate, which would require administrators to change the Access Key and Secret Key, often. Because of the dynamicity of the key-based approach, Amazon recommends the Role-based approach for accessing the AWS API.

AWS Account ID to Monitor

This parameter appears only when the Access Type parameter is set to Role. Specify the AWS Account ID that the eG agent should use for connecting and making requests to the AWS API. To determine your AWS Account ID, follow the steps below:

  • Login to the AWS management console. with your credentials.

  • Click on your IAM user/role on the top right corner of the AWS Console. You will see a drop-down menu containing the Account ID (see Figure 1).

    Figure 1 : Identifying the AWS Account ID

AWS Role Name

This parameter appears when the Access Type parameter is set to Role. Specify the name of the role that you have specifically created on the AWS cloud for monitoring purposes. The eG agent uses this role and the configured Account ID to connect to the AWS Cloud and pull the required metrics. To know how to create such a role, refer to Creating a New Role.

AWS Access Key, AWS Secret Key, Confirm AWS Access Key, Confirm AWS Secret Key

These parameters appear only when the Access Type parameter is set to Secret.To monitor an Amazon cloud instance using the Secret approach, the eG agent has to be configured with the access key and secret key of a user with a valid AWS account. For this purpose, we recommend that you create a special user on the AWS cloud, obtain the access and secret keys of this user, and configure this test with these keys. The procedure for this has been detailed in the Obtaining an Access key and Secret key topic. Make sure you reconfirm the access and secret keys you provide here by retyping it in the corresponding Confirm text boxes.

Proxy Host and Proxy Port

In some environments, all communication with the AWS cloud and its regions could be routed through a proxy server. In such environments, you should make sure that the eG agent connects to the cloud via the proxy server and collects metrics. To enable metrics collection via a proxy, specify the IP address of the proxy server and the port at which the server listens against the Proxy Host and Proxy Port parameters. By default, these parameters are set to none , indicating that the eG agent is not configured to communicate via a proxy, by default.

Proxy User Name, Proxy Password, and Confirm Password

If the proxy server requires authentication, then, specify a valid proxy user name and password in the Proxy User Name and Proxy Password parameters, respectively. Then, confirm the password by retyping it in the Confirm Password text box. By default, these parameters are set to none, indicating that the proxy sever does not require authentication by default.

Proxy Domain and Proxy Workstation

If a Windows NTLM proxy is to be configured for use, then additionally, you will have to configure the Windows domain name and the Windows workstation name required for the same against the Proxy Domain and Proxy Workstation parameters. If the environment does not support a Windows NTLM proxy, set these parameters to none.

Exclude Region

Here, you can provide a comma-separated list of region names or patterns of region names that you do not want to monitor. For instance, to exclude regions with names that contain 'east' and 'west' from monitoring, your specification should be: *east*,*west*

Spot Filter Name

By default, this test report metrics for each Spot Fleet Request. Accordingly, the Spot Filter Name parameter is set to FleetRequestID by default.

If required, you can override this default setting by setting the Spot Filter Name parameter to one of the following:

  • InstanceType - To make sure that this test reports metrics for each instance type included in the Spot Fleet requests, select this option.
  • Availability Zone - To make sure that this test reports metrics for each Availability Zone included in the Spot Fleet requests, select this option.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Available instance pools

By default, this measure reports the number of instance pools that are included in this Spot Fleet request.

If the Spot Filter Name is set to InstanceType, then this measure will represent the number of instance pools of this instance type, included across Spot Fleet requests.

If the Spot Filter Name is set to AvailabilityZone, then this measure will represent the number of instance pools in this Availability zone, included across Spot Fleet requests.

Number

Bids submitted capacity

By default, this measure reports the number of bids that have been made for the target capacity of this Spot Fleet request.

If the Spot Filter Name is set to InstanceType, then this measure will represent the number of bids that have been made for instances of this type, across all Spot Fleet requests.

If the Spot Filter Name is set to AvailabilityZone, then this measure will represent the number of bids that have been made for instances in this Availability Zone, across all Spot Fleet requests.

Number

Eligible instance pools

By default, this measure reports the count of instance pools that are eligible for fulfilling this Spot Fleet request.

If the Spot Filter Name is set to InstanceType, then this measure will represent the number of instance pools with instances of this type that are eligible for fulfilling one/more Spot Fleet requests.

If the Spot Filter Name is set to AvailabilityZone, then this measure will represent the number of instance pools in this Availability Zone that are eligible for fulfilling one/more Spot Fleet requests.

KB

A pool is ineligible when either (1) The Spot price is higher than the On-Demand price or (2) the maximum price/bid price is lower than the Spot price.

If only few instance pools are eligible for a Spot Fleet request, you may want to review that Spot Fleet request to see if the maximum price quoted therein needs to be changed.

Target capacity

By default, this measure reports the target capacity of this Spot Fleet request.

If the Spot Filter Name is set to InstanceType, then this measure will represent the number of instances of this type that are part of the target capacity across Spot Fleet requests.

If the Spot Filter Name is set to AvailabilityZone, then this measure will represent the number of instances in this Availability Zone that are part of target capacity across Spot Fleet requests.

Number

Fulfilled capacity

By default, this measure reports the number of instances that have been launched in fulfillment of this Spot Fleet request.

If the Spot Filter Name is set to InstanceType, then this measure will represent the number of instances of this type that have been launched in fulfillment of one/more Spot Fleet requests.

If the Spot Filter Name is set to AvailabilityZone, then this measure will represent the number of instances that have been launched from this Availability Zone in fulfillment of one/more Spot Fleet requests.

Number

Ideally, the value of this measure should be equal to the value of the Target capacity measure for a request. A very low value indicates that the target capacity of the request is yet to be achieved.

Pending capacity

By default, this measure reports the number of instances that are still to be launched to fulfill the target capacity of the Spot Fleet request.

If the Spot Filter Name is set to InstanceType, then this measure will represent the number of instances of this type that are still to be launched against the target capacity across all Spot Fleet requests.

If the Spot Filter Name is set to AvailabilityZone, then this measure will represent the number of instances that are still to be launched from this Availability Zone against the target capacity across Spot Fleet requests.

Number

Ideally, the value of this measure should be low for a request.

Allocated capacity

By default, this measure reports the percentage of the target capacity of this Spot Fleet request that has been fulfilled.

If the Spot Filter Name is set to InstanceType, then this measure will represent the percentage of the target capacity across all Spot Fleet requests that has been fulfilled by instances of this type.

If the Spot Filter Name is set to AvailabilityZone, then this measure will represent the percentage of the target capacity across Spot Fleet requests that has been fulfilled by instances in this Availability Zone.

Percent

Ideally, the value of this measure should be 100% for a request. A very low value indicates non-fulfillment of the target capacity of that request. You may want to take another look at that Spot Fleet request to determine whether/not the specifications of the request need to be changed to ensure that the target capacity is achieved.

Maximum allocated capacity

By default, this measure reports the maximum value of the Allocated capacity measure across all Spot Instance pools specified in this Spot Fleet request.

If the Spot Filter Name is set to InstanceType, then this measure will represent the maximum value of the Allocated capacity measure across Spot Instance pools with instances of this type.

If the Spot Filter Name is set to AvailabilityZone, then this measure will represent the maximum value of the Allocated capacity measure across Spot Instance pools with instances of in this Availability Zone.

Percent

Terminating capacity

By default, this measure reports the number of instances that have been terminated in this Spot Fleet owing to interruptions.

If the Spot Filter Name is set to InstanceType, then this measure will represent the number of instances of this type that have been terminated across Spot Fleets, because of interruptions.

If the Spot Filter Name is set to AvailabilityZone, then this measure will represent the number of instances in this Availability Zone that have been terminated across Spot Fleets, owing to interruptions.

Number

When you use Spot Instances, you must be prepared for interruptions. Amazon can interrupt your Spot Instance when the Spot price exceeds your maximum price, when the demand for Spot Instances rises, or when the supply of Spot Instances decreases.

If the value of this measure is very high for a request, you may want to figure out what caused the interruption. If it is because the max price is lower than spot price, then see if you can modify the maximum price of that request.