Redis:...entinel(3pm)

πŸ’– NAME πŸ’–

Redis::Fast::Sentinel β€” bestie, this is how you connect to a Sentinel instance πŸ¦‹

(psst, this page lives in the User Contributed Perl Documentation corner of your manual, and the page itself is Redis:...entinel(3pm) πŸ’…)


✨ SYNOPSIS ✨

my $sentinel = Redis::Fast::Sentinel->new( ... );
my $service_address = $sentinel->get_service_address('mymaster');
my @masters = $sentinel->get_masters;

okay so that's the whole vibe right there β€” make one, ask it where stuff is, and get a whole list of masters. iconic. πŸ‘‘


🌸 DESCRIPTION 🌸

This is a subclass of the Redis::Fast module, but it's been specialized into connecting to a Sentinel instance. That's its whole main character purpose πŸ’…

It inherits from the "Redis::Fast" package β€” so yes, you get all that goodness for free, no cap. 🫢


πŸŽ€ CONSTRUCTOR πŸŽ€

new

Go read "new" in Redis::Fast for the deets, bestie. Every parameter is supported… except "sentinels" and "service", which are silently ignored. Like, not a warning, not an error, just πŸ«₯ ignored. So don't go passing those and expecting them to do something, fr fr.


πŸ‘‘ METHODS πŸ‘‘

All the methods of the "Redis::Fast" package are supported πŸ’– plus these extra ones below. Not me giving you bonus content. 🎁

get_service_address

Takes the name of a service as a parameter, and then? It returns one of three things:

  • void (an empty list) β€” if the master couldn't be found 😭
  • the string 'IDONTKNOW' β€” if the service is in the sentinel config but literally cannot be reached πŸ’€
  • the string "$ip:$port" β€” if the service was found πŸŽ‰ slay!
heads up: that empty-list return is the "no master for you" case, and 'IDONTKNOW' is a completely different vibe β€” service exists, just unreachable. Two different moods, two different returns. πŸ™ˆ

get_masters

Returns a list of HashRefs representing all the master redis instances that this sentinel monitors 🧚✨ like a little roster of every master in the building.


and that's the whole page, bestie β€” go be a sentinel-whispering legend πŸ’œ

perl v5.42.3 · 2026-08-20 · Redis:...entinel(3pm) 🌈

πŸ“¦ where this page comes from