#35516: Setting Client Name for Redis Connections
-----------------------------------------+------------------------
Reporter: Aswin1105 | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 5.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I encountered an issue in Django when managing multiple services
connecting to Redis. To effectively monitor and maintain the number of
connections each service or Django instance has, it would be beneficial to
utilize the client_name feature in redis-py.
However, I found that the current documentation does not provide a
straightforward method to set the client_name in cache backend settings.
After delving into the django.core.cache code, I discovered that we can
pass the client_name parameter through the CONNECTION_POOL_KWARGS option
within the cache settings. This parameter is then propagated to the base
redis-py package.
By enabling the client_name for Redis connections, we can easily reference
and manage connections, improving the overall maintainability and
monitoring of Redis connections across services.
I propose adding a dedicated key for client_name under the CACHES setting
in Django, particularly under the default cache configuration.
Furthermore, including this in the documentation as a best practice would
save time and effort for developers in the future.
I will raise this django-redis also, But before that we will discuss and
find the best change
--
Ticket URL: <https://code.djangoproject.com/ticket/35516>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107019000f1a1bd-64aea42f-0769-4d88-b0a8-5e7d44b5d139-000000%40eu-central-1.amazonses.com.