Compute in the Cloud Flashcards
What are the benefits of EC2?
Easy alternative for traditional high upfront hardware investment, long delivery lead times, installation of servers to physical data centre and time spent on configurations
Instead, launch EC2 instance within minutes, pay for only running instances & for capacity needed
How does EC2 work?
Launch – and select a template for configurations (OS, app server, software/apps). Also select specific hardware config of the instance.
Connect – to the instance using different options (e.g. logging in and accessing the desktop)
Use – once connected, run commands to install software, add storage, use files and more
What are the EC2 Instance types?
- General purpose
A good balance of compute, memory, and networking workloads
Used for web servers or code repositories - Compute optimised
For compute intensive tasks that need high-performance processing (e.g. scientific modelling)
Used for HP web/gaming servers, compute intensive app servers and batch processing - Memory optimised
Memory intensive/high memory need workloads. Ideal for high performance databases
E.g. workloads requiring large amounts of data to be preloaded before running an app - Accelerated computing
Use hardware accelerators that can expedite data processing
Used for floating point number calculations, graphics apps, game, and app streaming - Storage optimised
For work that requires high, sequential read and write access to large datasets on local storage
Used for distributed file systems, data warehousing apps, and high-frequency online transaction processing
How is EC2 Priced?
- On demand
Paying for only the time the instance runs for
Good for irregular/unpredictable usage patterns, not advised for workloads that last >1yr - Savings plans
Paying for a committed amount of compute usage over 1- or 3-yr terms
Any usage exceeding the committed amount is charged at on-demand rates
Can save up to 72% vs on-demand pricing - Reserved Instances
For workloads with predictable usage over 1- or 3-yr terms
Can save up to 75% vs on-demand pricing - Spot Instances
Requesting spare EC2 capacity (may be recalled) for up to a 90% discount vs on-demand price
Ideal for workloads with flexible start and end times, or that can withstand interruptions - Dedicated Hosts
Physical hosts dedicated for the customer’s use with no one else sharing tenancy of the host
Generally used to adhere to compliance requirements
How can EC2 be scaled?
Automatically add or remove EC2 instances in response to changing application demand
- Dynamic scaling – responds to changing demand
- Predictive scaling – auto schedules right no. of EC2 instances based on predicted demand
In an auto scaling group, you can set:
- Minimum capacity – no. of instances that launch immediately after creating the group
- Desired capacity – no. of instances beyond the minimum needs to run the app
- Maximum capacity – max no. of instances needed when scaling out to respond to demand
How can traffic be directed?
Elastic Load Balancing
Automatically distributes incoming application traffic across multiple resources (EC2 instances)
The load balancer distributes in response to the addition/removal of EC2 instances
ELB is automatically scalable and gets bigger or smaller depending on volume of incoming traffic
What is Amazon SQS?
Used to send, store, receive messages between software components at any volume
Messages (e.g. coffee orders) go to the order board (SQS queue)
Data contained within a message is called a payload and is protected till its delivered
SQS queues are where messages are held till processed, AWS manages the infra to host queues
What is Amazon Simple Notification Service?
A publish/subscribe service where SNS topic are created
Subscribers are configured to each topic and messages are published to these subscribers
You can send one message to a topic which then goes to all subscribers in that topic
SNS can send out notifications to end users using mobile push, SMS and email
What is serverless computing?
You cannot see or access the underlying infrastructure or instances that host our applications
Doesn’t require servers to be provisioned or managed
Helps users focus on innovation/new features and not maintaining servers
Serverless apps are scaled automatically
What is AWS Lambda?
Allows you to run code without needing to provision or manage servers
More suited for quick processing where use case takes less than 15 mins to complete
E.g. Lambda function may be to resize uploaded image, so Lambda only runs based on a the trigger of an image getting uploaded.
Charges apply only when code is running
What is AWS Lambda?
Allows you to run code without needing to provision or manage servers
More suited for quick processing where use case takes less than 15 mins to complete
E.g. Lambda function may be to resize uploaded image, so Lambda only runs based on a the trigger of an image getting uploaded.
Charges apply only when code is running
What is a Container?
A package for your code, its dependencies and configurations needed to run
Containers run on top of EC2 instances and in isolation to each other
What is Amazon Elastic Container Service? (ECS)
Highly scalable, high performance container management system
Enables you to run and scale containerised apps on AWS
Supports docker, a software app that enables you to build, test and deploy apps quickly
What is Amazon Elastic Kubernetes Service? (EKS)
Kubernetes is software that enables you to deploy and manage containerised apps at scale
EKS is a fully managed service that can be used to run Kubernetes on AWS
Large community of volunteers maintain Kubernetes, with any new updates easily applied to EKS
What is AWS Fargate?
Serverless computing platform that can support EKS or ECS
Ideal for those that want to use EKS or ECS without having to provision or manage EC2 instances