Look, CloudFront has edge locations everywhere - AWS claims 410+ Points of Presence which sounds impressive until you realize that means jack shit if you configure it wrong. And trust me, you will absolutely configure it wrong the first time. I certainly did.
How CloudFront Actually Works (When It Works)
The Edge Location Lottery: CloudFront routes users to the "closest" edge location, but closest doesn't always mean fastest. I've seen users in LA get routed to Seattle because of some BGP routing bullshit, adding 50ms to every request. The AWS docs won't tell you this happens regularly.
Regional Edge Caches Are Actually Useful: This is one feature that works as advertised. When your edge location cache misses, it checks a regional cache before hitting your origin. Saved my ass during a traffic spike when our origin started throwing 500s - regional caches kept serving stale content while we unfucked the backend.
HTTP/3 Actually Works Now: CloudFront supports HTTP/3 as of 2022, and it's enabled by default in the latest TLS policies. Plus they added post-quantum key exchange algorithms back in September 2024 for future-proofing your encryption. But HTTP/2/3 is still only between users and edge locations, not to your origin - if your origin is slow, fancy protocols won't save you.
Real Performance: The Good, Bad, and Ugly
Here's what actually happens in production:
When It's Fast: Static assets from S3 with proper cache headers? Sub-100ms globally, easy. We serve images and JS bundles with 90-something percent cache hit rates and it's genuinely fast.
When It's Slow: Dynamic content without proper cache-control headers. I've seen 2-second response times because every goddamn request hits origin. CloudFront doesn't cache by default unless you tell it to - which took me way too long to figure out.
When It Breaks: DNS propagation takes forever. Changed a CNAME? Hope you didn't need that working for the next 2 hours. AWS says "up to 24 hours" but usually it's more like 30 minutes if you're lucky.
The Features That Actually Matter
Origin Shield: This costs extra but it's worth it if you have high traffic. Put it in the region closest to your origin and watch your origin server stop crying from all the requests.
Compression: Enable gzip compression in your distribution settings. It's literally one checkbox and reduces bandwidth by a shit-ton for text content - maybe 60-80% depending on what you're serving. If you don't enable this, you're just burning money.
Lambda@Edge: Powerful but expensive. Simple redirects and header manipulation work great. Complex logic? Prepare for $500+ monthly bills on modest traffic. The timeout limits will also bite you - 30 seconds max execution time.
CloudFront Functions: Cheaper alternative to Lambda@Edge for simple stuff. JavaScript only, 1ms execution limit, but perfect for URL rewrites and basic auth. AWS updated the JavaScript runtime to 2.0 in late 2023 with better features, and now supports KeyValueStore integration for dynamic personalization. Used it to fix trailing slash issues without hitting origin - saved thousands in compute costs.
Real performance depends entirely on your configuration, and getting that configuration right is where most people fuck up. Set your cache TTLs wrong and you'll be debugging 2-second API responses for weeks. The AWS CloudFront documentation is actually comprehensive once you wade through all the marketing bullshit, though it'll still take you hours to find the one setting that's breaking your shit. For monitoring, AWS's best practice alarms guide has CloudFront-specific metrics that'll save you from angry 3am phone calls from your CEO.