feat: As a user, I want a Valkey config_provider for the data-plane role, so that I can run a decoupled data plane without etcd
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
調査の方向性
まず apisix/core/config_yaml.lua と apisix/core/config_xds.lua にある既存の config provider を読み、次に apisix/cli/schema.lua、apisix/cli/file.lua、apisix/cli/ops.lua、apisix/init.lua にある provider の処理を確認します。data-plane の Valkey provider とその設定カバレッジを追加し、t/config-center-valkey/ を作成し、ci/pod/docker-compose.common.yml に Valkey サービスを追加して、.github/workflows/build.yml にテストグループを組み込みます。Valkey-backed の read および watch パスが統合テストに合格すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
As a user running Valkey/Redis-compatible infrastructure, I want to run APISIX data-plane nodes that sync their configuration from Valkey, so that I can operate a decoupled data plane without also running an etcd cluster.
Context
APISIX already supports multiple config_provider options for the data-plane role (etcd, yaml, json, xds). This proposal adds one more — valkey — following the same read-only sync pattern that json and xds established. It is purely additive: etcd remains the default and nothing about the existing providers changes.
Many teams already standardize on Valkey/Redis for their infrastructure (APISIX's own redis-backed plugins are widely used against Valkey today, e.g. #13584, #12282). Letting a data plane sync config from Valkey removes etcd as a hard dependency for those deployments.
Why Valkey can satisfy the config-provider contract
The historical concern with non-etcd config stores (see the FAQ) is the need for resumable watch streams, prefix reads, and atomic updates. Valkey now provides primitives that map cleanly onto these:
- Change notification → Valkey Streams (
XREADGROUPwith consumer groups): resumable, at-least-once delivery from the last processed ID, which is exactly the "watch stream" semantic etcd provides. This is stronger than theyamlprovider's 1s polling. - Prefix / directory reads → one Hash per collection (
{apisix}:routes,{apisix}:services, ...):HGETALLreturns all items in a collection atomically. - Revision tracking → an application-managed counter key (
{apisix}:revision),INCRed on each change, used to synthesize theconf_version/modifiedIndexthatcore.configconsumers rely on. - Hash-tag
{apisix}keeps keys co-located on one shard so the design is Valkey-cluster-safe.
Proposed design (data-plane, read-only)
- New provider module
apisix/core/config_valkey.luaimplementing the existingcore.configread contract (new,get,fetch_created_obj,close,init,init_worker, plusvalues/values_hash/conf_version/clean_handlersandfilter/checker/item_schemahandling) — the same surfaceconfig_yaml.luaandconfig_xds.luasatisfy today. - Connect via the existing
api7-lua-resty-redis-connectordependency (already used by the redis plugins). - Add
"valkey"to the data-planeconfig_providerenum + avalkeyconnection schema (host, port, password, database, tls) inapisix/cli/schema.lua, with the corresponding edits inapisix/cli/file.lua,apisix/cli/ops.lua, and theconfig_ready_checkallowlist inapisix/init.lua. - Config gets written to Valkey by an external process (or a Valkey-backed standalone controller); the data plane only reads and watches. Admin API writes are explicitly out of scope for this issue — this is data-plane sync only, matching how
xdsworks.
Example configuration:
# conf/config.yaml
deployment:
role: data_plane
role_data_plane:
config_provider: valkey
valkey:
host: "valkey.example.com"
port: 6379
password: "secret"
database: 0
tls:
enabled: true
Testing
- New
t/config-center-valkey/directory mirroringt/config-center-yaml/andt/config-center-json/, using--- yaml_configblocks to set the data-plane role +config_provider: valkey. - Add a
valkey/valkeyservice toci/pod/docker-compose.common.ymland wiret/config-center-valkeyinto the corresponding test group in.github/workflows/build.yml.
Scope note
This is deliberately scoped to the data-plane read path — the pattern with clear precedent. Extending the option to the Admin API / control-plane write path is a larger, separate discussion (it would need a write-side storage abstraction, since the Admin API calls core.etcd directly today) and is not part of this proposal.
I'd like to gauge maintainer interest before writing code, per CONTRIBUTING.md. Does this direction sound acceptable, and are there constraints I should account for in the design? I'm happy to implement it. Thank you!
- 主要言語
- Lua
- スター
- 17.3k
- フォーク
- 3k
- 平均マージ
- 4日 16時間
- マージ済み PR(30日)
- 69
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/apisix のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
bug(body-transformer): runtime crash when request or response body is a JSON primitive対応中かも @bhuvan-somisetty が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
bug: openapi-to-mcp appends a second ? to a query-suffixed path template対応中かも @lordcheng10 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 2 日以内に返信
-
ai-proxy forwards client `Transfer-Encoding: chunked` but sends an unchunked body (upstream 400)対応中かも @locker95 が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
As a user, I want the opa plugin to propagate trace context (traceparent) to OPA, so that OPA spans are linked to the APISIX request trace対応中かも @GitNimay が 20 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/apisix#14051 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
teradata-labs/loom#624 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rohit746/pdf-view.nvim#109 ·
メンテナーはふだん 1 日以内に返信
-
bug guide
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信