Ensuring Scalability: Redis Connection Management in Production #434
-
Hello @geofmureithi, Thank you for creating such an excellent library! I truly appreciate your hard work, and I'm excited to integrate it into our production setup. To give you a bit more context, I’m building a WhatsApp service expected to handle significant traffic. The architecture involves a webhook that receives messages from Meta servers, which are then routed through a load balancer and a WAF before reaching multiple Could you clarify whether the Redis connection in your library uses connection pooling? If not, would this impact performance or scalability in such a high-load environment? I'm particularly interested in ensuring that our Redis interactions remain efficient given the high volume and rapid queuing required. Thanks again for your fantastic work, and I’d appreciate any insights you could share based on this setup. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hey, good to hear you are checking out apalis and I appreciate your questions they are pretty important.
Let me know if that answers your question. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your input—I really appreciate it, and I think things are going really well! Could you explain a bit more about what you mean by the "pure" aspect? Also, what’s the difference between setting the worker count to 4 versus running 4 separate instances of the worker? Does each worker create a separate connection? |
Beta Was this translation helpful? Give feedback.
Hey, good to hear you are checking out apalis and I appreciate your questions they are pretty important.
Does apalis support connection pooling in redis? The answer is yes with an asterisk. Basically RedisStorage only cares if you have implemented aio::ConnectionLike. We already have an example that uses deadpool for pooling:
apalis/examples/redis-deadpool/src/main.rs
Lines 21 to 30 in f6442fb