Spread is an open source toolkit that provides a high performance messaging service that is resilient to faults across local and wide area networks. Spread functions as a unified message bus for distributed applications, and provides highly tuned application-level multicast, group communication, and point to point support. Spread services range from reliable messaging to fully ordered messages with delivery guarantees.
Spread can be used in many distributed applications that require high reliability, high performance, and robust communication among various subsets of members. The toolkit is designed to encapsulate the challenging aspects of asynchronous networks and enable the construction of reliable and scalable distributed applications.
If you have web cluster and want to keep logs of every node in one place, spread can be very usefull. From the very begining, i've had one server (logging box) which has run spread, spreadlogd and spsplit. And every cluster node used it as spread server. If you use mod_log_spread you probably know, that every apache thread opens its own connection to spread server. And this can be a problem, since spread can't handle too many connections. Default value is 512 IIRC. This can be tweaked in spread_params.h, WATER_MARK variable. But this won't help a lot, if you run cluster. E.g. if you have 10 nodes with MaxClients set to 512, you'll need to handle up to Number_of_nodes x MaxClients = 5120 connections. In such circumstances your spread daemon will drop new connections, saying there are too many connections already. And then not all of your data which is need to be logged will get into the log files. To overcome this limitation, spread segment can be setup instead of single spread daemon:
Spread_Segment 10.50.0.255:4803 {
box1 10.50.0.1 {
C 127.0.0.1
D 10.50.0.1
}
box2 10.50.0.2 {
C 127.0.0.1
D 10.50.0.2
}
box3 10.50.0.3 {
C 127.0.0.1
D 10.50.0.3
}
box4 10.50.0.4 {
C 127.0.0.1
D 10.50.0.4
}
box5 10.50.0.5 {
C 127.0.0.1
D 10.50.0.5
}
lbox 10.50.0.20 {
C 127.0.0.1
D 10.50.0.20
}
}
EventLogFile = /var/log/spread.log
EventTimeStamp
This spread's config is the same across the spread segment. Boxes 1-5 are cluster nodes which run spread daemon locally. "C" lines describe configuration for client connections and "D" lines are for inter daemon communication. One additional box in this setup is a logging box, where you write messages obtained from spread group(s) to disk. Of course, spreadlogd can connect to any other box in segment as well, join needed group and get messages from there.









