Performance
Troubleshoot CPU, memory, latency, and throughput issues in Apache APISIX.
Performance problems in APISIX usually come from the gateway itself, the upstream service, the network, or the etcd synchronization layer. Use this page to isolate the bottleneck.
High CPU or memory
Symptoms
- APISIX process CPU or RSS climbs continuously.
- Latency increases as load increases.
Likely causes
- Misconfigured or expensive plugin logic.
- Too many routes or consumers for the node size.
- High cardinality in metrics or labels.
- Memory leak in a custom plugin.
Checks
[TODO] Add commands to profile CPU and memory, list hot Lua functions, and check route/consumer counts.
Resolution
[TODO] Add steps to disable heavy plugins, scale horizontally, and review custom plugin code.
Verification
[TODO] Add a load test command and a metric to verify CPU/RSS returns to baseline.
Escalation data
perforgperftoolsoutput- Number of routes, services, consumers, and plugins
- Flame graph, if available
High latency or low throughput
Symptoms
- p99 latency is higher than expected.
- Throughput does not scale with upstream capacity.
Likely causes
- Upstream is slow or timing out.
- Network latency between APISIX and upstream.
- Insufficient worker connections.
- Plugin chain adds per-request overhead.
Checks
[TODO] Add commands to measure per-hop latency, active connections, and plugin phase timing.
Resolution
[TODO] Add steps to tune worker connections, adjust timeouts, and reduce plugin overhead.
Verification
[TODO] Add a load test with baseline and target latency.
Escalation data
- APISIX access log latency fields
- Upstream latency from inside and outside the gateway
- Worker connection and request counts