Skip to content

change: redis connection pool → Conection Managerへ#71

Open
ttatsato wants to merge 3 commits into
mainfrom
feature/mc
Open

change: redis connection pool → Conection Managerへ#71
ttatsato wants to merge 3 commits into
mainfrom
feature/mc

Conversation

@ttatsato
Copy link
Copy Markdown
Owner

@ttatsato ttatsato commented Apr 27, 2026

Summary / 概要

Refactor Valkey-based components to hold a shared MultiplexedConnection instead of creating a new Redis client connection for each operation. ValkeyAuthCache and ValkeyRateLimiter now establish a multiplexed connection at initialization, reuse cloned connections for Redis commands (including the startup health check), and avoid repeated connection setup during normal request handling.

Background / 背景 *

We previously created a new Redis multiplexed connection from the client for each cache or rate-limiting operation.
This added unnecessary connection setup overhead and made it harder to reason about how many active connections the service was holding.
To simplify connection management and improve efficiency, we want Valkey-based components to reuse a shared multiplexed connection that is established once initialization

Issue (or Discussion) Link / イシューまたはディスカッションのリンク

Impact / 影響範囲

-- 既存のDBスキーマに影響があるなど

Changes / 変更内容

Testing / テスト*

  • cargo fmt && cargo clippy pass with no warnings

Checklist / セルフチェックリスト

  • Updated relevant documentation (Wiki, comments, etc.) / 関連するドキュメント(Wikiやコメント)を更新した

Screenshots or Video / スクリーンショット・動画

Notes / 備考

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43db325f56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/adapters/rate_limiter/valkey.rs
Comment thread src/adapters/auth_cache/valkey.rs
@ttatsato ttatsato self-assigned this Apr 27, 2026
@ttatsato ttatsato changed the title change: redis connection pool → mutilpledConnectionへ change: redis connection pool → Conection Managerへ Apr 30, 2026
@ttatsato
Copy link
Copy Markdown
Owner Author

@codex review it

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ttatsato
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant