Compute & Load Balancing Flashcards

1
Q

EC2 R Instance Types

A

Applications that need a lot of RAM (e.g in memory cache)

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

EC2 C Instance Types

A

Applications that need good CPU (e.g databases or compute)

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

EC2 M Instance Types

A

Applications that are balanced (e.g general or web apps)

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

EC2 I Instance Types

A

Applications that need good local I/O (e.g databases)

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

EC2 G Instance Types

A

Applcations that need a GPU (e.g video rendering or machine learning)

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

EC2 T2/T3 Instance Types

A

Burstable instances

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

EC2 Cluster Placement Strategy

A

Clusters instances into a low latency group in a single AZ
* Pro: Low latency
* Con: If the rack fails, all instances fail

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

EC2 Spread Placement Strategy

A

Spreads instances across underlying hardware
* Pro: span across AZs, reduce risk of simultaneous failure
* Con: Limited to 7 instances per group per AZ

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

EC2 Partition Placement Strategy

A

Spreads instances across logical partitions such that groups of instances in one partition do not share the underlying hardware with groups in different partitions

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

How to move instances between placement groups

A
  1. Stop the instance
  2. Use the CLI to modify the placement
  3. Start the instance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

EC2 Instance Launch Type

A
  • On demand: short workload, predictable pricing, reliable
  • Spot: short workload, cheap, can lose instances
  • Reserved: minimum 1 year
  • Dedicated: no other customers will share hardware
  • Dedicated host: book an entire physical server and control instance placement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

EC2 Graviton

A

Family of processors designed to deliver the best price performance for your cloud workloads

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

EC2 Enhanced Networking

A

Higher bandwidth, higher pps, lower latency
* Elastic Network Adapter (ENA) up to 100 Gbps
* Legacy: Intel 82599 VF

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

Elastic Fabric Adapter

A

Improved Elastic Network Adapter, only works for Linux. Great for inter node communication, tightly coupled workloads.

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

Auto Scaling Groups

Dynamic Scaling Policies

A
  1. Target tracking scaling: Increase and decrease the capacity based on a CloudWatch metric and a target value
  2. Simple step scaling: Increase and decrease capacity based on a set of scaling adjustments
  3. Scheduled actions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Auto Scaling Groups

Predictive Scaling

A

Continously forecast load and schedule scaling ahead

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

EC2 Spot Instances discount

A

Up to 90% compared to On-Demand

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

Spot Fleets

A

Set of Spot Instances and On-Demand Instances.

  • Define launch pools (instance type, OS, AZ)
  • Can have multiple pools to choose from
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Strategies to allocate Spot Instance

A
  • lowestPrice
  • diversified distributed across all pools
  • capacityOptimized
  • priceCapacityOptimized (recommended) pools with highest capacity, then select the lowest price
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

ECS - ALB Integration

A

Dynamic Port Mapping so multiple instances of the same task can be deployed on the same EC2 instance

Note: host and awsvpc networking do not support Dynamic Port Mapping

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

ECS networking

A
  • none: don’t have external connectivity and port mappings can’t be specified
  • bridge: uses Docker’s built-in virtual network
  • host: maps container ports directly to the ENI of the instance that hosts the task. A port on a host can’t be used by multiple tasks.
  • awsvpc: the task is allocated an elastic network interface (default for Fargate)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Fargate Spot Instances

A

Specify minimum number of regular tasks that should run at all times and then add tasks on Fargate Spot to improve service performance in a cost-efficient way.

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

ECR Image Scanning

A
  • Manual scan or scan on push
  • Basic scanning (common CVE)
  • Enhanced scanning: Leverages Inspector
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Data Volumes EKS

A

Specify StorageClass manifest, leverages a Container Storage Interface compliant.
Support with EBS, EFS, and FSx.

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

AWS App Runner

A

Fully managed service that builds and deploy web applications and APIs

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

ECS Anywhere

A

Run containers on customer managed infrastructure. Install ECS Container Agent and SSM Agent, deploy with EXTERNAL launch type.

27
Q

EKS Distro

A

Kubernetes distribution mantained by AWS

28
Q

EKS Anywhere

A

Create and operate Kubernetes clusters outside AWS. Reduce support costs and avoid maintaining 3rd party tools

29
Q

EKS Connector

A

Connect an EKS Anywhere cluster to AWS.

  • Fully connected & Partially Disconnected to levarage the EKS console
30
Q

Lambda & Code Deploy

A

CodeDeploy can help automate traffic shift for Lambda aliases.

  • Linear: grow traffic every N minutes
  • Canary: try x% then 100%
  • AllAtOnce
31
Q

Lambda Logging, Monitoring and Tracing

A
  • CloudWatch
  • X-Ray: run a deamon and should use AWS SDK in code
32
Q

Lambda Aynchronous vs Synchronous Invocation

A
  • Synchronous: Error handling must happen client side
  • Asynchronous: Lambda attepts to retry on 3 errors. The processing must be idempotent
33
Q

Protocols supported by load balancers

A
  • Classic Load Balancer: HTTP, HTTPS, TCP, SSL
  • Application Load Balancer: HTTP HTTPS, WebSocket
  • Network Load Balancer: TCP, TLS, UDP
  • Gateway Load Balancer: IP
34
Q

Difference in certificates between LB and ALB

A

LB supports only one SSL certificate, it can have many Subject Alternate Name (SAN). ALB supports Server Name Indication (SNI), which allows to present multiple certificates.

35
Q

ALB Target Groups

A
  • EC2 instances
  • ECS tasks
  • Lambda functions (HTTP request is translated into a JSON event)
  • IP addresses (must be private)
36
Q

Use cae for NLB

A

Extreme performance. Less latency (100ms vs 400ms for ALB).
* EC2 instances
* IP addresses
* ALB

37
Q

Use case ALB as target group for NLB

A

When you need to have an static IP address

38
Q

NLB

Zonal DNS Name

A

Use to determine the IP address of an specific node to limit cross-zone traffic.

https://aws.amazon.com/es/blogs/networking-and-content-delivery/resolve-dns-names-of-network-load-balancer-nodes-to-limit-cross-zone-traffic/

39
Q

Cross zone load balancing

A

Each load balancer node distributes traffic across the registered targets in all enabled Availability Zones.

It costs for NLB and GLB, other balancers doesn’t generate charge.

https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html#cross-zone-load-balancing

40
Q

Sticky Sessions in Load Balancers

A

The same client is always redirected to the same instance behind. It works for CLB and ALB.

41
Q

LB Request Routing Algorithm

Least Outstanding Requests

A

The next instance to receive the request is the one that has the lowest number of pending requests

(ALB and CLB)

42
Q

LB Request Routing Algorithm

Round Robin

A

Equally choose the targets from the target group.

(ALB and CLB)

43
Q

LB Request Routing Algorithm

Flow Hash

A

Selects a target based on the protocol, IP Address, port and TCP sequence number. Each connection is routed to a singe target for the life of the connection.

Works with NLB.

44
Q

API Gateway limits

A
  • 29 seconds timeout to respond a request
  • 10 MB max payload size
45
Q

API Gateway

WebSocket API

A
  • Two way interactive communication between a users browser and a server
  • Server can push information to the client
  • This enables stateful applications
46
Q

AWS AppSync

A

Managed service of GraphQL. Makes easy to get the data they need, combining data from one or more sources.

Retrieves data in real-time with WebSocket or MQTT.

47
Q

AWS AppSync Authorization

A

Perform authorization on Cognito users bases on the groups they belong to.

48
Q

EC2 with Elastic IP

A

The Elastic IP Address is moved to an standby instance.
* Quick failover
* Helpful if the client resolves by static public IP address
* Doesn’t scale

49
Q

DNS based load balancing

A

Ability to use multiple instances
* Route53 TTL implies clients might not be able to access if their instance fails
* Adding an instance may not receive full traffic due tu DNS TTL

50
Q

AWS Outposts

A

Server racks within your on-premises infrastructure that offers AWS services (EC2, EBS,S3, EKS, ECS, RDS and EMR), APIs and tools.

Your are responsible of physical security.

51
Q

S3 on AWS Outposts

A

Store and retrieve data locally, reducing data transfers to AWS regions. Storage class named S3 Outposts.

To access from AWS use S3 Access Point or syncrnonize with DataSync

52
Q

AWS WaveLength

A

Brings AWS services to the edge of 5G networks, with infrastructure embedded within the telecommunications providers. No additional charges.

It is connected to AWS Regions.

53
Q

AWS Local Zones

A

Extensions of an AWS Region to place AWS services closer to end users to run latency sensitive applications.

54
Q

Amazon CloudFront

A

Improves read performance because contents is cached at the edge. Expose external HTTPS

55
Q

Amazon CloudFront - Origins

A
  1. S3 Buckets: For distributing and loading files. You can use Origin Acccess Control for security.
  2. S3 configured as a website: Enable Static Webshite Hosting
  3. MediaStore & MediaPackage: Deliver video on demand
  4. Custom origin: HTTP endpoints
56
Q

CloudFront vs S3 Cross Region Replication

A

CloudFront
Great for static content that mus be available everywhere
S3 Cross Region Replication
Great for dynamic content that needs to be available at low-latency in few regions

57
Q

CloudFront Origin Groups

A

A primary and secondary origin to increase availability and do failover. Origins can be cross regions.

58
Q

CloudFront Geo Restrictions

A

Restrict which countries can access distribution

59
Q

CloudFront Pricess Classes

A
  • Price class all: best performance
  • Price class 200: most regions, but excludes the most expensive
  • Price class 100: only the least expensive regions
60
Q

CloudFront Functions & Lambda Edge deployment

A

Lambda Edge Functions are deployed at Regional Edge Caches. While CloudFront Functions are deployed at Edge Locations.

61
Q

When to use Lambda Edge over CloudFront Functions

A
  • Longer execution time (more than 1ms)
  • Adjustable CPU or Memory
  • Access to the request body or file system
  • Network access
  • Third party APIs calls
  • Loading content based on User Agent
62
Q

CloudFront Functions use cases

A
  1. Cache key normalization: Transform request attributes (headers, cookies, query strings, URL)
  2. Header manipulation
  3. URL rewrites or redirects
  4. Request authentication & authorization
63
Q

ElastiCache Use Cases

A
  • Database cache
  • User Session Store
64
Q

ElastiCache

Redis vs Memcached

A

Redis:
* Multi AZ with auto-failover
* Read replicas
* Peristent

Memcached
* Multi node for partitioning data
* Non persistent
* Multi-threaded architecture