Repository navigation
Replies: 1 comment 1 reply
|
Hi @acouvreur That sounds cool! For your questions:
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi! I maintain Sablier, which starts workloads (Docker, Swarm, Kubernetes, Podman…) on demand when a request arrives and stops them after a period of inactivity. Issue #564 asks for Zoraxy support, and we'd like to build and maintain an official plugin under the
sablierapporg, the same way we do for Traefik and Caddy.Before we write code, we'd like your advice on a few points so the plugin fits Zoraxy the way you intend plugins to be used.
Proposed architecture
A router plugin using dynamic capture:
SniffResultSkip, so Zoraxy proxies to the upstream as usual.SniffResultAccept.Sablier also has a blocking strategy, where the call waits until the workload is ready (up to a configured timeout) before answering. In that mode, sniff would hold the request for a few seconds and then skip.
Questions
Per-rule configuration. In Traefik and Caddy, each route says which workloads to start (
namesorgroup) and which strategy to use. In Zoraxy, a plugin is attached to rules through tags, and the sniff payload only carries the request. What is the recommended way for a plugin to get per-proxy-rule settings?UIPath) mapping hostnames to Sablier settings, stored by the plugin.DynamicSniffForwardRequest. We're happy to contribute a PR if you'd accept that.Long-running sniff. Is it OK for the sniff endpoint to block for several seconds with the blocking strategy? Today the core's HTTP client for sniff has no timeout. Is that intentional and something we can rely on, or might it change? Since dynamic handlers are tried one after another, would a slow sniff affect other plugins on the same rule?
Sharing state between sniff and ingress. Can we rely on
X-Zoraxy-RequestIDbeing the same on the sniff call and the ingress call? We'd use it to reuse the Sablier response from sniff instead of calling Sablier twice.Distribution. What's the process for getting a third-party plugin into the plugin store, and which OS and architecture builds do you expect?
Thanks for building the plugin system. The sniff/skip model maps onto Sablier really nicely!
All reactions