EC2 - Solutions Architect Associate Level Flashcards
What are the two IP types?
IPv4 & IPv6
IPv4: 1.160.10.240
IPv6: 1900:4545:3:200:f8ff:fe21:67cf
Public IP
IP that is accessible over the internet
Private IP
Is IP within a private Network (e.g. company) and ONLY the machines inside that network can talk to each other
Internet Gateway (Public)
Allows machines in a private network to communicate with machines (servers) outside of that private network using the internet.
What does a Public IP need to be across the whole web?
Unique - no two machines can have the same public IP
Can public IP be geo-located easily?
Yes
Private IP uiniqueness
Needs to be unique within its private network
Can two different private networks (two companies) have the same IPs?
Yes - Machine 1 from Network A can have the same IP as Machine 1 from Network B
What do machines in a private network need to access the public internet?
NAT (network address translation) & Internet gateway (proxy)
What is a Network Address Translation (NAT)
A way to map multiple private IPs inside a local network to a public IP address before transferring the information onto the internet
True/False - Only a specified range of IPs can be used as private IP
True
What happens when you stop and start an EC2 instance?
It’s IP can change
What is an elastic IP?
It is a fixed public IP - an IPv4 IP you own as long as you do not delete it
Can you attach an Elastic IP to many instances at a time?
No - only to one
How many Elastic IP’s can you have in your AWS acc?
5 (can ask for more)
What can you do with Elastic IPs when a failure of an instance/software occurs?
Rapidly remap the address to another instance in your account
What does your EC2 machine come with automatically when created?
Public & Private IP
Can you use a private IP when SSH?
No - only public IP
What are Placement Groups?
It is a way of using an EC2 placement Strategy within an AZ
What do you specify when you create a placement group?
The strategy you want
i.e.
Cluster
Spread
Partition
What is the Cluster Strategy of a Placement Group?
Cluster instances into a low-latency group in a single AZ
What is the Spread Strategy of a Placement Group?
Spread instances across underlying hardware (max 7 instances per group per AZ) - for critical apps
What is the Partition Strategy of a Placement Group?
Spread instances across many different partitions (which rely on different sets of racks) within an AZ. Scales to 100s of EC2 instances per group.
Good for Hadoop, Cassandra, Kafka
What is the Cluster Placement Group Architecture?
All EC2 instances are on the same Rack (hardware) and are all in the same AZ
What are the Pros of having a Cluster Placement Group?
Great Network (10 Gbps bandwidth between instances)
Low latency
Cons of using a Cluster Placement Group?
If the rack fails, all instances fail at the same time
Use cases of Cluster Placement Groups?
Big Data job that need to be completed fast
Apps that require low latency and high network throughput
Spread Placement Group Architecture
You minimise the risk by locating all EC2 instances on different hardware (racks) across multiple AZs
Pros of Spread Placement Group Architecture
Span across AZ
Reduced risk in simultaneous failure
Instances are on different physical hardware
Cons of using Spread Placement Group Architecture
Limited to 7 instances per AZ per placement group
Use Case of Spread Placement Group
Application that needs to maximise high availability
Critical Applications where each instance must be isolated from failure from each other
Architecture of Partition Placements Group
You can have 2 partitions in AZ 1 and another partition in AZ 2. Each partition (rack) has many EC2 instances.
Pros of Partition Placement Groups
Up to 7 partitions (racks) per AZ
Span across multiple AZ in the same region
Up to 100s of EC2 instances
Instances in one partition do not share the same rack with another partition
Failure is isolated to each partition
EC2 instances get access to the partition information as metadata
Use cases of Partition Placement Groups
Big Data Applications i.e.
HDFS, HBase, Cassandra, Kafka
What is an Elastic Network Interface (ENI)
Logical component in a VPC that represents a virtual network card
Elastic Network Interface (ENI) attributes
Primary private IPv4, one or more secondary IPv4
One elastic IP (IPv4) per private IPv4
One Public IPv4
One or more sec groups
A MAC address
Can ENI be created independently and attached on the fly on EC2 instances?
Yes
What is the benefit of attaching an ENI to an EC2 instance on the fly?
Helps with failover
Are ENI global?
No - they are bound to specific AZ
Why would you move an ENI?
In case of a fail over
If you have an ENI created with an EC2 instance and then you delete the EC2 instance, what happens to the ENI?
It also gets deleted/terminated
What happens to the EBS volume if you STOP the EC2?
It is kept intact
What happens to the EBS volume if you TERMINATE the EC2?
It gets deleted
What happens when you Hibernate an EC2 instead of stopping/terminating?
RAM Memory state is preserved
Instance boot is much faster
Just goes to sleep
What happens to RAM of the EC2 when it hibernates?
It gets written into the EBS volume - meaning it needs to be encrypted and have enough space for the RAM to be written
Hybernation architecture/process
You have an EC2 with Ram and EBS volume (encrypted
You hibernate, the RAM pops into the EBS, and the EC2 instance is stopped.
Then when you start again, the RAM goes back into the EC2
Use cases of Hibernation
Long running processes
Saving RAM state
Services that take time to initialise
Hibernation good to know
Supports lots of instances
Must be less than 150GB RAM
Not support bare metal
Root volume EBS must be encrypted
Available on demand, reserved, spot instances
How long can an EC2 instance be hibernated for?
No more than 60 days
Which EC2 Placement Group should you choose if you have a critical application hosted on a fleet of instances in which you want to achieve a maximum availability when there is an AZ failure?
Spread Placement Group - spread your instances on different physical hardware across different AZs