1

I'm quite new in Apache so please be patient. I'm trying to write distributed application which uses WebSocket protocol to communicate with each node. What is important it must work in client - sever architecture. It means that client (for example web browser) connects to single node and makes some requests. This requests can be distributed between other nodes using webSocket protocol and after computing send back to client. As a servers I must use Apache with mod_pywebsocket. If any node, for some reason, lose connection this situation should be detected by rest of nodes. Whats more, after reconnect this node should be able to send some kind of ping to other servers, to let them know that he is now available.

Now I have one client and two servers. I'm able to connect to one of them, which then makes connection to the second one, downloads some data and sends them back to client. All of this is done by using pywebsocket handlers and some modifications of echo_client.py from pywebsocket examples. What I want to do is to make permanent connections between all servers and check their availability by sending WebSocket ping-pong frames between them. If one of Apaches disconnects this should be detected very easy by using this. The problem is that I have no idea how to force Apache to connect to other servers on start-up using WebSocket. This should be some kind of module which starts after Apache reboot and which connects to all addresses from - for example - configuration file. When the connection is established it should start sending ping-pong frames to other servers to let them know that he is available.

My question is if there is any way to force Apache to make this kind of connection on start-up to many servers? I hope my explanation is clear enough. If something is unclear please ask me. I will try to explain it. Thank you in advance for any help You can provide.

Dur
  • 81
  • 6

0 Answers0