DEV Community

Cover image for Our web performance got worse by switching from Cloudfront Proxy to AWS Cloudfront
Arian Stolwijk
Arian Stolwijk

Posted on

Our web performance got worse by switching from Cloudfront Proxy to AWS Cloudfront

In an effort to improve world wide, multi region, latency, I've set up Cloudfront in front of our Application Load Balancer in AWS.

Previously we put the ALB (in Europe) public DNS in a CNAME record on Cloudflare and enabled (free) Cloudflare Proxy. But we noticed higher latency from US or Asia. So our idea was to use Cloudfront instead, as everything will be inside AWS, and we have more tools to tweak caching policies of different pages.

Surprisingly, the first result we got, is that Cloudfront is slower than the basic Cloudflare setup! Especially from the US and Sidney.

Page load times from different locations

We measured this with automated headless browsers in different regions visiting the homepage, and reporting the Performance API statistics, using Cloudwatch Synthetic Canaries.

We're still looking for settings to improve the global website performance. At least using smart caching, as explained in Making AWS News stupid fast with smart caching is on our roadmap.

Let me know if you know anything!

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more