What AWS service helps optimize availability and caching?
CloudFront có thể cache content based on request headers để separate versions của specified object based on header values trong viewer request.
| Component | Include? | Effect |
|---|---|---|
| URL path | Always | Base cache key |
| Query strings | Configurable | More = lower hit ratio |
| Headers | Configurable | More = lower hit ratio |
| Cookies | Configurable | More = lower hit ratio |
| Policy | Mô tả |
|---|---|
| CachingOptimized | Minimal cache key = best hit ratio |
| CachingDisabled | No caching |
| Custom | Select specific headers/query strings |
Cache-Control: max-age=3600
→ CloudFront caches for 1 hour
Vary: Accept-Encoding
→ Separate cache entries per encoding (gzip, br)
Vary: Accept-Language
→ Separate cache entries per language
Use case: Serve different versions based on:
Cache-Control: max-age=0Exam Tip: