2 load balancers calling each other in the same VPC

0

I have 2 load balancers: elb-server-1 and elb-server-2. In my elb-server-1, there's an API that makes a request to elb-server-2 (microservice architecture). Sometimes, it works. Sometimes, the network can't be reached from server1 to server2. For security group, I allow all traffic for both inbound and outbound. Note: when restarting the server, they can connect again, but then can't connect. I'm not sure about this behavior and how to fix it. It can't be related to quotas because I only make a few requests in a day. How to resolve this?

已提问 1 个月前780 查看次数
2 回答
1
已接受的回答

That's weird! After hours of debugging, I figured that using org.apache.http.client.HttpClient to call another endpoint somehow timeout after couple requests. I changed to RestTemplate and it seems to resolve the issues. I still don't know about the root cause though.

已回答 1 个月前
profile picture
专家
已审核 1 个月前
0

After couple of debugs, I figured that there's probably nothing wrong with the routing between 2 ELBs. The server2 has logics to send multiple messages to SNS topic. 1 Message is fine, but the 2nd message got timeout and somehow after that, the server1 can't call the server2 again and keep timeout until I restarted both server. So there's probably something wrong with sending multiple SNS messages in 1 API.

已回答 1 个月前

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

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

回答问题的准则