Cost Optimization - Compute Flashcards
1
Q
EC2 - Characteristics
A
- In general the charges are per hour or second while the instance is running
- Pricing also depends on purchase option selected, EBS storage provisioned, data transfer in and out of the service, EIP addresses, and other features
- CloudWatch Alarms actions can automatically stop, terminate, reboot or recover instances
2
Q
EC2 - Placement groups
A
- Cluster: packs instances close together inside an AZ. This strategy enables workloads to achieve the lowest latency and highest packet-per-second network performance
- Partition: spreads instances across different logical partitions. Used by large distributed and replicated workloads such as Hadoop, Cassandra, and Kafka
- Spread: places a small group of instances across distinct underlying hardware
3
Q
EC2 - On-Demand
A
- Pay by the second for the instances that you launch. Have full control over its lifecycle
- Great when you need uninterrupted compute. One of the most expensive options
4
Q
EC2 - Savings Plans
A
- You make a commitment to a consistent usage, in USD per hour, for a term of 1 or 3 years
- Offers more flexibility than reserved instances but it’s not cheaper than them
- Unlike Reserved Instances, it does not reserve capacity. You commit to an amount of compute usage
- Useful for mixed EC2 instances, Fargate, and Lambda
5
Q
EC2 - Savings Plans types
A
- Compute Savings Plans:
- Provide savings up to 66 percent off On-Demand
- This discount apply regardless of Region, instance family, instance size, OS, and tenancy
- EC2 Instance Savings Plans:
- Provide savings up to 72 percent off On-Demand, in exchange for a commitment to a specific instance family and a Region
- This discount apply regardless of instance size, OS, and tenancy
6
Q
EC2 - Reserved instances 1
A
- You make a commitment to a consistent instance configuration of On Demand instances, including instance type and Region, for a term of 1 or 3 years
- Up to 72% saving compared to On Demand instances
- Upfront payment can be: all, partial, or none
7
Q
EC2 - Reserved instances 2
A
- Have two types:
- Standard: offers more discount than Convertible, up to 66% compared to On-Demand, but can’t be exchanged for another instance
- Convertible: offers discount, up to 56% compared to On-Demand. Can be exchanged for another instance
- There’s instance size flexibility only on Linux VMs. For example, a large reserved instance can be used as two medium reserved instances
8
Q
EC2 - Reserved Instances: scopes
A
- Regional Reserved Instance:
- A reserved instance for a Region
- Doesn’t reserve capacity
- AZ and instance size flexibility are permitted
- Zonal Reserved Instance:
- A reserved instance for a specific AZ
- Reserves capacity in a specific AZ
- No AZ and instance size flexibility
9
Q
EC2 - Spot instances
A
- It’s an instance that uses spare EC2 capacity
- Spot price is the hourly price for a Spot instance. The Spot price is set by EC2
- It runs whenever capacity is available and your bid exceeds the Spot price
- Up to 90% savings compared to On Demand instances
10
Q
EC2 - Spot instances types
A
- Spot instance
- Spot fleets: set of Spot Instances and optionally On Demand Instances that are launched under a specific criteria
- Spot blocks: several VMs that are guaranteed to run for a specific number of hours
11
Q
EC2 - Spot instances termination
A
- When you lose a post bid: you receive a 2 minute warning. Can monitor those warnings with CloudWatch
- These instances can be terminated (no charges applied), hibernated (charges applied for EBS storage and memory) or stopped (charges applied for EBS storage and memory)
12
Q
EC2 - Dedicated hosts
A
- Pay for a physical host fully dedicated to running your instances
- Useful for existing per-socket, per-core, or per-VM software licenses
- Have visibility and control over how instances are placed on the server (number of sockets or physical cores)
13
Q
EC2 - Dedicated instances
A
- Pay, by the hour, for instances that run on single-tenant hardware. Cannot bring your own license
- Don’t have visibility and control over how instances are placed on the server (number of sockets or physical cores)
14
Q
EC2 - Capacity reservations
A
- It’s an On Demand instance with reserved compute capacity in a specific AZ for any duration
- It allows to ensure that always have access to EC2 capacity when you need it, for as long as you need it
- Doesn’t need a commitment as Reserved Instances or Savings Plans
- Doesn’t provide billing discount. To receive a discount can combine it with Savings Plans or Regional Reserved Instances
15
Q
EC2 - Instance types considerations
A
- Consider cost of every instance type. For example m5.2xlarge is twice as expensive as m5.xlarge
- If you need the highest I/O performance an instance store volume is better than an EBS volume. An instance store provides temporary block-level storage. It’s ideal to store temporary information that changes frequently
- Consider the usage of EBS-optimized instances. Fully use the IOPS provisioned on an EBS volume