Frequently Asked Questions
This document covers common technical questions and answers about using Apache APISIX.
Basic Questions
What is Apache APISIX?
Apache APISIX is a top-level project under the Apache Software Foundation. It is a cloud-native API gateway known for its dynamic, real-time, and high-performance characteristics, providing dynamic routing, dynamic upstreams, dynamic certificates, A/B testing, gray release, rate limiting, attack protection, monitoring, and alerts.
What's the difference between APISIX and Nginx?
Nginx is a traditional web server and reverse proxy, while APISIX is an API gateway built on Nginx. APISIX adds fully dynamic configuration management, a rich plugin system, fine-grained traffic control, and built-in observability features on top of Nginx.
How is APISIX's performance?
APISIX inherits Nginx's high-performance characteristics while maintaining efficient processing through optimizations and the plugin mechanism. Actual performance depends on hardware configuration and business complexity, typically handling tens of thousands to hundreds of thousands of requests per second.
Installation Issues
What to do if Docker fails to start?
- Check if Docker is running:
docker ps - View container logs:
docker-compose logs apisix - Common issues:
- Port conflicts: Check if ports 9080, 9180, 9443 are in use
- etcd connection failure: Confirm etcd container is running
- Permission issues: Ensure you have sufficient permissions to run Docker
How to check APISIX version?
curl "http://127.0.0.1:9080" --head | grep Server
Returns: Server: APISIX/Version
Cannot access Dashboard after installation?
- Confirm Dashboard port mapping (default 9180)
- Check firewall settings
- Confirm container network configuration
Configuration Issues
How to modify Admin API port?
Edit apisix.yml:
deployment:
admin:
listen:
host: 0.0.0.0
port: 9180
How to enable HTTPS?
- Configure SSL certificate:
curl -i "http://127.0.0.1:9180/apisix/admin/ssl" -X PUT -d '
{
"cert": "certificate content",
"key": "private key content",
"snis": ["example.com"]
}'
- Enable HTTPS in route:
{
"plugins": {
"proxy-rewrite": {
"scheme": "https"
}
}
}
Route configuration not taking effect?
- Check if route configuration is correct
- Confirm etcd synchronization
- Check for plugin syntax errors
- Check APISIX error logs
How to implement CORS?
Use the cors plugin:
{
"plugins": {
"cors": {
"allow_origins": "*",
"allow_methods": "GET,POST,PUT,DELETE",
"allow_headers": "*"
}
}
}
Performance Issues
How to improve throughput?
- Increase worker processes:
apisix.worker_processes: auto - Enable HTTP/2: Set
http2: truein listen configuration - Optimize upstream connection pool: Configure
keepalive_pool.size - Use cache plugin: Enable
proxy-cacheplugin
High memory usage?
- Reduce unnecessary plugin loading
- Limit upstream connections
- Adjust log buffer size
- Use streaming for large files
Feature Questions
How to implement A/B testing?
Use the traffic-split plugin:
{
"plugins": {
"traffic-split": {
"rules": [
{
"weight": 30
},
{
"weight": 70,
"upstream_id": "upstream-v2"
}
]
}
}
}
How to implement rate limiting?
Use the limit-req plugin:
{
"plugins": {
"limit-req": {
"rate": 100,
"burst": 50,
"key": "remote_addr"
}
}
}
Integration Questions
How to integrate with Kubernetes?
Use APISIX Ingress Controller:
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: example-route
spec:
http:
- name: example
match:
paths:
- /api/*
methods:
- GET
backends:
- serviceName: example-service
servicePort: 8080
How to integrate with Prometheus?
- Enable Prometheus plugin
- Configure Prometheus scrape config
Security Questions
How to prevent APISIX abuse?
- Enable authentication: Enable key-auth or other auth plugins on all routes
- Restrict Admin API access: Only allow trusted IPs to access Admin API
- Use HTTPS: Enable TLS encryption
- Configure rate limiting: Prevent malicious requests
- Enable access logging: Log all requests for auditing
How to enable Admin API authorization?
deployment:
admin:
admin_key_required: true
Operations Questions
How to upgrade APISIX?
Docker:
docker-compose pull
docker-compose up -d
Kubernetes:
helm upgrade apisix apisix/apisix
Common Error Codes
- 401 Unauthorized: Authentication failed
- 403 Forbidden: No access permission
- 404 Not Found: Route does not exist
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Upstream service error
- 502 Bad Gateway: Upstream service unavailable
- 503 Service Unavailable: Service unavailable
More Help
- Official Docs: https://apisix.apache.org/docs/apisix/
- GitHub: https://github.com/apache/apisix
- Community Forum: https://github.com/apache/apisix/discussions
