Network storage, HA, and Scaling Flashcards
Elastic File System
implementation of NFSv4
EFS Filesystem can be mounted on Linus
shared between many EC2 instances
Where does EFS run from ?
runs in a vpc via mount targets
can be access from on-premises-VPN or Dx
3 type of Load Balancers
classic Load Balancer (CLB)- v1 - introduces 2009
not really layer 7, lacking features, 1ssl per CLB
Application Load Balance (ALB) -v2 - HTTP/s / websocket
Network Load Balancer(NLB)-v2-TCP, TLS , & UDP
v2 = faster, cheaper, support target groups and rules
How does ELB work ?
Configured to run in 2+ AZ’s, 1+ Nodes are placed into a subnet in each AZ and scale with load
Each ELb is configured with an (A) record DNS name and this resolved to the ELB Nodes
How do ELB communicate with an EC2 instance ?
Load Balances (Nodes) are configured with listener which accept traffic on a port & protocol and communicate with targets on a port and protocol
Internet-Facing ELB vs Internal ELBs
internet-facing Nodes have public IPs
Internal Only have private IPs
What show your subnet size be if your going to deploy a ELB in it ?
8+ free IPs per subnet and a /27 or larger subnet to allow for scale
Cross Zone LB
Allow load balancers to even distribute load across active AZS
Does an EC2 instance need to be public to work with an ELB?
No , an internet-facing load balancer can communicate with public instances or private instances.
An internet-facing Load balancer has public IP addresses on it’s nodes
it can accept connections from the public internet and balance these across both public and private EC2 instances
Application LB
Layer 7 load balancer .. listens on HTTP and / or HTTPS
No other Layer 7 protocols (SMTP, SSH, Gaming) and no TCP/UDP/TLS listeners
Layer 7 content type, cookies , custom header, user locations and app behaviors
How are HTTP/HTTPS connections made and why would it be important ?
HTTP/ HTTPs(SSL/TLS) always terminated on the ALB no unbroken SSL
which could pose a security risk for security teams
ALBs must have ssl cert if HTTPS is uses because a new connection is initiated when connection to the application
ALB Rules
rules direct connections which arrive at the listener
processed in priority order
default rule= catch all, processed last
ALB rule conditions
anything layer 7
host-header, http-header, http-request method, path-pattern, query-string & souce-IP
What are some actions that can be taken based on an ALB rule ?
forward, redirect, fixed-response, authenticate-OIDC & authenticate -cognito
Network Load Balancer (NLB)
Layer 4 load balancer … TCP, TLS, UDP, TCP_UDP
No visibility or understanding of HTTP or HTTPS
SMTP, SSH Game servers, financial apps
really really, fast ( millions of rps, 25% of ALB latency)
Forward TCP to instance unbrokern encryption
What do Health checks on NLB check ?
Health checks just check ICMP/TCP handshake not app aware
If you need your LB to have a static IP what LB would you choose ?
NLB’s can have static IP’s - useful for whitelisting
Some use cases for NLB
unbroken encryption
static IP for whitelisting
the fastest performance
protocol not HTTP or HTTPs
Private Link
Launch Configuration and Templates
allow you to define the configuration of an EC2 instance in advance
Ami, instance Type, storage & key pair
networking and security Groups
userdata & IAM role
Say you want to be able to alter your configurations after creating them which would you choose to use launch configurations or launch template ?
both are not editable- defined once LT has versions