ELB + ASG Flashcards

1
Q

horizontal scalability

A
  • elasticity
    • increase number of instances for app
    • implies distributed systems
    • common for web apps and modern apps
    • autoscaling groups, load balancers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

vertical scalability

A
  • increase size of the instance
    • scaling t2.micro to t2.large
    • good for non distributed system such as RDS database
    • hardware limited
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

high availability

A
  • goes hand in hand with horizontal scaling
    • more than one availability zones
    • autoscaling groups, load balancers in multi AZ
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ELB - Elastic Load Balancer (managed)

A
  • spread load across multiple downstream instances
  • single point of access (DNS) to app
  • health checks (tcp or http)
    • way to verify if ec2 instance is working properly
    • uses port + route /health endpoint
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

CLB (v1)

A
  • classic (v1 - old) - deprecated CLB
    • tcp (layer 4), http, https (layer 7)
    • one CLB per application
    • only supports one SSL cert
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ALB (v2)

A
  • HTTP, HTTPS, websocket - Layer 7 only
  • load balancing to multiple apps on same machine (containers)
  • static hostname, multiple SSL certs, uses SNI to make it work
  • health checks at target group level
  • one ALB can service multiple apps
  • routing tables to different target groups
    • routing based on path in url
      • /users and /posts
    • routing based on hostname
    • routing based on query strings
      • ?id=123&order=false
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

NLB (v2)

A
  • tcp, udp (layer 4)
  • lower latency
  • one static IP per AZ - good for whitelisting specific IPs. also provides static DNS name
  • not included in free tier
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Gateway Load Balancer - GLB

A
  • IP packets - network layer 3
  • all vpc traffic through single entrypoint
  • uses GENEVE protocol on port 6081
  • all traffic to go through firewall, deep packet inspection, etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

sticky session (session affinity)

A
  • same client always redirected to same instance
  • CLBs and ALBs
  • cookie used for stickiness as expiration date
    • application-based cookies
      • custom generated by target app
        • can include your own attributes
        • cookie name specified individually for each target group
      • application cookie
        • generated by load balancer
        • AWSALBAPP
    • duration-based cookie
      • generated by load balancer
      • AWSALB or AWSELB
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

cross-zone balancing

A
  • always on for ALB
  • disabled by default for NLB
    • pay to enable
  • disabled by default for CLB
    • free to enable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

SSL/TLS

A
  • Secure Sockets Layer, Transport Layer Security
  • nowadays TLS is mainly used
  • public SSL certs are issued by CAs (certificate authorities)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

SNI - Server Name Indication

A
  • solves problem of loading multiple SSL certs onto one web server to serve multiple sites
  • ‘newer’ protocol that requires the client to indicate the hostname of the target server in the initial SSL handshake
  • the server then finds the correct cert or returns the default one
  • only works for ALB and NLB, Cloudfront
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Connection Draining / Deregistration Delay

A
  • gives some time to complete ‘in-flight requests’ while instance is deregistering or unhealthy
  • ELB stops sending new requests to draining instances
  • set drain connection value to a low value if requests are short. long requests - high drain value
  • default is 800s (1 to 3600s)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Auto Scaling Groups (ASG)

A
  • minimum capacity, desired capacity, max capacity
  • health check passed from ELB to ASG which can then terminate unhealthy instances
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

ELB access logs

A

Elastic Load Balancing provides access logs that capture detailed information about requests sent to your load balancer. Each log contains information such as the time the request was received, the client’s IP address, latencies, request paths, and server responses. You can use these access logs to analyze traffic patterns and troubleshoot issues. Access logging is an optional feature of Elastic Load Balancing that is disabled by default.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

ALB targets

A

IP, Instance, Lambda

17
Q

ALB and public IPs

A

you cannot load balance to a publicly routable IP address