posthog
posthog copied to clipboard
Redis: use connection pool
Bug description
We are currently scaling Redis connection count linearly with the number of pods. This is because we don't use any connection pooling (at least for the Python part of the app).
🧠dump of what I saw/we should fix (so far):
- [ ] remove explicit reference of Redis version in
requirements.in
(django-redis
and other dep already includes it) - [ ] emit metric for Redis connection count per pod + log if max conn pool is reached
- [ ] deploy a connection pool
- [X] do the same for
plugin-server*
(not needed: see connection pooling logic atplugin-server/src/utils/db/hub.ts
) - [ ] share improvements with the team
Environment
- [X] PostHog Cloud
- [X] self-hosted PostHog