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년 전887회 조회
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!

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠