CloudFront & Global Accelerator Flashcards

1
Q

What is CloudFront?

A

It’s a content delivery network or CDN.

Improves a website read performance by caching content at different aws edge locations.

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

Which services can cloudfront work with?

A

S3 buckets: Caching objects in edges.

S3 uploads: Cloudfront can act as ingress. Meaning people will upload files to edge and then edge sends it to the bucket region.

You can also use a custom origin, meaning any HTTP website can be used with cloudfront in front. It can be an ALB, an EC2 instance, an s3 bucket static website, or any HTTP website you want.

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

What is Cloudfront OAC (Origin access control)?

A

A CloudFront feature that allows you to control access to s3 objects.
With this option enabled, the bucket restricts access to only cloudfront.

When you configure OAC in your cloudfront distribution, it gives you a bucket policy statement to add to your bucket policy so you allow access to the origin of the distribution.

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

How does cloudfront work?

A

When a client requests a website content from an edge location, cloudfront checks if it has the content stored in cache to give to the client. If it doesn’t have it, it requests it to origin and delivers it to client, and also stores it in cache, so that future clients get it faster from cache.

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

Whats the difference between using cloudfront and using s3 cross region replication?

A

Cloudfront can use the global edge network, which means more locations. Files can be cached with a set TTL. Great for caching static content.

S3 replication is more for dynamic content that needs to be available in a few regions with low latency.

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

How do you use cloudfront?

A

You create a distribution. Then choose the origin domain.
The origin domain is the website that will be cached.
Then you can choose to use OAC, option in which bucket restricts access to only cloudfront

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

What is a cloudfront distribution?

A

What you configure in cloudfront to cache webservers.

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

What is a cloudfront origin?

A

The source webserver to be distributed by your cloudfront distribution. A distribution can have many origins.

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

What is a control setting?

A

The configuration for OAC between cloudfront and s3 bucket.

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

What do you need in the networking side for cloudfront to work against an EC2 instance or ALB webserver?

A

You will need a security group attached to the EC2 instances or ALB that allows traffic from and to the edge location public ips of cloudfront. Theres a list of which are these IPs.

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

What is CloudFront GeoLocation?

A

A feature that allows you to restrict who can access your distribution.

You can make an allowlist with the only countries you allow. Or a denylist with only the countries you want to deny access to your content.

Use case would be copyright laws by country.

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

How does cloudfront pricing work?

A

You are charged for the data transfered out (from cloudfront to internet).

The cost varies depending on the country of the edge location. Some edges are more expensive than others.

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

How can you reduce cost in cloudfront?

A

Reducing the number of edge zones you use. You can do this by using price classes.

There are 3 price classes:
Price Class All: All regions available.
Price Class 200: Most regions available.
Price Class 100: Only least expensive regions.

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

What is cache invalidations?

A

When you update your webserver, to avoid waiting for TTL to expire to see the changes in cloudfront, you can force an ENTIRE or PARTIAL cache refresh, which eliminates the TTL in your cache

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

What is anycast in IPv4?

A

An addressing and routing method that allows multiple servers to share the same ip, and traffic will be routed only to the closest server for this ip.

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

What routing and addressing method does Global Accelerator use?

A

Anycast, which is multiple server sharing the same ip, and traffic being routed only to the closest one.

17
Q

What is Global Accelerator?

A

A service that reduces latency to your application. Instead of clients having to go through the internet to get to your resource, they go to their nearest edge location, and then get to your resource through the internal AWS network. This reduces latency by 60%.

18
Q

What endpoints does Global Accelerator work against?

A

Elastic IP, EC2, ALB and NLB.

19
Q

How does Global Accelerator work?

A

You add and endpoint and Global Accelerator gives you 2 global anycast ip addresses. Users who query these addresses will be able to access your endpoint (application) through their closest edge zone. (Thanks to anycast).

20
Q

What is an advantage of Global Accelerator over CloudFront?

A

Global accelerator has region failover capabilities for your app. Failover works through the use of health checks.

21
Q

Which of these 2 services has health checks agains your app?

CloudFront or Global Accelerator?

A

Global Accelerator

22
Q

How does AWS Shield help Global Accelerator?

A

It gives you DDoS protection automatically.

23
Q

What is the difference between CloudFront and Global Accelerator?

A

CloudFront is great for caching content such as static content, videos or images to edge locations around the world. So content is served at the edges.

Global Accelerator has no caching, content is served at the actual app. It accelerates the delivery of that content by using the edges and aws network to reduce the latency to your app.
Global accelerator has varied use cases because it works with TCP AND UDP, such as VoIP, Gaming.

24
Q

What are Global Accelerator Listeners?

A

A listener is where you set the port or port range and protocol that will listen to requests on the global accelerator pair of ip addresses.

25
Q

How do Global Accelerator Endpoint groups work?

A

Endpoint Groups are that the Global Accelerator listeners point to. An endpoint group contains one or more endpoints, which could be ALBs NLBs Elastic IPs or EC2 Instances.

Endpoints in an endpoint group must be in the same region

26
Q

What are the global accelerator components?

A

Listeners
Endpoints

27
Q

Which protocol does Global Accelerator support?

A

TCP and UDP

28
Q

What is Client Affinity?

A

It’s a stickiness you set so that clients connect to the same endpoint every time.

29
Q

How is the process of creating an Global Accelerator endpoint group?

A

You select a region for the endpoint group
Yo select a traffic dial from 0 to 100.

30
Q

If you have a Global Accelerator with endpoints in 4 regions, how many endpoint groups do you need to create?

A

Yo need to create 4 endpoint groups because they are regional.

31
Q

What is the traffic dial?

A

You choose in an endpoint group, from 0 to 100, the percent of traffic that will go to that endpoint group, therefore to that region.