Compute in the cloud Flashcards
types of software you can run on an EC2 instance
internal business applications, simple web apps, or complex web apps, databases or third party software like enterprise software packages
what is vertically scaling an instance
give an instance more memory and more CPU based on the demand
what is multitenancy
the idea of sharing underlying hardware
where does EC2 run
EC2 runs on top of physical host machines managed by AWS using virtualization technology
what is the responsibility of the hypervisor
hypervisor running on the host machine is responsible for sharing the underlying physical resources between the virtual machines
EC2 instance types
general purpose instances, compute optimized,
memory optimized,
accelerated computing,
storage optimized.
General purpose instances
this provides a balance of compute, memory, and networking resources.
- application servers
- gaming servers
- backend servers for enterprise applications
- small and medium databases
when there is an application in which the resource needs for compute, memory, and networking are roughly equivalent we can use general purpose instances.
Compute optimized instances
deal for compute-bound (CPU bound) applications that benefit from high-performance processors
- high-performance web servers
- compute-intensive applications servers
- dedicated gaming servers
- batch processing workload
Memory optimized instances
this is ideal for workloads that process large datasets in memory
when we have a workload that requires large amounts of data to be preloaded before running an application. This scenario might be a high-performance database or a workload that involves performing real-time processing of a large amount of unstructured data.
Accelerated computing instances
these instances use hardware accelerators, or coprocessors, to perform some functions more efficiently than is possible in software running on CPUs
- graphics applications
- game streaming
- application streaming.
Storage optimized instances
these instances are designed for workloads that require high, sequential read and write access to large datasets on local storage
- distributed file systems
- data warehousing applications
- high-frequency online transaction 4. processing (OLTP) systems
how we pay for EC2 instances
we only pay for the compute time we use, only when instances are running not when they are stopped or terminated. we only pay for server capacity we need
what is amazon EC2 service
this is the service which provides the access to virtual server
what to consider when selecting an EC2 instance type
requirement for compute, memory or storage capabilities
what are the Amazon EC2 pricing types
- On-Demand
- Amazon EC2 Savings Plans
- Reserved Instances
- Spot Instances
- Dedicated Hosts
On-Demand Pricing mode
ideal for short-term, irregular workloads that cannot be interrupted. No upfront costs or minimum contracts apply. The instances run continuously until you stop them, and you pay for only the compute time you use.
On-Demand Instances are not recommended for workloads that last a year or longer
- developing and testing applications
- running applications that have unpredictable usage patterns
Amazon EC2 Savings Plans
several compute services including EC2 has this plan.
we can reduce our compute costs by committing to a consistent amount of compute usage for a 1-year or 3-year term. This term commitment results in savings of up to 66% over On-Demand costs
Any usage up to the commitment is charged at the discounted plan rate (for example, $10 an hour). Any usage beyond the commitment is charged at regular On-Demand rates.
Reserved Instances pricing mode
this billing discount applied to the use of On-Demand Instances in your account
suited for steady-state workloads or ones with predictable usage
you qualify for a discount once you commit to a one or three-year term and can pay for them with three payment options
what happens at the end of the reserved instance term
can continue using the Amazon EC2 instance without interruption. However, you are charged On-Demand rates until you do one of the following:
- Terminate the instance.
- Purchase a new Reserved Instance that matches the instance attributes (instance type, Region, tenancy, and platform).
three payment options of reserved instances plan
- all upfront - you pay for them in full when you commit
- partial upfront - you pay for a portion when you commit
- no upfront, - you don’t pay anything at the beginning.
Spot Instances pricing mode
allow you to request spare Amazon EC2 computing capacity for up to 90% off of the On-Demand price.
AWS can reclaim the instance at any time they need it, giving you a two-minute warning to finish up work and save state.
we can resume later if we want
with this workload will get interrupted.
ideal for workloads with flexible start and end times, or that can withstand interruptions
ex - batch workloads
Dedicated Hosts pricing
physical servers with Amazon EC2 instance capacity that is fully dedicated to your use.
Dedicated Hosts are the most expensive.
What is the difference between Amazon EC2 Savings Plans and Spot Instances?
Unlike Amazon EC2 Savings Plans, Spot Instances do not require contracts or a commitment to a consistent amount of compute usage.
what is scalability
beginning with only the resources you need and designing your architecture to automatically respond to changing demand by scaling out or in
we pay only for the
Amazon EC2 Auto Scaling
enables you to automatically add or remove Amazon EC2 instances in response to changing application demand. By automatically scaling your instances in and out as needed
Amazon EC2 Auto Scaling, you can use two approaches
- Dynamic Scaling - responds to changing demand
2. Predictive Scaling - automatically schedules the right number of Amazon EC2 instances based on predicted demand.
what we can do to scale faster
use dynamic scaling and predictive scaling together.
what the meaning of minimum capacity in Amazon EC2 Auto Scaling
number of Amazon EC2 instances that launch immediately after you have created the Auto Scaling group
what are the configurations we can set in Amazon auto-scaling group
minimum capacity
desired capacity
maximum capacity
what happens if we don’t specify the desired number in the Auto Scaling group
If you do not specify the desired number of Amazon EC2 instances in an Auto Scaling group, the desired capacity defaults to your minimum capacity.