Gitlab::Redis::Wrapper classes to use config_fallback connection pool instead of spinning new connection
Using https://gitlab.com/gitlab-org/gitlab/-/blob/16-6-stable-ee/lib/gitlab/redis.rb as a reference, we have 13 classes at the moment. This could potentially put a pressure on users if they were to run a single Redis instance.
There are fundamentally 4 main categories of Redis:
- SharedState; also a config fallback for DbLoadBalancing, ClusterSharedState, Sessions, TraceChunks
- Cache; also a config fallback for RateLimiting, FeatureFlag, RepositoryCache, Chat
- Queues (by extension, Sidekiq) and a config fallback for QueuesMetadata
- ActionCable
Instead of spinning up a connection pool, perhaps we could reuse the config_fallback.pool
to optimise the amount of Redis client connections being created.
Edited by Sylvester Chin