0

I am writing a network application that has several machines that serve separate clients, but machine themselves need to communicate with each other frequently. Let's say multiple chat servers for example. How do I accomplish the server to server communication in terms of network architecture. I don't want each server to have a connection open with all other servers. Any ideas, pointers or suggestions would help. As a client developer, I am brand new to any of these. Thank you!

foobarometer
  • 103
  • 1

2 Answers2

0

Why don't you want each server to have a connection open with all other servers? You could always install 2 NICs in each server. One NIC would serve clients and the other NIC would be used for server-to-server communication. Another option would be to create VLANs but I still don't understand why don't you want each server to have a connection open with all other servers?

Michael
  • 506
  • 2
  • 8
  • 19
  • Thanks, I meant I don't want to use server to server socket connections for all servers; is not scalable to have each server have a socket open to every other server. How do I set up VLANs may be is a more appropriate question? Can I have something like this? where each node is a server connected to another server, whereas the leaf nodes serve clients, the tree nodes route packets between destinations. Does it need to be in software? Or can be accomplished with hardware. – foobarometer Jun 06 '11 at 07:54
  • This graph type solution is software based, where each tree server forwards packets from one leaf src to another leaf dst. If accomplished with h/w this can be delegated to DNS resolution. Is that correct? – foobarometer Jun 06 '11 at 08:08
0

If the communication does not need to be instantaneous you could just use a central database server to store the messages (or whatever is being communicated) and then the other servers can pick them up when they are ready.

An alternative would be to use a central server to act as an exchange, basically sitting waiting for messages then forwarding them to daemons on other servers as required. Doing it this way would be a lot more complex than the db option tho' as you would have to have methods in place to ensure that messages are actually passed on and some sort of retry mechanism for when they cannot be forwarded.

blankabout
  • 1,004
  • 1
  • 9
  • 16