a6-recipe-multi-tenant

Automate multi-tenant APISIX gateway patterns with the a6 CLI.

1|2|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/api7/a6 --skill a6-recipe-multi-tenant-api7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: a6-recipe-multi-tenant
Source: https://github.com/api7/a6/tree/main/skills/a6-recipe-multi-tenant
Command: npx skills add https://github.com/api7/a6 --skill a6-recipe-multi-tenant-api7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This recipe enables consistent, auditable multi-tenant gateway patterns by orchestrating APISIX configuration with the a6 CLI. It covers tenant isolation using consumer groups, tenant-aware routing, per-tenant rate limiting, context forwarding via proxy-rewrite, and declarative config management.

Core Features & Use Cases

  • Tenant isolation through consumer groups and per-tenant rate limits.
  • Host-based, path-based, and header-based routing to dedicated upstreams per tenant.
  • Declarative tenant configuration via a6 config sync and export workflows.

Quick Start

Define tenants using the provided a6 commands and apply the configuration with a6 config sync.

Frequently Asked Questions about a6-recipe-multi-tenant

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate API traffic and rate limits for different tenants in APISIX?

Tenant isolation in APISIX uses consumer groups to apply per-tenant rate limits and dedicated upstreams. This pattern ensures isolated quotas and routing for each tenant while maintaining consistent, auditable gateway configuration.

What is the best way to manage per-tenant routing rules in an API gateway declaratively?

Managing per-tenant routing declaratively involves using a6 config sync to apply host-based, path-based, and header-based rules to dedicated upstreams. This ensures tenant-aware configuration is consistently maintained across your gateway.

How do I configure multiple tenants with isolated quotas using the a6 CLI?

Configuring multiple tenants with isolated quotas using the a6 CLI involves defining tenant configurations and applying them via a6 config sync. This automates consumer group creation and applies per-tenant rate limiting and routing.

Does APISIX support forwarding tenant context to upstream services via proxy-rewrite?

Yes, APISIX supports forwarding tenant context to upstream services via proxy-rewrite. This recipe integrates proxy-rewrite within its multi-tenant patterns to ensure dedicated upstreams receive the correct tenant headers.

When do I need declarative config sync for multi-tenant API gateway patterns?

Declarative config sync is needed for multi-tenant API gateway patterns when managing multiple tenants requiring isolated quotas and routing. It ensures consistent, auditable state across consumer groups and upstreams via a6 export workflows.

What are the limitations of using consumer groups for multitenancy in APISIX?

Using consumer groups for multitenancy in APISIX requires careful configuration for complex header-based routing and upstream management. Declarative a6 config sync helps mitigate these limitations by ensuring consistent, auditable configuration state.