AWS Loadbalancer and Autoscaling Flashcards
What types of load balancers can you have in AWS?
- Classic LB
- Network NLB
- Application ALB
Is an ELB, highly available?
Yes, it is created in a region and across multiple AZ’s in the region.
Dump this
Dump this
How does AWS create a logical ELB in AWS?
The logical LB is created from several nodes distributed into the available AZ’s. As you see each of these nodes has a separate public IP, to enable it to seems as if you are connecting to a single endpoint of the ELB, AWS creates a URL they you connect to when accessing the ELB, this URL will return all the ELBs of the ELBs to you. This causes an issue in that the load may not be distributed equally depending on how my instances you have in each AZ, to get around this the ELB has cross zones replication, in classic LB you had to enable it, newer LBs have it enabled by default.
When using an ELB with an autoscaling group, what has the autoscaling group to do as it adds and removes nodes?
The autoscaling group has to add and remove the registration of the nodes with the ELB target group.
Can you use an ELB without Autoscaling group?
Yes, you just have to register the instances with the ELB target group.
What is an ELB target group used for?
A target group is used to group instances the ELB will distribute traffic to.
Should, I use classic LB?
No, they are moving away from this LB, you should use NLB or ALB.
What transports do classic LB support?
TCP, SSL, HTTP, HTTS
In a classic LB do I get a security group for my ELB?
Yes, when you create an ELB you create or assign a security group.
What are ELB health checks?
ELB performs a check on the backend instance, by performing one of the following,
- Checking the instance status
- Sending an HTTP/HTTPs request and checking th response code.
If the software running on my webserver holds state and requires thet any returning request be sent to the same server node, is this possible with ELB
Use ELB client sticky session, you have two options,
- LB generate cookies
- Application generated cookies
I the classic ELB a layer 7 device?
No
What is an ALB?
It is an application load balancer and operates at layer 7 with a wider set of services,
- EC2
- Contaners
- Lambda
I require the ability to route HTTP traffic based on the path, what LB should I use?
ALB
I require an LB that can route based on path and can be internal facing, what type of ELB should I choose?
ALB
I require an LB that will work for both IPv4 and IPv6, what ELB should I use?
ALB
What is the target group?
It is a collection of instances.
I am using a lambda function and I wnat to have an LB in front of it so I can control the traffic going to different function and also to enable blue/green deployments, what is my best option?
Use an AL, ALB support Lambda functions.
Does NLB support WebSockets?
No, you will need an ALB
I have a multiple application that needs an LB, what LB can I used the also can do rooting at L7?
You cna use the ALB, it enables you to route based on pat and domain.
Can I use multiple certs on an ALB?
Yes.
I want to understand who is hitting my LB, how and I architect this?
LB’s support access logs and enable you to capture th logs.
I want to understand who is hitting my LB, how and I architect this?
LB’s support access logs and enable you to capture the logs.
I wnat to redirect on my LB, is this possible?
Yes you can do it on your ALB
What is a network LB?
It is an LB that operates at L4 or the OSI model.
if I need extreme performance LB should I choose NLB or ALB?
NLB as it is not processing the incoming l7 traffic and operating at l4 they can deal with high volumes of traffic.
I need an LB to support static IP, will an ALB work for me?
No ALB only support DSN, you need an NLB for a static IP
I need an end to end encryption (TLS) but I need lB to load balance across my nodes, should I have an ALB?
No, ALBs do not pass through the connection a NLB is operating at the TCP layer and the encryption will be passed straight through to the host.
Can I have an NLB for internal load balancing?
Yes.
I wnat to authenticate users using OpenID for my application but I do not what to modify my application, how could i do this?.
You cna use an ALB, it supports authentication of users by OpenID.
I wnat to authenticate users using OpenID for my application but I do not what to modify my application, how could I do this?.
You cna use an ALB, it supports authentication of users by OpenID.
I wnat to authenticate users using IdP like FB, Amazon, Google and cognito, is it possible to auth using the ALB?
Yes
I wnat to authenticate users using IdP SAML, LDAP, MS AD, Google and cognito, is it possible to auth using the ALB?
Yes
Dose ALB or NLB support UDP
No
I need to create a load balancer with autoscaling in the backend, how cna I do this?
- Create a Launch template
- Create an autoscaling group and use Launch config
- Create an ALB as this works best for our web type workload, we will also as part of this create a target group.
Do we create an ELB with a security group?
Yes, 100%, each ELB gets deployed as an ENI in the VPC and there is a security group applied to the interface.
I have deployed an ALB, do I get a single IP to send traffic to?
No, each LB is deployed in an AZ and depending on the number of AZs and the load, you will get back one IP for each LB making up the ELB.
What is an NLB used for?
L4 traffic (L7 traffic is passed through untouched.
How do health checks work on the ELB?
You set up the health check to be HTTP, TCP, HTTPS or SSL and the health checker will send out pings to make sure the node is working, If the node is not working it will be taken out of the pool of good node the ELB sends traffic to.
What are the two types of health checks you can set on an Autoscaling group?
ELB (Hecks are pinged)
EC2 (Checks are on the status of the instance)
I have nodes with issues of performance for HTTPS, I did not have these issues when I used HTTP, what options do I have?
HTTPs offload, ALB supports HTTPs offload.
I wnat to use HTTPs offloading with my LB, where can I store the cert?
AWS Cert Manager
What are the option available for giving an LB a cert?
- Upload
- IAM Cert
- ACM cert
When the ELB is integrated with autoscaling group and the health check fails, what happens to the instance?
Instances are terminated and recreated if they fail the health check.
I wnat to add my own domain and subdomain to an ELB, how can I do this?
You need to set up a zone in Route53 and create a CNANE record to point to the ELB’s URL.
What services can the ALB support, traditionally it supported EC2?
- Lambda
- EKS
For ALB’s what are the actions used for?
They allow you to define,
- Redirect to
- Forwared to
- Return a fixed response
- Authenticate
With an NLB can you have a static IP for the front-end?
Yes
Does an NLB support UDP?
No
With an NLB can I LB to IP’s outside the VPC?
Yes
What is WAF sandwich?
It is where you place a WAF between two LBs
What is dynamic scaling for an autoscaling group?
This is where AS adjusts the number of EC2 instances or ECS tasks to ensure the CPU is kept below 75%
What is predictive scaling?
This is where ML is used to predict/forecast the required capacity for EC2 and ECS and will adjust resources based on the forecast.
I want to use autoscaling and scale on a metric, is using 5m intervals OK?
No, you are better to use a finer resolution of 1min, scaling will react faster to changing workload.
What are the two configuration templates used by Autoscaling?
- Launch config
- Launch template
My workload is variable and also can deal with been stopped at any point in time, I want to get to the lowest price point, how can I achieve this?
You can use spot instances
I have a steady baseline that I know will be there for up to 3 years for my instances, I also have a verable workload, how can I optimize for cost?
You can use Auto Scale Group, to scale your workload and use fleet too with reserved and spot.
What are lifecycle hooks?
In AustoScaling you can configure a lifecycle hook, it will pause the instance on start or terminate and triggered a CloudWatch event, with the CW event you can select to take many different actions using services like SNS, Lambda, etc.
I wnat to be notified when instances launch or terminate, how cna I do this?
Using notifications?
I need to take an action as an instance is launched, this action is to register the instances in a CDMB, the instance must not become active until it is registered, how can I do this?
You cna use AutoScaling Lifecycle hooks
How is CloudWatch used with AutoScaling?
You get to create CloudWatch alarms that get triggered by the metrics coming form ASG, this enables you to scale up or down your instances.
What is AMI baking?
This is where we bake in the AMI all software we need.
Can I change the launcher configuration?
No
By default how is an autoscaling group using its health checks?
By default, the autoscaling group will use the EC2 status to understand when it will terminate an instance.
By default how is an autoscaling group using its health checks?
By default, the autoscaling group will use the EC2 status to understand when it will terminate and replace an instance.
What is the health check grace period?
This is the amount of time given before health checks start, this enables the software on the EC2 instance to settle.