0

I have two separate Beanstalk environments B1 and B2). I am currently trying to set up a weighted traffic route-policy through Route 53 such that B1 receives 70% of the traffic and B2 receives 30% of the traffic. The routing is set up and the traffic gets routed.

However, looking at the SUm of Requests metric for each Beanstalk environment, it seems like B2 is receiving more requests compared to B1. We get around 2000 requests/minutes and my understanding was that 1400 would be routed to B1 and the rest to B2.

However, that is not the case. It looks like the B1 receives around 1200 requests and B2 receives around 1800 requests. I am unable to understand the logic here as to why this is happening?

Given that my service is running on Beanstalk, is there any other configuration that I need to update/change? I use the public URL provided by both the Beanstalks. No external LB is used.

I would greatly appreciate any insight into this.

user782400
  • 1,617
  • 7
  • 30
  • 51

1 Answers1

0

What type of traffic are you validating? Normal public Internet traffic or some tool? What is the Route 53 DNS configuration and how long is the TTL for the resource records?

If you have a small number of clients making lots of requests, round-robin will not help. The clients will cache the IP address for a period of time and continue to use that IP address. In that case, configure a load balancer if you do not require sticky sessions, which would present the same problem.

Round-robin works best with large numbers of clients making a small number of requests.

Regarding TTL. A shorter TTL is better for round-robin than long TTL. However, that will possibly decrease application performance and possibly increase your Route 53 bill because clients will need to resolve domain names more often.

John Hanley
  • 74,467
  • 6
  • 95
  • 159
  • This is normal public internet traffic. Basically, users who access our service. It's an A record set with an EBS alias. I have not set any TTL. Under the TTL field, I see a "-" I was under the assumption that sticky sessions are not used when the policy is set to "weighted". Is that not true? – user782400 Jun 18 '22 at 06:15
  • Given that Route 53 is routing the traffic and the stick sessions are only available at the load balancer level, the sticky sessions should only come into play when the request is routed to either B1 or B2 (not at the Route53 level). Is my understanding correct? – user782400 Jun 18 '22 at 16:13
  • Sticky sessions are a load balancer feature and not a feature of Route 53. In my answer, I mentioned using a load balancer if you do not need sticky sessions. Traffic spitting and sticky sessions are different traffic distribution methods. – John Hanley Jun 18 '22 at 17:35
  • Understood. Given your above explanation, would can be the reason for the traffic split **not** behaving the way it should be, which is 70% to B1 and 30% to B2. – user782400 Jun 18 '22 at 18:25
  • @user782400 My answer provides information to help understand the potential causes of the results you see. Another detail is that round-robin is a best-effort technology and not a fine-grained control mechanism. The name resolution details will be in the Route53 logs. Enable them and analyze the results. – John Hanley Jun 18 '22 at 18:47