0

I'm using GCP like in the following schema:

  1. TCP balancer -> backend-service -> MIG(my app) with auto scaling.

"My app" accepts commands on a TCP port (A) and sends notifications on another TCP port(B) for subscriber.

I'm running my tests against TCP LB's IP - my tests connect to port B on a startup(i.e. one of instances of "my app") and also my tests make a connection to port A for each test.

i.e. I've faced with a case when port A and port B are terminated/connected to different hosts.

I am not sure how to circumvent this case.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
toootooo
  • 196
  • 7
  • could you please elaborate what error message you're getting while executing the above setup. Also check for [TCP proxy load balancing](https://cloud.google.com/load-balancing/docs/tcp) setup for two TCP connections. – Anbu Thirugnana Sekar Sep 15 '21 at 16:40
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 24 '21 at 14:19

1 Answers1

1

I have mitigated the issue using --session-affinity=CLIENT_IP for backend-services configuration, I.e. all connections from one IP are directed to the same target.

toootooo
  • 196
  • 7