#36879: Add Django cache identification to Redis client metadata
-------------------------------------+-------------------------------------
Reporter: Vasil Chomakov | Type: New
| feature
Status: new | Component: Core
| (Cache system)
Version: dev | Severity: Normal
Keywords: redis cache | Triage Stage:
observability | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
= Proposal: Add Django cache identification to Redis client metadata =
== Context ==
Redis documentation recommends that clients identify themselves via
connection metadata to help operators monitor, debug, and reason about
production systems (for example using ``CLIENT SETINFO`` / ``CLIENT
INFO``):
https://redis.io/docs/latest/commands/client-setinfo/
This information is intended to help Redis operators understand what
software is connecting to their servers, especially in shared or multi-
tenant environments.
Django’s Redis cache backend is built on top of ``redis-py``, which means
Redis connections created by Django are currently indistinguishable from
other ``redis-py``-based clients in shared Redis deployments. This makes
it harder for Redis operators to attribute traffic, diagnose issues, or
understand cache usage patterns when multiple applications or frameworks
share the same Redis instance.
== Proposal ==
Django could provide '''additional, non-invasive client identification'''
for Redis cache connections to indicate that the connection originates
from Django’s cache framework.
``redis-py`` exposes a ``driver_info`` API that may be used to attach
Django-specific context to the connection, in line with Redis’s client
identification recommendations.
== Goals ==
* Align with Redis client identification best practices
* Allow Redis operators to distinguish Django cache connections
* Improve observability in shared Redis environments
== Example (illustrative) ==
A Redis connection created by Django’s cache backend might expose metadata
equivalent to:
* Client library: ``redis-py``
* Framework / driver: ``django-cache``
== Scope ==
* This is a '''feature proposal''', not a patch submission
* No behavioral changes to caching semantics are proposed
* Any implementation would rely solely on ``redis-py``’s supported APIs
--
Ticket URL: <https://code.djangoproject.com/ticket/36879>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019beb4e2468-59114f25-2f28-4ff0-9274-ebf6744daf05-000000%40eu-central-1.amazonses.com.