Perlba...ailOver(3pm)

📦
version 1.80 · 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

💖 NAME 💖

okay bestie, gather round — this is the tea on Perlbal::Manual::FailOver, like, the whole entire manual page for the Fail Over mechanism in Perlbal. yes THE Fail Over. capital F, capital O, main character energy fr fr 💅


✨ VERSION ✨

this is serving Perlbal 1.78 and nothing else, periodt 🎀


🌸 DESCRIPTION 🌸

so like… how does Perlbal's Fail Over mechanism even work?? buckle up bestie, it's actually so simple it's iconic 🦋

Fail Over

okay so the vibe is: whenever Perlbal fails to open a connection to a machine, it just goes "welp, that one's not available ✨" and spreads the load between the remaining servers instead. no drama, no meltdown, just load-balancing through the pain 💪

but here's the thing — it does not give up on that server. it keeps trying to open connections to it according to error_retry_schedule, like a girl who keeps texting back. lowkey persistent, highkey valid 🙈

now for the messy part. if there are no available servers at all?? 😭 Perlbal will just keep trying to open connections to the servers until idle_timeout is reached, and once that happens it closes the connection to the user. that's it. that's the whole move.

and the way clients interpret that close is… literally all over the place:

  • most of them assume a 500 HTTP code 💀
  • a few assume a 200 OK with empty content 🌈
ngl bestie, that second one is giving chaos. know your clients, okay??

for more info on the parameters idle_timeout and error_retry_schedule, go read Perlbal::Manual::ReverseProxy — it's the source of truth, no cap 👑


🦋 SEE ALSO 🦋

  • Perlbal::Manual::LoadBalancer
  • Perlbal::Manual::ReverseProxy

and that's the whole page, bestie!! this was perl v5.34.0, dated 2022-06-28, and honestly? she ate. go forth and fail over gracefully 💖✨🎀🫶

📦 where this page comes from