How to notify to reset tcp connection from target

39 views Asked by At

I have one domain (e.g., https://api.example.com) mapped with an ALB, serving only S2S calls. The team is working on setting up the DR environment, and everything is ready on the DR side, including the ALB. However, during the switch from PR to DR, we found that requests continued landing on the primary ALB for the next two hours. Upon further analysis, we identified that this was due to the client's use of connection pooling, keeping active persistent connections open for as long as possible, which directed requests to the primary ALB. I attempted to find multiple solutions, such as resetting the connection from the server, but since ALB operates at layer 7, this wasn't possible. To address this, the best solution would be for the target to notify the client after switching from PR to DR, prompting the client to reset existing connections after resolving the IPs from the domain. It's worth noting that the client application is written in Golang, while the server side runs Java 8. Despite trying solutions like sending 5XX or 4XX HTTP errors, these did not force the client to reestablish the connection with the server.

0

There are 0 answers