Hi,
I've been running landers using the following configuration
Server - Amazon S3
CDN - Amazon CloudFront
DNS - Amazon Route 53
Domain Registrar - NameCheap
To test load time, I'm
i). Opening a New Incognito Chrome Window on my Desktop computer
ii). Opening Developer Tools (Contol-Shift-i) and looking at the network tab
iii). Entering the URL
The Issue is that I've run this Lander before (for months) on another geo and it currently has
* 336ms load time through CDN (cloudfront).
* 1.03s load time direct from the server (going direct to S3 bucket)


BUT, I just setup the SAME lander on a new Domain in a New Geo yesterday using the same configuration (so new Domain, Amazon S3, Cloudfront, Route53) and am getting
* 1.67s load time through CDN (cloudfront).
* 716ms load time direct from the server (going direct to S3 bucket)
The CDN is slower than going Direct!!!
I've also checked, and yes the CDN (cloudfront) is setup and getting traffic (see usage report below)



Anyone know what is happening?
Is it that the Amazon Cloudfront and Route53 DNS combo taking time to deploy since I bought and setup the domain less than 12 hours ago?
OR something else
Any ideas on how to fix it?
Any help would really be appreciated!!!
thanks!
Looks like the CDN hasn't built up its cache yet? As far I understand it, the first request(s) to each region the CDN is in bypass it and go directly to the origin server to grab its contents, before subsequent requests all go through the CDN.
If you look at the first and second screenshots for the CDN load time, the only difference is that in the second example the response time grew from 45ms to 1.3seconds, which doesn't make sense for a CDN to take that long to respond if it's pulling from cache.
I prefer Cloudflare + Netlify for hosting all my stuff. Much easier to setup, their DNS is already super fast (see https://www.dnsperf.com/), and Netlify uses amazon cloudfront to host assets + global load balancing to digital ocean servers for html files (last I read). And it's all free.
Hi thedudeabides - I've actually been calling that page a lot this afternoon (maybe 20 to 30 times while testing) ... so it should have cached to the local region.
At the moment I'm planning to give it a few more hours and then delete and redo the Route53 and Cloudfront Settings - maybe something went wrong setting it up.
BTW - have you done a test to see if Amazon S3/Cloudfront is faster or slower than your Cloudflare/Netlify?
UPDATE: About 24 Hours After I Setup CDN
Time For Page to Load Now Is
Domain 1 - now about 600ms
Domain 2 - now about 600ms
Domain 3 - now about 300ms
Domain 4 - now about 600ms
NB: I setup 4 domains at the same time to have some backups just in case :-)
So From Hour 0 to 24 - Domain 1 was 1.67s to load
And Now at Hour 24 - Domain 1 is now at 600ms to load the page
And Now at Hour 24 - Domain 3 is now at 300ms to load the page
NB: The Older Domains are loading that page at about 300ms so might need to wait a few more hours for the other Domains (1,2,4) to catchup.
So it looks like there maybe a delay of 24+hours from the time you actually setup on Amazon Cloudfront with Route53 until it becomes fully functional.
Which I think is a big deal since:
1). Running a test in the first 24 hours and not realizing the load times are so bad will mean you'll probably get bad results even if the campaign had potential
2). If a domain goes down and needs to be replaced, you NEED to have one ready to replace it and not just set one up then and there (otherwise the first day performance is going to suck)
My to do:
1). Going to put checking performance onto the checklist of any backup domains I setup - before I clear them as ready to use.
QUESTIONS FOR EVERYONE
1). Has anyone else using Amazon Cloudfront/Route53 have this happen to them?
2). Has anyone else using other CDNs seen this happen (i.e. delay from setup to actual deployment)?
Thanks - Suneel
The large wait times in the CDN network timing breakdown suggests it is doing something it shouldn't be doing, e.g. contacting your origin (S3) to check content, fetch a resource, compare expiry dates, etc. If that is happening it points to inappropriate config somewhere.
The resource loading from the CDN should almost always show lower initial connect, wait and content download times, as the servers are going to be closer to you (and virtually every other requester) than your origin.
Hi Zeno,
That was what stumped me since 12 hours after I setup I was loading and reloading the pages on those domains and load times did not go down.
I did not change the config but 24 hours after setup it started working.
Don't know if it was a one off - or something that will happen again ... so I'm just going to be double checking before I launch more new domains on AmazonWS.
Of course it is getting expensive on a Brazilian Campaign (doing about 250k pops a day) so I'm looking to test other other methods which cost less with comparable performance.
At the moment thinking of testing
* Free CDNs
-- Cloudflare/Netlify - (except TOS limits it to 100GB bandwidth on free account I assume per month which is a little low)
-- looking at other options.
* Cheap Fast Server running in Brazil (e.g. Vultr, except the closest server vultr has to South America is in Miami :-( )
Has anyone tried either or have advice on cheaper options than AmazonWS?
Hi Amy,
Yeah - not sure if it was a once off, but I'm now double checking performance and load times before launching anything on new domains :-)
I think the most pragmatic option here is to just switch CDNs and keep the same origin, which will allow you to test a major change quickly.
I'd recommend using Cloudflare DNS > pointing it to your S3 bucket, orange cloud mode (i.e. so its actually caching) and using the default settings.
Just create a free account, add the domain and let it import records, change your NS at your registrar and you'll be virtually good to go.
Testing speed only from your own browser is really not a good practice. Too many variables.
Take a look at a load testing tool. I like this one: https://loader.io/
Retested on a new set of domains and could not repeat the issue.
It was working about 1 hours after setting up Amazon S3, Cloudfront, Route53 & Namecheap.
I don't know why is was an issue before.
I'll just add it to my checklist of things to check before launch, but may not happen again (or very often)


Cloudflare acts as a reverse proxy for traffic itself, rather than just static assets like JS, CSS, etc. so its basically a "more thorough" CDN.
You are right that Cloudflare intercepts all incoming requests, but this is also the case with a normal CDN. At the DNS level some sub.domain.com can either point to your server or to the CDN hostname. When using a normal CDN the request goes to the CDN's edge servers, always. If that server has the asset cached it delivers it immediately, else it looks for the asset on your server (origin). The client never connects directly to your server as there is no pathway to that.
Cloudflare generally is a lot more powerful than any traditional CDN and doubles as your DNS platform as well. Its important to note Cloudflare will also provide SSL, avoiding the hassle of dealing with SSL certificates, and obscure your server IP, providing security by obfuscation.
As for the hacker issue... I doubt this has anything to do with Cloudflare and more to do with Wordpress itself and your specific setup. Likewise you couldn't blame Cloudflare for not preventing me physically walking up to your server in a rack and beating it with a baseball bat.
I wouldn't try to combine Cloudflare with another CDN. This is a bit pointless.
For the average affiliate and non tech-savvy person, Cloudflare is the best option. It's free, has an extremely large edge network, doubles as the DNS management centre, provides extra security and makes SSL trivial. It's a no brainer unless you have some specific reason that its not appropriate for your situation (e.g. you are doing mass video delivery in an obscure country where there is no Cloudflare edge server).