1 Answer
- Newest
- Most votes
- Most comments
0
NLB distributes connections using flow hash algorithm based on the protocol, source IP address, source port, destination IP address, destination port, and TCP sequence number. That means for example if you have a single long lived TCP connection, it will always be routed to same target. The balance becomes evident as you open more connections, that should be routed to the other targets.
I am mentioning this because DB connections from Application to Database tend to be long lived, and if you don't have many clients (as in, the application that connects to the NLB) you might experience an non optimal balance.
A few things to check:
- If multi-az, are your clients connecting to both NLB IP's? You can either check this on the clients or using the VPC flow logs.
- Check in your client connecting to NLB, if there are DNS options you can modify (such as avoid DNS caching)
- Have you enabled Cross-zone balancing in your NLB? This can help in case your clients are favoring one NLB node (IP).
Lastly, ALB only supports HTTP/HTTPS, so it will not work for PostgreSQL database connections.
Relevant content
- asked 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago