CloudFront Flashcards
In CloudFront, what is the Origin?
The source of the original version of your content to be cached.
In CloudFront, what is a Distribution?
A Distribution is the configuration entity within CloudFront that defines how your content is delivered to end users
In CloudFront, what are Edge Locations?
They are local caches of your data.
In CloudFront, where are Distributions pushed out to?
Edge Locations.
In CloudFront, what are Regional Edge Caches?
Larger caches that Edge Locations can query when they get a cache miss. They are fewer in number but larger in size.
In CloudFront what is it called, and what happens, if a user requests some content and the Edge Location doesn’t have it?
It’s called a Cache Miss.
The Edge Location will check the Regional Edge Cache.
With CloudFront, what happens if the Regional Edge Cache doesn’t have the content that an Edge Location has requested?
It performs an Origin Fetch.
Does CloudFront work with SSL/TLS certificates for HTTPS?
Yes
Does CloudFront integrate with ACM?
Yes
How does write-caching work with CloudFront?
Write-caching isn’t supported with CloudFront.
With CloudFront, where do uploads go?
Directly to the Origin. Write-caching isn’t supported.
With CloudFront, what are Behaviours?
They are sub-configurations within Distributions, are associated with a path pattern. They allow multiple configurations of Origins and cache behaviour.
How many Behaviours can there be in a CloudFront Distribution?
Minimum of one, but there can be more.
What is the default TTL for a Behaviour?
24 hours.
What other TTL values can be set at the Behaviour level?
Minimum TTL and Maximum TTL.
What effect do the Behaviour-level minimum and maximum TTL values have?
They limit the range of TTL values that objects can use.
What happens if an object’s TTL value is outside the Behaviour-level minimum or maximum TTL values?
The object’s TTL will be re-set to the limit that it exceeded.
What are the three Origin headers that can define TTL at a per-object level (including their unit) ?
- Cache-Control max-age (seconds)
- Cache-Control s-maxage (seconds)
- Expires (date & time)
What first step occurs when a request is made to an Edge Location for an object whose TTL has expired?
The Edge Location will forward the request to the Origin.
When an Edge Location forwards a request to the Origin for a TTL-expired object, what does the Origin do if the object is unchanged?
It will respond with HTTP 304 (Not Modified).
When the Edge Location receives an HTTP Not Modified from the Origin, what will it do next?
The Edge Location will deliver the object to the user from its cache.
When an Edge Location forwards a request to the Origin for a TTL-expired object, what does the Origin do if the object has changed?
The Origin sends an HTTP 200 response that includes the new version of the object.
How are object-level TTLs set when using S3?
They are set via object metadata.
How are object-level TTLs set when using a Custom Origin?
They are set by the web/application server.
Is filename versioning related to S3 object versioning?
No! They are completely separate things.
At what level are cache invalidations performed?
They are performed on the whole Distribution.
Are all Edge Locations affected by a cache invalidation?
Yes.
What does a cache invalidation do?
It immediately expires any objects that match a specified pattern, such as /images/*
What is the main downside of using invalidations?
There is an AWS charge.
What is the recommended alternative to using invalidations?
Versioned filenames.
What are the four benefits of using versioned filenames?
- Avoids invalidations
- Avoids stale versions cached by web browsers
- Logs will be more useful because object names will indicate the version.
- Allows Edge Locations to retain previous versions.
What is the most cost-effective way to handle frequently updated objects, instead of using cache invalidation?
Versioned filenames.
This will avoid the AWS charge for invalidations.
What format does the CloudFront distribution default CNAME have?
[random-characters].cloudfront.net
You have created a new CloudFront distribution but have not created a certificate or assigned an alternate domain name. Does this distribution support SSL?
Yes, using a default CNAME.