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.
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.×