An important feature of Mooshak is the replication of data between
servers in different machines, or in the same machine running under
different users. Using this feature it is possible to create a network
of servers, which can be useful for different purposes such as
- multi-site contests
- simultaneous public contests
- load balancing
- data backup
Data is replicated using a script based on RSYNC
,
invoked automatically every minute, and operating over
SSH
to provide an encrypted channel using public-key
encryption.
To create a network of Mooshak servers you must configure each node,
specifying where data will be replicated, and from where it can be
received. In particular you have to perform the following tasks:
- Generate you own keys using the appropriated button on the
network directory.
- Create
Server
directories for each of the nodes
connecting you server. You must specify and User and
Address. If the other server's base URL is not
http://Address/~User
then you must supply the
alternative URL so that it can be reached in order to ask it
for its public key. This process is done automatically when you check
the Send field. You you want to receive data from that server
you should check the Receive field.
- Check the connection, if you are sending data to the other
server, by pressing the Test button in this directory.
- Check the network, after having configured all servers. Go
up to the
network
directory and check local and global
connections. Local connections gives you a list of servers to which
you are sending data to and another list of those server you are
receiving data from. Global connections propagates this query to all
other servers (that in turn propagate it to other servers, if
necessary) and produces a table with all the gathered data. Both table
entries refer to servers. Each cell shows if the row server is sending
to the column server. A symbol is written the current state of the connection:
[-]
: both sending and receiving
[-[
: sending but not receiving
-]]
: receiving but not sending
-][
: neither receiving nor sending
Fully connected servers ([-]
) are shown in green
background unless they are the same server, in which case the
background is yellow (you probably do not want a server to replicate
to itself). All fully disconnected (-][
) servers are
shown with a gray background (you probably do not want to have them
connected). Those half connected servers ([-[
or
-]]
) are shown in red background because they are probably
misconfigured.