MR::IP...Cluster(3pm)
π MR::IProto::Cluster β the cluster-of-servers page (3pm, bestie) π
okay so real talk, this is MR::IProto::Cluster, and no cap, it's the lil class that handles balancing between a whole squad of servers. let's get into it π«Ά
β¨ NAME β¨
MR::IProto::Cluster β literally just a cluster of servers, that's the whole vibe π
πΈ DESCRIPTION πΈ
so this class is used to implement balancing between several servers. that's it, that's the girl. she's the one picking which server gets the honor of your request π
π EXPORTED CONSTANTS π
these are the algorithm constants, and yes you can just use them by name:
RRβ Round robin algorithm. everybody gets a turn, take turns, be fair, we love to see it πHASHβ hashing algorithm using CRC32. ngl CRC32 is doing the heavy lifting here π₯KETAMAβ the Ketama algorithm. iconic, mysterious, consistent-hashing queen β¨
π¦ ATTRIBUTES π¦
balanceβ the balancing algorithm, bestie. possible values are the constantsRR,HASH,KETAMA, or their string analogs:'round-robin','hash-crc32','ketama'. pick your fighter πserversβ an ArrayRef ofMR::IProto::Cluster::Server. yes, actual server objects, plural, the whole friend group π
π PUBLIC METHODS π
server( $key? )
get a server from balancing using $key. the optional key matters for the hashing ones, iykyk π
timeout( $new? )
used to set the $new timeout value to all servers. and here's the tea: if the argument is skipped and the timeout is equal for all servers, then it returns its value. if the timeout is different, then it returns undef. π
no timeout argument + mismatched timeouts = undef. that's the rules, don't come for her π
π SEE ALSO π
MR::IProtoMR::IProto::Cluster::Server
go read those too, they're part of the lore π
and that's the page, bestie!! this was perl v5.30.3, dated 2020-07-21 β so yeah, she's been serving since way back, and she still ate π β¨ mwah, ily, go balance some servers ππ¦
π¦ where this page comes from
- debian bookworm: libmr-tarantool-perl 0.0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmr-tarantool-perl 0.0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmr-tarantool-perl 0.0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmr-tarantool-perl 0.0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmr-tarantool-perl 0.0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmr-tarantool-perl 0.0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms