Chapter 16 Optimization Flashcards
5 pillars
- operational excellence
- security
- reliability
- performance efficiency
- cost optimization
Cost Tagging Categories
- Environment
- Application ID
- Automation (opt in/out)
- Business Unit
- Owner
How to enforce tagging?
Via IAM policy which specified required tag names.
Why would you potentially be charged for stopped EC2 instance?
Because an associated EBS volume was not terminated.
Are you charged for an unused Elastic IP address?
Yes, but it is not charged if it is attached to an EC2 instances.
General purpose instance types
A1, T2, M3, M4
Compute Optimized instance types
C3, C4
Memory Optimized instance types
X1, R3, R4
Storage Optimized Instance Types
I3, D2
Accelerated Computing Instance Types
P2, G3, F1
Reserved instance duration
1-3 years, potential savings of 75%
For DB reserved instances, what happens when you exceed reserved rate?
You are charged the on demand rate.
Termination notices for spot instances are issues when?
2 minutes before instances are terminated
How to guarantee a specific time duration with Spot instances?
Use block durations, which is a parameter set when using spot instances. It guarantees a duration block.
How to minimize impact of interruptions with Spot instances?
Persist data with EBS volume and/or split up the work using SQS.
______refers to the functionality that automatically replaces unhealthy instances in your application, maintains your fleet at the desired capacity, and balances instances across Availability Zones.
Fleet management
A _______ is a snapshot of a particular state of a resource, such as an Amazon EC2 instance, Amazon EBS volumes, and an Amazon RDS DB instance.
golden image
If you don’t want to make manual predictions for an auto-scaling group, what can you use?
predictive scaling. It leverages machine learning algorithms
Aurora auto scaling is available for MySQL and Postgres, but Aurora serverless is available only for _____
MySQL
How does Lambda scale?
It runs multiple, parallel functions
Glacier vs Glacier Deep Archive
Deep archive is 7-10 year data retention for compliance purposes. 12 hr retrieval time (vs minutes to several hrs for Glacier)
When to use S3 vs EFS?
S3 as much as possible to keep storage costs low, and EFS when your application requires it.
What tool allows you to analyze access patterns for S3 data and allow you to transition objects to the appropriate storage class?
Amazon S3 Analytics: Storage Class Analysis
Tool which allows you to create CSV with replication and encryption status of S3 objects on weekly or monthly bases?
S3 Inventory
S3 can publish storage, request, and data transfer metrics to _____
CloudWatch
If you have S3 objects in csv format, how can you select just a subset of the data in the object?
using S3 Select. Drastic performance increase btw.
How to query archived data?
Glacier Select (seems to return entire object?)
For EBS, to achieve best performance consistently, use ___
EBS optimized instances
When I/O is more important than fault tolerance, use a ______ configuration
RAID 0
Important Metrics for EBS
BurstBalance and VolumeQueueLength (among others)
If EBS volume in unattached, it is marked as _____
available
For a general purpose SSD, optimize for ____ so that you only pay for what you use.
capacity
S3 Transfer Acceleration leverages ____ to improve application-client transfer speeds
Cloudfront/edge locations
DAX
DynamoDB Accelerator. Memory cache for DynamoDB which offers performance optimization. Best for when you have predictable loads. (note that auto scaling best for unpredictable loads)
How to enable versioning in DynamoDB?
Use a versionId as the sort key with prefix of 0. Whenever you update an item, make two copies, one which is the actual version ID and one which will overwrite the item with versionId of 0.
Do you want more or less indexes in DynamoDb? Why?
Less, additional indexes (which aren’t used often) contribute to costs and degrade I/O without improving application performance.
Why should you be careful about attribute projections in DynamoDB?
If you update an attribute that is projected in an index, you incur the cost of updating the index as well.
What are sparse indexes in DynamoDB?
An index in which the sort key is not present in every item of the table. This allows queries of a subset of the table items, and results in faster, less expensive results. (i.e. CustomerId & OrderID)
RI Utilization report shows how much you 1. _______ while RI Coverage report shows how much you 2.______
- over purchased
2. under purchased
Most granular analysis of costs provided by ____
AWS Cost and Usage Report
What service allows you to stop/terminate EC2 instances which have been underutilized/unused for too long and/or stop instances which have EBS as root volume?
CloudWatch
EBS volumes should be attached to what type of instance?
EBS Optimized instance
What metric would you look at to determine if your provisioned IOPS is sufficient for your application?
VolumeQueueLength