Open Sourced API Gateway
Apache APISIX is full featured yet fully open sourced. It is built on top of OpenResty, which in turn is built on top of Nginx.
Minimum free features required by Team Compute:
- OIDC for browser access
- Token for API access
- Call out to external APIs
1. References
APISIX Alternatives:
2. Phases
Apache APISIX, built on OpenResty (which in turn builds on Nginx), leverages a phase-based execution model for handling HTTP requests and executing plugins. These phases define distinct stages in the request lifecycle where specific actions or plugin logic can be applied. The primary APISIX phases are:
rewrite
This phase is typically used for request URI manipulation, such as rewriting paths, adding or modifying request headers, or performing redirects. Plugins in this phase can alter the request before it reaches the upstream service.
access
This phase is dedicated to access control and authentication. Plugins here can verify client credentials, enforce rate limits, or perform other authorization checks to determine if the request should be allowed to proceed to the upstream.
before_proxy
This phase is executed just before the request is proxied to the upstream server. It allows for final modifications to the request or for performing actions that need to happen immediately before the proxying action.
header_filter
This phase is executed after the upstream server responds but before the response headers are sent back to the client. Plugins in this phase can modify or add response headers.
body_filter
This phase is executed after the upstream server responds and allows for modification of the response body before it is sent back to the client. This is useful for tasks like compression or data transformation.
log
This final phase is used for logging and observability. Plugins here can record request and response details, send logs to external systems, or perform other post-processing tasks that do not affect the response content.
Plugins are executed within these phases, and their execution order within a specific phase can be further managed by defining a priority value in the plugin's metadata. Plugins with higher priority values are executed first within the same phase. The order of the phases themselves is fixed and follows the sequence described above.
Priorities
Within each phase above, the plugins are ran in sequence according to their "Priority".