jpillora / go-tcp-proxy

A small TCP proxy written in Go
MIT License
746 stars 197 forks source link

cannot connect when domain ip changed #14

Open pugwoo opened 4 years ago

pugwoo commented 4 years ago

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.
jpillora commented 4 years ago

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

On Wed, 24 Jun 2020 at 7:27 pm Pugwoo Chia notifications@github.com 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 .