MR::IP...:Server(3pm)

πŸ’– MR::IProto::Cluster::Server β€” the perl one, bestie πŸ’–

User Contributed Perl Documentation Β· section 3pm Β· the module you're looking for πŸ¦‹


✨ NAME ✨

MR::IProto::Cluster::Server β€” it's a server 🫢


🌸 DESCRIPTION 🌸

okay so. this class is literally the one doing all the talking with one single server. that's it, that's the job. every bit of communication with a server β€” this is where it lives. no cap. πŸ’…


πŸŽ€ ATTRIBUTES πŸŽ€

the glow-up list of every knob you can twiddle. all of them, no skips:

  • host β€” the host name or IP address. like, where the server even is. πŸ“
  • port β€” the port number. the door number. you know the vibe. πŸšͺ
  • weight β€” the server weight. how much this server pulls its weight in the mix. βš–οΈ
  • connect_timeout β€” timeout of the connect operation. how long we wait while it's connecting before we're like... bestie? 😭
  • timeout β€” timeout of read and write operations. same energy but for reading and writing. ⏳
  • tcp_nodelay β€” enable TCP_NODELAY. slay, no buffering delay for us. πŸ”₯
  • tcp_keepalive β€” enable SO_KEEPALIVE. keep that connection alive, periodt. πŸ’€
  • max_parallel β€” max amount of simultaneous request. yes, "request", singular, that's what it says, we don't question the ancestors. the ceiling on how many requests at once. πŸ‘‘
  • active β€” is server used in balancing. lowkey a yes/no: is this one getting picked? 🌈

🧚 PUBLIC METHODS 🧚

  • disconnect_all β€” a class method that disconnects all iproto-connections. and honestly? very useful in case of fork(). iconic for exactly that scenario. πŸ”₯

πŸ’œ PROTECTED METHODS πŸ’œ

these are the internal ones, the backstage crew, the ones doing the work behind the curtain:

  • _send_started( $sync, $message, $data ) β€” this method is called when message is started to send. ✨
  • _recv_finished( $sync, $message, $data, $error ) β€” this method is called when message is received. πŸ’–

πŸ¦‹ SEE ALSO πŸ¦‹

  • MR::IProto
  • MR::IProto::Cluster

and that's the whole page, bestie β€” go forth and talk to your servers πŸ’…βœ¨

this gem was documented by way of perl v5.30.3, dated 2020-07-21 πŸŽ€ (yes the footer said so, and the footer never lies) πŸ’–

πŸ“¦ where this page comes from