1

i'm trying to connect two machines. Azure Cloud service (A) with Linux machine (B) that doesn't belong to Windows Azure. What i`am trying to do is to make an open connection between A and B. So A could know that B is alive. I can't ping B from A directly because B will be in internal network. B doesn't have public IP that i could ping. In other words B will connect to internet thru router. I need to send some commands to B from web via A. Thats why i need to keep open connection between A and B. Any solutions, ideas or articles that i could read to achieve this ?

Here is diagram of infrastructure for more details enter image description here

Daniil T.
  • 149
  • 6

1 Answers1

3

What you'll want to do is to change the logic in the client systems - instead of connecting every 15 minutes, like this:

  • Open TCP connection to controller server
  • Check in
  • Close TCP connection

Have them do this..

  • Open TCP connection to server
  • Identify self, check for config file
  • ..wait for commands..
  • Did the connection fail or get closed? Open it again! (Put a reasonable retry timer in)

This way, the central server can send out data to the nodes when needed, like to update their config files on the fly - each of the video systems will be connected to it and able to immediately accept updates from the server. Push email systems work on essentially this same mechanism - the client holds a connection open to the server and the server can send it new data as soon as it's needed.

Depending on your application architecture, it might make more sense to plug in some kind of message queue system to do this; I'm not familiar with the communication protocol specifics of most of the MQs out there (and if they'll work with your network setup), but something like Redis Pub/Sub seems like it'd be a great fit.

Shane Madden
  • 116,404
  • 13
  • 187
  • 256