Can low 60 seconds TTL affect web service performance?

0

Route53 Alias records have TTL of its origin record, which is 60 seconds for AWS ALB and a few other services. As far as I understand, it causes the client (browser, etc...) to send DNS queries every minute, so performance is affected. Am I right? TIA, Vitaly

已提问 2 年前892 查看次数
1 回答
0

TTLs of 30/60 seconds have become extremely common in web frontends / APIs to allow for fast traffic reroute in case of endpoint failure, and don't carry a noticeable impact on end user performance (resolution is a few ms + network rtt).

The risk of keeping it lower would be your end users would keep hitting a failed ELB node unable to serve requests and get timeouts, which is a tradeoff people isn't likely gonna want.

You might want to look at tuning timeouts for supporting persistent connections (particularly in HTTP2) to improve performance (they will also save time from TCP/TLS session setup): details here.

AWS
已回答 2 年前
  • Giorgio, thank you! I totally understand that AWS infrastructure is very dynamic, and we should be ready for failover.

    resolution is a few ms + network rtt

    According to my test right now (dev panel in Chrome, DSL connection) DNS lookup took 0.5 sec (0.504ms)!

  • It's possible - depends where you are, which resolvers you use and connectivity. Also note, depending on how "hot" the record is (ie how many customers you have), end user's DNS recursors might already have a refreshed version by the time the user sends a request (because another user behind the same recursors already requested it). Overall hard to predict, you will need some real world measurements to understand impact!

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则