Doesn't Route53 Weighted Routing switch on every request?

0

My problem

In order to test CLB to ALB migration, I set Route53 Weighted Routing at a ratio of 255 for CLB and 1 for ALB. After waiting for more than 5 minutes, no accesses flowed to ALB at all.

my research

I have configured ELB-A and ELB-B with Route53 Weighted Routing at a ratio of 1:1. I configured ELB-A to return 200 and ELB-B to return 503. I tested the connection using Curl. (Let's say the DNS name is my-test.com)

$ count=0; while true; do echo -n "${count} "; curl -sI my-test.com | grep HTTP | tee -a curl.log; sleep 1; count=`expr $count + 1`; done

The result was that requests were not switched at 50% probability, but switched by group.

$ uniq -c curl.log
   1 HTTP/1.1 503 Service Temporarily Unavailable
  94 HTTP/1.1 200 OK
  46 HTTP/1.1 503 Service Temporarily Unavailable
  43 HTTP/1.1 200 OK

My question

  • Doesn't it switch on a per-request basis?
  • Is the client machine's DNS cache functioning?
  • Am I correct in assuming that there is a 1/255 draw with one chance every 60 seconds for the DNS to be updated?
질문됨 2년 전1086회 조회
1개 답변
0

Doesn't it switch on a per-request basis?

When a request makes it to Route 53, the weighting is applied every time.

Is the client machine's DNS cache functioning?

As mentioned, the request needs to make it to Route 53 in order for the weighting to be applied. If the record is being cached (client cache or resolver cache), the weighting will appear skewed because the request is being "answered" by the cache.

Am I correct in assuming that there is a 1/255 draw with one chance every 60 seconds for the DNS to be updated?

With a TTL of 60 and weighting of 1 and 255 respectively for two records, close. It will be a 1/256 chance to pull the record with weight of 1 and 255/256 for the record of weight 255 [1] when the cache expires.

[1] https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted

AWS
답변함 2년 전

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

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

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

관련 콘텐츠