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
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia leggendo i provider di configurazione esistenti in apisix/core/config_yaml.lua e apisix/core/config_xds.lua, quindi esamina la gestione dei provider in apisix/cli/schema.lua, apisix/cli/file.lua, apisix/cli/ops.lua e apisix/init.lua. Aggiungi il provider Valkey del data plane e la relativa copertura della configurazione, crea t/config-center-valkey/, aggiungi il servizio Valkey in ci/pod/docker-compose.common.yml e collega il gruppo di test in .github/workflows/build.yml; il lavoro è completato quando il percorso di lettura e watch basato su Valkey supera i relativi test di integrazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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!
- Lingua principale
- Lua
- Stelle
- 17.3k
- Fork
- 3k
- Merge medio
- 4g 16h
- PR unite (30g)
- 69
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/apisix
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
bug(body-transformer): runtime crash when request or response body is a JSON primitiveForse già presa @bhuvan-somisetty l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
bug: openapi-to-mcp appends a second ? to a query-suffixed path templateForse già presa @lordcheng10 l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 2 giorni
-
ai-proxy forwards client `Transfer-Encoding: chunked` but sends an unchunked body (upstream 400)Forse già presa @locker95 l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 2 giorni
-
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 traceForse già presa @GitNimay l’ha presa 20 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/apisix#14051 · 3 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/apisix
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
teradata-labs/loom#624 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rohit746/pdf-view.nvim#109 ·
I maintainer di solito rispondono entro 1 giorno
-
bug guide
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno