CloudFront Flashcards
Features:
- Content Delivery Network (CDN)
- Improves read performance, content is cached at the edge
- Improves users experience
- 216 Point of Presence globally (edge locations)
- DDoS protection (because worldwide), integration with Shield, AWS Web Application Firewall
Amazon CloudFront
What is an origin?
Location where content is stored, and from which CloudFront gets content to serve to viewers.
Four features of S3 bucket origin?
- For distributing files and caching them at the edge
- Enhanced security with CloudFront Origin Access Control (OAC)
- OAC is replacing Origin Access Identity(OAI)
- CloudFront can be used as an ingress (to upload files to S3)
Four custom origins, that are HTTP servers.
- Application Load Balancer
- EC2 instance
- S3 website (must first enable the bucket as a static S3 website)
- Any HTTP backend you want
Features:
- Global Edge network
- Files are cached for a TTL (maybe a day)
- Great for static content that must be available everywhere
CloundFront
Features:
- Cross Region Replication: Must be setup for each region you want replication to happen
- Files are updated in near real-time
- Read only
- Great for dynamic content that needs to be available at low-latency in few regions
S3 Region Replication
CloudFront is a ……,which is to cache content …..,
whereas S3 Cross-Region Replication is to….. an entire bucket into another…….
CDN, all around the world, replicate, region
Where is the cache located?
At each CloudFront Edge Location
How does CloudFront identify each object in the cache?
Cache Key
You want to maximize the Cache Hit ratio to minimize requests to the origin?
True
How can you invalidate part of the cache?
Use the CreateInvalidation API
You want to cache as much stuff as possible in your edge locations?
True
What is CloudFront Cache Key?
A unique identifier for every object in the cache
CloudFront Cache Key can have additional elements then the default ones?
True
How can you add other elements(HTTP headers, cookies, query strings) to the Cache Key?
CloudFront Cache Policies
Are all HTTP headers, cookies, and query strings that you include in the Cache Key automatically included in origin requests?
True
What happens when Cache policy HTTP header is None?
- Don’t include any headers in the Cache Key (except default)
- Headers are not forwarded (except default)
- Best caching performance
What happens when Cache policy HTTP header is Whitelisted?
- only specified headers included in the Cache Key
- Specified headers are also forwarded to Origin
Cache Policy Query Strings is None?
- Don’t include any query strings in the Cache Key
- Query strings are not forwarded