go-tcp-proxy icon indicating copy to clipboard operation
go-tcp-proxy copied to clipboard

cannot connect when domain ip changed

Open pugwoo opened this issue 5 years ago • 1 comments

I tested it in kubernetes as following steps:

  1. start a deployment named nginx without service.
  2. run ./tcp-proxy -r nginx:80 in another pod, curl http://127.0.0.1:9999 works fine.
  3. then stop nginx pod and it will restart another one, and curl http://127.0.0.1:9999 , it timeout because nginx:80 's ip is changed.

pugwoo avatar Jun 24 '20 09:06 pugwoo

Yep, this is an issue, name resolution happens once on start

On Wed, 24 Jun 2020 at 7:27 pm Pugwoo Chia [email protected] wrote:

I tested it in kubernetes as following steps:

  1. start a deployment named nginx without service.
  2. run ./tcp-proxy -r nginx:80 in another pod, curl http://127.0.0.1:9999 works fine.
  3. then stop nginx pod and it will restart another one, and curl http://127.0.0.1:9999 , it timeout because nginx:80 's ip is changed.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jpillora/go-tcp-proxy/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X42IVAXE4NOEAKYCXS3RYHBJ3ANCNFSM4OGPHKFA .

jpillora avatar Jun 24 '20 13:06 jpillora