Overview
Nginx Ingress is approaching end-of-life. Alibaba Cloud API Gateway unifies traffic, microservices, and security gateway capabilities, providing a smooth migration path for Nginx Ingress users.
API Gateway supports two configuration modes:
-
Ingress mode: The gateway acts as an APIG Ingress Controller, compatible with Kubernetes Ingress resources and annotations supported by APIG Ingress. Ideal for teams using Kubernetes-native workflows such as GitOps.
-
API management mode: Configure the gateway through the Alibaba Cloud console or OpenAPI. Provides full API lifecycle management, advanced security policies, and API operations. Ideal for centralized governance and fine-grained control.
This document compares both modes to help you choose the right approach.
Mode 1: Ingress mode
API Gateway acts as a Kubernetes Ingress Controller, managing north-south traffic.
Core advantages
-
Smooth migration: Easily migrate self-managed Nginx Ingress to API Gateway with minimal cost and business disruption.
-
Kubernetes-native workflows: Fully compatible with Kubernetes Ingress resources and annotations. Continue using GitOps and
kubectl applyto manage routing rules. -
Enhanced capabilities: Beyond Nginx Ingress compatibility, offers governance features such as global rate limiting.
Use cases
Migrating existing Nginx Ingress workloads. Kubernetes-centric teams using GitOps for application releases. Teams that need quick cluster traffic routing and basic governance.
Features
APIG Ingress Controller capabilities are documented in Annotations supported by APIG Ingress and Advanced usage of APIG Ingress.
Nginx Ingress compatibility
APIG Ingress supports most Nginx Ingress annotations (51 annotations, covering over 90% of use cases), so you can migrate existing Kubernetes Ingress YAML files with minimal changes.
Examples of key compatible annotations:
|
Feature category |
Compatible Nginx annotations |
|
Routing and rewriting |
rewrite-target use-regex upstream-vhost |
|
Traffic splitting |
canary canary-by-header canary-weight |
|
Security and CORS |
enable-cors cors-allow-methods ssl-redirect force-ssl-redirect |
|
Timeout and retry |
proxy-next-upstream proxy-next-upstream-tries |
|
IP access control |
whitelist-source-range |
Enhanced capabilities
API Gateway adds advanced features through higress.ingress.kubernetes.io/ annotations, unavailable in Nginx Ingress.
Traffic warm-up
Nginx: Not supported.
APIG Ingress: The higress.ingress.kubernetes.io/warmup annotation gradually increases traffic to new nodes over a specified warm-up window.
Global rate limiting
Nginx: The nginx.ingress.kubernetes.io/limit-rps annotation provides only per-pod rate limiting. The total limit scales with pod count, making precise control difficult.
APIG Ingress: The higress.ingress.kubernetes.io/rate-limit annotation provides global rate limiting across all gateway instances for precise QPS control.
Global concurrency control
Nginx: No built-in global concurrency control.
APIG Ingress: The higress.ingress.kubernetes.io/concurrency-limit annotation sets a global concurrency limit to protect backend services from traffic spikes.
Traffic mirroring
Nginx: No native traffic mirroring; requires custom Lua scripts.
APIG Ingress: The higress.ingress.kubernetes.io/mirror-target-service annotation mirrors traffic to a test service for shadow testing in production.
Mode 2: API management mode
API Gateway functions as a centralized API management platform. Define and manage APIs through the Alibaba Cloud console, API, or Terraform for comprehensive API governance beyond simple routing.
Core advantages
Centralized governance: Manage all APIs from a unified view, enforcing security, compliance, and traffic policies across teams.
Full lifecycle management: Covers the full API lifecycle — design, development, testing, publishing, and retirement — with version control, release auditing, and one-click rollback.
Advanced security: Natively supports OIDC, JWT, and custom authentication and authorization.
API operations: Supports consumer management, subscriptions, and call quotas.
Use cases
Enterprises requiring centralized API governance. Businesses with strict API authentication requirements. Teams managing API versions, canary releases, and audits. Organizations building open platforms with third-party developer management.
Features
API lifecycle management
Manage APIs through their full lifecycle: design, development, testing, publishing, and retirement.
-
Version management: Run multiple concurrent API versions (such as v1 and v2) and manage their publication status.
-
Publishing and rollback: Maintain a publish history and roll back to any previous version with one click.
Enterprise-grade security
Offload complex authentication logic from backend services with enterprise-grade security.
-
Authentication and authorization: Natively supports JWT, OIDC, and Alibaba Cloud IDaaS integration.
-
Defense-in-depth: Integrates with WAF and supports mTLS, IP allowlists/blocklists, and custom security plugins.
Extensibility
-
Plugin marketplace: Official plugins for authentication, security, and traffic management, plus custom plugin uploads.
-
Hot updates: Update plugins and configurations without restarting instances.
API operations and multi-source service discovery
-
API ecosystem: Manage API call quotas and subscription rules through consumer management.
-
Multi-source discovery: Discover services from Kubernetes, Nacos, Function Compute, and static IP addresses or domain names.
Mode comparison
|
Dimension |
Ingress mode |
API management mode |
|
Core purpose |
Kubernetes Ingress Controller for traffic routing |
Unified API management platform |
|
Configuration method |
Kubernetes YAML |
Alibaba Cloud console / API / Terraform |
|
Management workflow |
GitOps / |
UI/API-driven |
|
Nginx migration |
Offers a one-click migration tool. |
Requires redefining APIs and configuring policies. |
|
API lifecycle |
None. Tied to the Kubernetes resource lifecycle. |
Complete. Supports design, development, testing, publishing, versioning, and retirement. |
|
Extensibility |
Limited. Restricted to supported annotations. |
High. Rich plugin marketplace and custom plugin hot updates. |
|
Service discovery |
Kubernetes-native. Automatically discovers Kubernetes Services. |
Multi-source. Supports Kubernetes (ACK), Nacos, Function Compute (FC), static addresses, and more. |
|
API operations |
None |
Complete. Supports consumer management, subscriptions, and quota management. |
Migration paths
Scenario 1: Smooth migration
When to use: You prioritize migration speed and want to keep existing Kubernetes workflows.
Recommended: Ingress mode.
Procedure:
-
Use the official migration tool to migrate self-managed Nginx Ingress to API Gateway.
-
Review the migration report and address any incompatible annotations. If you need assistance, submit a ticket.
-
(Optional) Replace the original configuration with
higress.ingress.kubernetes.io/annotations to enable advanced features like global rate limiting.
The official alibabacloud-nginx-ingress-to-api-gateway Skill can batch-analyze Ingress compatibility, auto-generate Wasm plugin alternatives for incompatible annotations, and produce a complete operation manual.
Scenario 2: New business architecture
When to use: You are building a new API platform or have strict security and governance requirements.
Recommended: API management mode.
Procedure:
-
Define APIs and configure security policies (OIDC/JWT) and rate limiting in the console.
-
Point the API backend to an ACK cluster Service or another service source using the gateway's service discovery.
Scenario 3: Progressive evolution
When to use: You need to migrate existing services while gradually improving governance. Recommended for most organizations.
Recommended: Start with Ingress mode, then evolve to API management mode.
Procedure:
-
Migrate: Use Ingress mode to migrate all Nginx Ingress instances, resolving the end-of-life issue.
-
Govern: Identify core APIs — external-facing, high-security, or those requiring fine-grained management.
-
Evolve: Transition core APIs to API management mode. Configure JWT authentication, WAF protection, and consumer quotas in the console while non-core APIs remain in Ingress mode.
Routing priority
For routes with the same domain and path, console-created APIs take priority over Ingress-synced routes. Migrate routes individually — if issues arise, delete the console configuration to revert to the Ingress route instantly.
Routing priority applies per route, not per domain. You can migrate paths individually under the same domain — some paths use the console configuration while others continue using Ingress. Avoid migrating an entire domain at once.
Example:
Scenario: You have a domain example.com and need to progressively migrate it from an Ingress configuration to a console configuration.
1. Initial state (Ingress configuration only)
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
spec:
rules:
- host: example.com
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: api-service-v1
port:
number: 8080
- path: /web
pathType: Prefix
backend:
service:
name: web-service-v1
port:
number: 80
API Gateway generates these routes:
-
/api → api-service-v1:8080
-
/web → web-service-v1:80
2. Mid-migration (configure the /api path in the console)
Create a console route for example.com directing /api to api-service-v2:8080.
Merged routing order:
1. /api → api-service-v2:8080 (Console configuration, matched first)
2. /api → api-service-v1:8080 (Ingress configuration, not matched)
3. /web → web-service-v1:80 (Ingress configuration, effective)
Result:
-
Requests to
example.com/api/*are routed toapi-service-v2(console configuration takes effect). -
Requests to
example.com/web/*are routed toweb-service-v1(Ingress configuration takes effect).
3. Find an issue and perform a quick rollback
If an issue occurs with api-service-v2, simply delete the/api route configuration in the console.
Routing order after deletion:
1. /api → api-service-v1:8080 (Ingress configuration, immediately restored)
2. /web → web-service-v1:80 (Ingress configuration)
Result: Traffic immediately reverts to api-service-v1 from the Ingress configuration, with no Ingress changes or service restarts.
4. Complete migration (configure all paths in the console)
After configuring the /web path in the console:
1. /api → api-service-v2:8080 (Console configuration)
2. /web → web-service-v2:80 (Console configuration)
3. /api → api-service-v1:8080 (Ingress configuration, not matched)
4. /web → web-service-v1:80 (Ingress configuration, not matched)
All traffic now uses the console configuration. You can safely delete the Ingress configuration.