#36879: Add Django cache identification to Redis client metadata
-------------------------------------+-------------------------------------
Reporter: Vasil Chomakov | Owner: (none)
Type: New feature | Status: new
Component: Core (Cache system) | Version: dev
Severity: Normal | Resolution:
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
-------------------------------------+-------------------------------------
Description changed by Vasil Chomakov:
Old description:
> = 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
New description:
= 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: `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#comment:1>
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/0107019beb507095-2117148d-6ed5-4c7a-a418-859b08251753-000000%40eu-central-1.amazonses.com.