Monday, August 24, 2020

Looking for "unconventional" port forwarding server

I am not really sure what is the name of such software, but I will explain in details my use case.

I have a multi-container system running on multiple virtual machines (AWS EC2), each container have a specific port assigned through its entire life-cycle and it is meant as stand-alone application, each VM has its own pubic IP and they are currently not load balanced. I will be often moving those containers around (for autoscaling, VM OS updates, etc...) to different VM, thus the IP will change quite often.

To avoid the end user from changing the IP every time he launches his application, I have assigned a unique DNS A record per container. Unfortunately I just discovered that the vendor that is used to consume the application running on the containers, does resolve the DNS record and save the IP instead (whatever...).

**So now I am looking for having one IP (static) routed to different IPs depending on the requested port**

What I am looking for is some kind of port forwarding server (since once assigned **the container port never change**) that I can run on a VM.The working principle would be the following:

  1. Assign a static IP to the VM where the port forwarding software is running
  2. After the container has spawned it will register itself communicating its port and current IP
  3. The port forwarding software will simply proxy the request to the container
  4. When the container it is stopped it will first de-register itself

I hope I don't have to write this all by myself and there is already a solution out there.

Thanks



No comments:

Post a Comment