Amazon Cloudfront settings to reduce waiting time

JohnyFree picture JohnyFree · Apr 28, 2016 · Viewed 10.8k times · Source

UPDATE: This was my mistake, see my comment the below. Now Cloudfront works great with new settings.

Sometimes dns waits 600ms and than it will wait another half second which makes 90kb file waiting more than 1 second. Sometimes pingdom wait time shows even 1 second. If I try another test, it will go sometimes to 90ms all together.

I understand that first request will take more time because cloudfront needs first to take file from our server. I set cache time to 86400 s which means if it should get file from cache for whole 24 hours. But if I try pingdom just 2 hours after first test it will go again very slow.

The below are my results and settings. Am I missing something? enter image description here

Answer

Clain Dsilva picture Clain Dsilva · Oct 1, 2017

Most of the cases its the DNS that makes the delay because amazon is really scalable.

I had similar issues with my ISP and was able to resolve its quickly by changing the DNS servers.

Try changing your DNS to Google DNS IP V4 8.8.8.8 8.8.4.4

IP V6

2001:4860:4860::8888
2001:4860:4860::8844

Google Public Dns Documentation

Or use OPEN DNS

208.67.220.220
208.67.222.222 

OPEN DNS Documentation