Skip to content

Example — multi-tenant

Example — multi-tenant

Per-tenant connection-pool isolation and per-tenant cost budgets via the cost-governor plugin.

Source on GitHub: HDB-HeliosDB-Proxy/examples/multi-tenant

Demonstrates

  • Three demo tenants (acme-co, globex, initech) each with their own pool slice
  • Per-tenant CPU / memory / connection budgets enforced at the proxy layer
  • cost-governor WASM plugin rejecting queries that exceed the daily cost budget
  • column-mask WASM plugin redacting PII columns based on the caller’s role

Run

Terminal window
cd HDB-HeliosDB-Proxy/examples/multi-tenant
docker compose up -d
./test-tenants.sh

test-tenants.sh runs queries as each tenant and shows:

  • Acme connecting through its dedicated pool
  • Globex hitting its budget and getting ERROR: cost-governor: daily budget exhausted
  • Initech’s analyst role seeing mask_ssn(ssn) instead of raw SSNs

Plugin configuration

The proxy.toml references the bundled plugins from HDB-HeliosDB-Proxy-Plugins. For the publisher path (sign + push to OCI registry), see the helios-plugin CLI.