MR::IProto::Cluster3pm
Cluster of servers
Overview
This class is used to implement balancing between several servers.
Exported constants
RR
|
Round robin algorithm |
|---|---|
HASH
|
Hashing algorithm using CRC32 |
KETAMA
|
Ketama algorithm |
Attributes
- balance
-
Balancing algorithms. Possible values are constants: RR, HASH, KETAMA. Or their string analogs: 'round-robin', 'hash-crc32', 'ketama'.
- servers
-
ArrayRef of MR::IProto::Cluster::Server.
Public methods
- server( $key? )
-
Get server from balancing using
$key.
- timeout( $new? )
-
Used to set
$newtimeout value to all servers. If argument is skipped and timeout is equal for all servers then returns it value, if timeout is different then returns undef.
Releases
Unchanged in 3 releases since Debian 11 (Bullseye).