-
Apologies if this is a dumb question, I have been cycling around the issues, discussions, and docs for a few gems trying to navigate some Some of the gems in question:
In Sidekiq 6 one was able to provide a pool, and now Sidekiq builds one internally. The upgrade guide mentions:
Does this mean that we should be able to piggyback off of the pool that Sidekiq initializes and provide it to other gems that are also using RedisClient, or are those helpers primarily for internal Sidekiq extensions and components only? ie. init I don't mean this as a Searchkick Q&A, so much as understand more about why Sidekiq chose to make their own pool and strategies for avoiding having to initialize so many pools across the application as I currently am having to (due to some gems needing I know there is a question of "why are you using one Redis instance for so much" but we are generally not taxing things all that much yet outside of connections as servers scale up and down (and implementing some other layers to limit things like Flipper using it at all) but figured the question was worth asking if not for others that may have similar questions. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The pool has never been something Sidekiq has advertised as available for use. We locked it down because people were initializing their own connection pool way too small and causing severe performance issues with Sidekiq. You are welcome to use that pool in your own code if you understand the ramifications but this has always been a matter of "If you know what you are doing, I'm not going to stop you" but I reserve the right to make breaking changes, like the pool lockdown, if the API is causing support issues.
Don't do this. Sidekiq's connections should remain under Sidekiq's control, you cannot steal a connection and hand it elsewhere safely. Create your own pools and connections for other subsystems, this helps keep them logically separate too. |
Beta Was this translation helpful? Give feedback.
The pool has never been something Sidekiq has advertised as available for use. We locked it down because people were initializing their own connection pool way too small and causing severe performance issues with Sidekiq. You are welcome to use that pool in your own code if you understand the ramifications but this has always been a matter of "If you know what you are doing, I'm not going to stop you" but I reserve the right to make breaking changes, li…