AWS: On Demand Capacity Reservation (ODCR) and preventing Insufficient Capacity Error (ICE)

 What is ODCR, and why does it matter?

On-Demand Capacity Reservation is one of the ways how we can reserve capacity on AWS. This feature helped to reserved capacity especially the large EC2 instance or special instances like (P series) that is very little in the Availability Zones (AZ). The service will not charge you if you have an EC2 running 24 by 7. It will ensure when you need to start/stop your EC2, the same instance family/types for that particular AZ are reserved for you. It is not commitment-based, like a Reserved Instance or Saving Plan, where you need a minimum of 1 year. ODCR is only activated once you enable it in the AWS Console. You can cancel it anytime if you do not needed.

What is an Insufficient Capacity Error (ICE)?

ICE is an exception where there are not enough EC2 instance families available in a particular Region or AZ. This is not common in AWS, but it has happened before, especially for large EC2 like 32x or special EC2 like P series. 

How does ODCR help to prevent ICE?

ODCR signals to AWS that you needed the instance in that particular AZ, so you reserved it using ODCR. Unfortunately, ODCR is not foolproof; this means ODCR only happens if there is an available Instance for that AZ; you can ODCR it. If there is no instance, ODCR won't work. For example, if you ODCR the EC2 today because you needed it but so happens no more instances are available, your ODCR will fail (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservations-using.html). So always ODCR your instance early.

The strategy for better use of ODCR:

1. ODCR critical application: You do not need ODCR for all your systems; identify mission-critical applications for your business and ODCR them.

2. ODCR-only baseline EC2: This means you only need to ensure that the minimum EC2 supporting your application is protected. If you have Auto-scaling enabled, the new EC2 provision by Auto-Scaling does not need ODCR.

3. ODCR critical EC2: You can identify critical workloads, such as Databases, self-managed Active Directory, or software licenses, that are tied to your CPU core. 

What happens if you get ICE?

ICE can happen, and what you can do is follow the following strategy:

1. Provision your EC2 in another Availability Zone. AWS has a minimum of 3 AZs per region, but you can try other availability zones for your desired instance.

2. You can provision your EC2 to use other Instance families or types first, wait 20-30 mins and retry back your desired Instance Type\Family. AWS will try to create the instances finished by other customers, and it will take a few hours to completely provision the new instance type.

ODCR is not a bad feature; it is useful if you know how to use it better. Charges only happen when you ODCR the instances, and your EC2 is NOT running. Running EC2 won't get additional charges for ODCR but rather normal running costs. If you shut down your EC2, the charges for ODCR will be the same as those for your running EC2.


Comments

Popular posts from this blog

SharePoint 2013: Distributed Cache Services

SharePoint 2013 for Developer: Baby Journey (1)

File Structure (Part 1)