Amazon Cloudfront Settings to Reduce Latency

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

Sometimes dns waits for 600 ms, and then waits another half a second, which makes a file of 90 KB in size more than 1 second. Sometimes the pingdom timeout even shows 1 second. If I try to do another test, it will still sometimes take up to 90 ms.

I understand that the first request will take longer because the cloud front must first receive the file from our server. I set the caching time to 86400 s, which means that it should receive the file from the cache for 24 hours. But if I try pingdom only 2 hours after the first test, it will be very slow again.

Below are my results and settings. Did I miss something? enter image description here

+13
amazon-cloudfront cdn
source share
2 answers

In most cases, this is the DNS, which makes the delay because amazon is really scalable.

I had similar problems with my ISP, and I was able to quickly solve it 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

-one
source share

CloudFront not only scales, but also eliminates bottlenecks, but seeks to speed it up.
AWS CloudFront is a low latency, fast transfer service.

Here are some of the symptoms that may be slower when using CloudFront.
(This includes most issues.)

  • The requesting edge can receive a large number of requests.

  • The extreme server closest to the client may be farther than the web host server.
    (Geographical delay)

  • DNS queries may be delayed.

  • There is little such possibility, but make sure the x-edge is in the "View in the cloud front" state.
    Cache may be missing.

Detailed troubleshooting is difficult because you do not know what the test is or what condition.
If logging is enabled, further troubleshooting is possible.
It is generally recommended that you enable logging.

If you have any questions, feel free to ask! thanks.

-2
source share

All Articles