Skip to content

fix(response_cache): don't duplicate redis connection if we specify custom config for a subgraph#8764

Merged
bnjjj merged 8 commits intodevfrom
bnjjj/dont_duplicate_redis_connection
Dec 18, 2025
Merged

fix(response_cache): don't duplicate redis connection if we specify custom config for a subgraph#8764
bnjjj merged 8 commits intodevfrom
bnjjj/dont_duplicate_redis_connection

Conversation

@bnjjj
Copy link
Contributor

@bnjjj bnjjj commented Dec 16, 2025

Response Cache - Redis Connection Management

Fixed an issue where the response cache would create duplicate Redis connections when a custom configuration was specified for individual subgraphs (without any specific Redis configuration). Previously, if a subgraph inherited the same Redis configuration from the global all setting, the router would unnecessarily establish a redundant connection. Now, the router correctly reuses the existing connection pool when the configuration is identical, improving resource efficiency and reducing connection overhead.

Impact: Users with response caching enabled who specify Redis configurations at both the global and subgraph levels will see reduced Redis connection usage, leading to better resource utilization.


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • PR description explains the motivation for the change and relevant context for reviewing
  • PR description links appropriate GitHub/Jira tickets (creating when necessary)
  • Changeset is included for user-facing changes
  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Metrics and logs are added3 and documented
  • Tests added and passing4
    • Unit tests
    • Integration tests
    • Manual tests, as necessary

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. A lot of (if not most) features benefit from built-in observability and debug-level logs. Please read this guidance on metrics best-practices.

  4. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

…ustom config for a subgraph

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
@apollo-librarian
Copy link

apollo-librarian bot commented Dec 16, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: e84f01f93b992ac40be84283
Build Logs: View logs

@github-actions

This comment has been minimized.

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
@bnjjj bnjjj requested a review from carodewig December 16, 2025 15:50
@bnjjj bnjjj marked this pull request as ready for review December 16, 2025 15:51
@bnjjj bnjjj requested a review from a team December 16, 2025 15:51
@bnjjj bnjjj requested a review from a team as a code owner December 16, 2025 15:51
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Copy link
Contributor

@carodewig carodewig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor comments - overall looks great!

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
@bnjjj
Copy link
Contributor Author

bnjjj commented Dec 16, 2025

Updated @carodewig ! Thanks for the review

@bnjjj bnjjj enabled auto-merge (squash) December 16, 2025 16:11
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
@bnjjj bnjjj disabled auto-merge December 18, 2025 18:27
@bnjjj bnjjj enabled auto-merge (squash) December 18, 2025 18:28
@bnjjj bnjjj merged commit eb50278 into dev Dec 18, 2025
15 checks passed
@bnjjj bnjjj deleted the bnjjj/dont_duplicate_redis_connection branch December 18, 2025 18:48
briannafugate408 pushed a commit that referenced this pull request Jan 9, 2026
…ustom config for a subgraph (#8764)

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
@abernix abernix mentioned this pull request Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants