a6-recipe-multi-tenant

Implement multi-tenant API gateway patterns with Apache APISIX using a6 CLI.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill simplifies the complex task of managing multi-tenant API gateway configurations, ensuring tenant isolation, customized routing, and per-tenant resource allocation.

Core Features & Use Cases

  • Tenant Isolation: Implements multi-tenancy using APISIX Consumer Groups for shared plugin configurations and isolation.
  • Flexible Routing: Supports host-based, path-based, and header-based routing to direct traffic to tenant-specific backends.
  • Resource Management: Enables per-tenant rate limiting and context forwarding to backend services.
  • Declarative Configuration: Manages all tenant configurations declaratively using a6 config sync for streamlined updates.
  • Use Case: A SaaS provider can use this Skill to onboard new customers, each with their own domain, API key, and dedicated rate limits, all managed through a single APISIX instance.

Quick Start

Use the a6-recipe-multi-tenant skill to create a new consumer group named 'tenant-free' with a daily request limit of 100.

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 configure multi-tenant isolation in an APISIX API gateway?

Multi-tenant isolation in APISIX can be configured using Consumer Groups to share plugin configurations and isolate tenants. This approach assigns distinct routing rules and per-tenant rate limits to separate customer traffic within a single instance.

Can I apply different rate limits for each tenant in Apache APISIX?

Yes, per-tenant rate limiting in Apache APISIX is achievable by binding specific limit rules to Consumer Groups. This allows each tenant to have dedicated daily request limits and customized resource allocation managed declaratively.

What is the best way to route traffic to tenant-specific backends based on host and path?

The best way to route traffic to tenant-specific backends is through host-based, path-based, and header-based routing rules. Using proxy-rewrite for context forwarding ensures correct traffic direction while managing multiple tenants.

How do I sync declarative configurations for multiple APISIX tenants?

You can sync declarative configurations for multiple APISIX tenants using the a6 config sync workflow. This process streamlines updates by applying tenant-specific routing and plugin settings declaratively via the a6 CLI.

Does APISIX support onboarding new SaaS customers with dedicated API keys and domains?

Yes, APISIX supports onboarding new SaaS customers with dedicated domains and API keys. By leveraging Consumer Groups and declarative configuration, a single instance can manage isolated environments with customized limits per customer.