Load balancer routing policy in API gateway

Hello Experts,

While configuring a RESTful API with Load balancer routing policy, i am facing some issue.
The API is created successfully with 2 “Route to” endpoint URI in the LB routing policy, but when i call the API both the endpoints URIs are receiving the call instead of either of the one.

Below is the screenshot of the load balancer routing config done. I have 2 aliases which are being used here.

Kindly let me know whether i need to do something else or its some issue which you have faced as well.

image

Regards,
Debapriyo

Dear @Debapriyo_Dasgupta1,

I just configured one and tested it as follows

image

First call goes to [https://petstore.swagger.io/v2/**pet/101**]

image

and second call goes to [https://petstore.swagger.io/v2/**pet/102**]

image

Can you double check the value in the aliases or try putting the actual URL(without alias) and test it first?

Best Regards,
Franklin

1 Like

Hello @franklinantony,

Exactly that should be the behavior that i was expecting. But somehow I am not getting desired result.

For the endpoints I have already tried with the below combinations:

  1. Provided direct endpoint url in load balancer routing → Call going to both endpoints
  2. Provided endpoint aliases with 2 different target servers → Call going to both servers
  3. Provided endpoint aliases with same target server → Call going to the target server twice

Do you think there is any specific property that dictates this policy to use “either or” and not “both” and may be that property got corrupted somehow.

Thanks in advance.

Regards,
Debapriyo

Hello @Debapriyo_Dasgupta1,
I dont think there is anything else.

  • Can you try changing to a GET request and see, as apparently if the request goes to both endpoints, then what response would you receive?
  • Can you share your API asset sample as a zip file?
  • What version/fix pack are you using.

I am using 10.5.0.8

Best Regards,
Franklin

Hello @franklinantony,

I am using API Gateway version 10.5.0.6.244.
I am unable to attach the zip format so i am providing you screenshots

.

Hope this helps
Please let me know in case i am missing some trivial config.

Regards,
Debapriyo

Hello @Debapriyo_Dasgupta1,
Everything looks fine.

Can you tell me how you were able to validate the request reached both nodes ?

One way I would validate this is by tampering one of the endpoints to be invalid. If even after that the request is going to both nodes, then your API invocation should fail always otherwise alternatively.

Best Regards,
Franklin