Question

Redis pub/sub subscription limitations?

I have a weird issue, that could easily be simple ignorance on my part.

I have a 4vcpu droplet with docker installed. One of the docker containers runs Redis (the bog-standard docker image).

I only use it for a single pub/sub channel at the moment.

I publish from another docker container, and have x number of subscribers, each in their own docker containers.

x is the problem.

I can add up to 4 subscribers and everything works beautifully.

As soon as I add a 5th or more, subscribers start to unsubscribe. It’s not necessarily the last one added, but when I add a 5th, one decides to stop working. If I add code to force it to start monitoring again - it does, but it behaves badly - sometimes missing messages entirely, only to pick them up in what looks like a batch later.

Note: there is ONE message being published per minute - so it’s not like anything’s being hammered here. Both DO monitoring and external monitoring show cpu usage under 20% (often under 10%).

I have no previous experience with redis. Does listening for messages effectively consume a vcpu? Is it a vcpu limit I’m hitting? I’m tempted to resize to a 6vcpu droplet to test out this theory.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hej @cemdev

at this time have you figured out what the issue was ? probably not on redis but in your app/code.

Hope you solved.

br j4c0b1