Skip to content

Extension use cases and recipes ​

Concrete recipes that map real problems to the right extension surface: proxy-wasm plugins, nano-services, or extension traits. Each recipe page states the problem, why the built-ins do not fit, the options with tradeoffs, a complete implementation with its configuration, operational notes, and how to test it. Plugin code samples use only hostcalls from the supported set.

Every recipe on these pages works in the current build. Where a recipe requires an embedding build (a binary you compile that links dwara-core as a library), the page says so.

Recipes ​

RecipeSurfaceThe problem it solves
User-subset migration to a new API versionproxy-wasm plugin, request_headersOnly a subset of users (entitlements owned elsewhere) should be forwarded to the new endpoint
Response PII redaction at the edgeproxy-wasm plugin, response_bodyAn upstream leaks card numbers or tokens into response bodies
Custom request authenticationproxy-wasm plugin, request_headersA proprietary token scheme — not JWT, not API keys — must be verified per request
Zero-upstream feature flagsnano-serviceAn endpoint too dynamic for a respond action, too small for a service
Tenant-aware routing and taggingproxy-wasm plugin, two phasesTenant identity lives in a grammar static match criteria cannot express
Your own rate limiting, config, cache, analytics, or secrets backendextension traits (embedding)Decisions or state must live in your infrastructure
Per-request external decisionsproxy-wasm plugin with HTTP calloutsThe verdict genuinely must be computed per request by an external service

The first recipe is the deepest walkthrough: it contrasts a config-snapshot plugin with a per-request callout, which is the central design decision behind most of the others.

Runnable demos ​

Every recipe has a runnable demo in demos/13-extensibility-usecases/: one directory per recipe, each with a test.sh that builds what it needs (plugin, module, gateway) and asserts the documented behavior end to end against purpose-built mock services. The category README covers prerequisites, the port map, and running all seven in order.

Where to start ​