posthog icon indicating copy to clipboard operation
posthog copied to clipboard

Redis: use connection pool

Open guidoiaquinti opened this issue 2 years ago • 0 comments

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 at plugin-server/src/utils/db/hub.ts)
  • [ ] share improvements with the team

Environment

  • [X] PostHog Cloud
  • [X] self-hosted PostHog

guidoiaquinti avatar Aug 08 '22 12:08 guidoiaquinti