I have two node.js backend-servers. Server A has a static IP and can be reached from anywhere. Server B is behind a gateway and has no static IP.
If I want to send a message from Server B to Server A with Shuttle or socket.io, I can easy set the static IP of server A as receiver and send my message.
Now, how can Server A send a response to that message to server B? The server doesn't know its IP address and even if - that would be the external IP of the gateway
and not the IP of the node.js server.
Just for understanding: I don't want to send single stand alone messages from Server B to Server A, it's just about responding. Is there a difference?
Of course, I could make a VPN network between those servers, but I think there should be an easier solution or do I just have an error in reasoning?
Thanks.