Voltar ao ranking

apache/apisix

Luaapisix.apache.org/blog/

The Cloud-Native API Gateway and AI Gateway

cloud-nativenginxapi-managementluajitapi-gatewaymicroservicesapisixapiloadbalancingreverse-proxyserverlessiot
Crescimento de estrelas
Estrelas
16.9k
Forks
2.9k
Crescimento semanal
Issues
142
5k10k15k
jun. de 2019out. de 2021mar. de 2024jul. de 2026
README

Apache APISIX API Gateway | AI Gateway

APISIX logo

Build Status License GitHub release GitHub stars Docker Pulls Commit activity GitHub issues Slack

Apache APISIX is a dynamic, real-time, high-performance API Gateway.

APISIX API Gateway provides rich traffic management features such as load balancing, dynamic upstream, canary release, circuit breaking, authentication, observability, and more. You can use it to handle traditional north-south traffic, as well as east-west traffic between services. It can also be used as a Kubernetes ingress controller.

Table of Contents

Why APISIX

APISIX is built on top of NGINX and etcd. Compared with traditional API gateways, APISIX has dynamic routing and hot-loading of plugins, which is especially suitable for API management under a microservice architecture.

The technical architecture of Apache APISIX:

Technical architecture of Apache APISIX

AI Gateway

APISIX can serve as an AI Gateway through its flexible plugin system, providing:

  • AI proxying to route traffic to different LLM providers through a unified interface.
  • Load balancing, retries, and fallbacks across multiple LLMs to ensure the efficiency and reliability of AI agents.
  • Token-based rate limiting to control cost and protect upstream models.
  • Robust security for authentication, authorization, and traffic control on AI workloads.

APISIX also provides the mcp-bridge plugin to seamlessly convert stdio-based MCP servers to scalable HTTP SSE services.

Get Started

Install and run APISIX with a single command using the quickstart script (requires Docker):

curl -sL https://run.api7.ai/apisix/quickstart | sh

This starts APISIX (listening on port 9080) together with its etcd configuration store. Verify it is running:

curl "http://127.0.0.1:9080" --head | grep Server

Create your first route via the Admin API (port 9180) to proxy requests to an upstream service:

curl -i "http://127.0.0.1:9180/apisix/admin/routes/1" -X PUT -d '
{
  "uri": "/get",
  "upstream": {
    "type": "roundrobin",
    "nodes": {
      "httpbin.org:80": 1
    }
  }
}'

Send a request through APISIX to confirm the route works:

curl "http://127.0.0.1:9080/get"

To learn more, follow the Getting Started guide and the installation documentation for other deployment methods. To extend APISIX, see the plugin development guide, the plugin concept, and the REST Admin API reference.

For more documents, please refer to the Apache APISIX Documentation site.

Features

You can use APISIX API Gateway as a traffic entrance to process all business data, including dynamic routing, dynamic upstream, dynamic certificates, A/B testing, canary release, blue-green deployment, limit rate, defense against malicious attacks, metrics, monitoring alarms, service observability, service governance, etc.

  • All platforms

    • Cloud-Native: Platform agnostic, No vendor lock-in, APISIX API Gateway can run from bare-metal to Kubernetes.
    • Supports ARM64: Don't worry about the lock-in of the infra technology.
  • Multi protocols

  • Full Dynamic

    • Hot Updates And Hot Plugins: Continuously updates its configurations and plugins without restarts!
    • Proxy Rewrite: Support rewrite the host, uri, schema, method, headers of the request before send to upstream.
    • Response Rewrite: Set customized response status code, body and header to the client.
    • Dynamic Load Balancing: Round-robin load balancing with weight.
    • Hash-based Load Balancing: Load balance with consistent hashing sessions.
    • Health Checks: Enable health check on the upstream node and will automatically filter unhealthy nodes during load balancing to ensure system stability.
    • Circuit-Breaker: Intelligent tracking of unhealthy upstream services.
    • Proxy Mirror: Provides the ability to mirror client requests.
    • Traffic Split: Allows users to incrementally direct percentages of traffic between various upstreams.
  • Fine-grained routing

  • Security

  • OPS friendly

    • Zipkin tracing: Zipkin
    • Open source APM: support Apache SkyWalking
    • Works with external service discovery: In addition to the built-in etcd, it also supports Consul, Consul_kv, Nacos, Eureka and Zookeeper (CP).
    • Monitoring And Metrics: Prometheus
    • Clustering: APISIX nodes are stateless, creates clustering of the configuration center, please refer to etcd Clustering Guide.
    • High availability: Support to configure multiple etcd addresses in the same cluster.
    • Dashboard
    • Version Control: Supports rollbacks of operations.
    • CLI: start\stop\reload APISIX through the command line.
    • Standalone: Supports to load route rules from local YAML file, it is more friendly such as under the kubernetes(k8s).
    • Global Rule: Allows to run any plugin for all request, eg: limit rate, IP filter etc.
    • High performance: The single-core QPS reaches 18k with an average delay of fewer than 0.2 milliseconds.
    • Fault Injection
    • REST Admin API: Using the REST Admin API to control Apache APISIX, which only allows 127.0.0.1 access by default, you can modify the allow_admin field in conf/config.yaml to specify a list of IPs that are allowed to call the Admin API. Also, note that the Admin API uses key auth to verify the identity of the caller.
    • External Loggers: Export access logs to external log management tools. (HTTP Logger, TCP Logger, Kafka Logger, UDP Logger, RocketMQ Logger, SkyWalking Logger, Alibaba Cloud Logging(SLS), Google Cloud Logging, Splunk HEC Logging, File Logger, SolarWinds Loggly Logging, TencentCloud CLS).
    • ClickHouse: push logs to ClickHouse.
    • Elasticsearch: push logs to Elasticsearch.
    • Datadog: push custom metrics to the DogStatsD server, comes bundled with Datadog agent, over the UDP protocol. DogStatsD basically is an implementation of StatsD protocol which collects the custom metrics for Apache APISIX agent, aggregates it into a single data point and sends it to the configured Datadog server.
    • Helm charts
    • HashiCorp Vault: Support secret management solution for accessing secrets from Vault secure storage backed in a low trust environment. Currently, RS256 keys (public-private key pairs) or secret keys can be linked from vault in jwt-auth authentication plugin using APISIX Secret resource.
  • Highly scalable

  • Multi-Language support

    • Apache APISIX is a multi-language gateway for plugin development and provides support via RPC and Wasm. Multi Language Support into Apache APISIX
    • The RPC way, is the current way. Developers can choose the language according to their needs and after starting an independent process with the RPC, it exchanges data with APISIX through local RPC communication. Till this moment, APISIX has support for Java, Golang, Python and Node.js.
    • The Wasm or WebAssembly, is an experimental way. APISIX can load and run Wasm bytecode via APISIX wasm plugin written with the Proxy Wasm SDK. Developers only need to write the code according to the SDK and then compile it into a Wasm bytecode that runs on Wasm VM with APISIX.
  • Serverless

    • Lua functions: Invoke functions in each phase in APISIX.
    • AWS Lambda: Integration with AWS Lambda function as a dynamic upstream to proxy all requests for a particular URI to the AWS API gateway endpoint. Supports authorization via api key and AWS IAM access secret.
    • Azure Functions: Seamless integration with Azure Serverless Function as a dynamic upstream to proxy all requests for a particular URI to the Microsoft Azure cloud.
    • Apache OpenWhisk: Seamless integration with Apache OpenWhisk as a dynamic upstream to proxy all requests for a particular URI to your own OpenWhisk cluster.

Benchmark

Using AWS's eight-core server, APISIX's QPS reaches 140,000 with a latency of only 0.2 ms.

Benchmark script has been open sourced, welcome to try and contribute.

APISIX also works perfectly in AWS graviton3 C7g.

Community

User Stories

Who Uses APISIX API Gateway?

A wide variety of companies and organizations use APISIX API Gateway for research, production and commercial product, below are some of them:

  • Airwallex
  • Bilibili
  • CVTE
  • European eFactory Platform
  • European Copernicus Reference System
  • Geely
  • HONOR
  • Horizon Robotics
  • iQIYI
  • Lenovo
  • NASA JPL
  • Nayuki
  • OPPO
  • QingCloud
  • Swisscom
  • Tencent Game
  • Travelsky
  • vivo
  • Sina Weibo
  • WeCity
  • WPS
  • XPENG
  • Zoom

Logos

Acknowledgments

Inspired by Kong and Orange.

License

Apache 2.0 License

Repositórios relacionados
ClickHouse/ClickHouse

ClickHouse® is a real-time analytics database management system

C++Apache License 2.0dbmsolap
clickhouse.com
48.8k8.7k
milvus-io/milvus

Milvus is a high-performance, cloud-native vector database built for scalable vector ANN search

GoGo ModulesApache License 2.0annsnearest-neighbor-search
milvus.io
45.3k4.1k
Kong/kong

🦍 The API and AI Gateway

LuaApache License 2.0api-gatewaymicroservices
konghq.com/install/
43.8k5.2k
pingcap/tidb

TiDB is built for agentic workloads that grow unpredictably, with ACID guarantees and native support for transactions, analytics, and vector search. No data silos. No noisy neighbors. No infrastructure ceiling.

GoGo ModulesApache License 2.0distributed-databasedistributed-transactions
tidb.io
40.3k6.2k
zeromicro/go-zero

A cloud-native Go microservices framework with cli tool for productivity.

GoGo ModulesMIT Licensegolangmicroservice
go-zero.dev
33.2k4.3k
rustfs/rustfs

🚀2.3x faster than MinIO for 4KB object payloads. RustFS is an open-source, S3-compatible high-performance object storage system supporting migration and coexistence with other S3-compatible platforms such as MinIO and Ceph.

Rustcrates.ioApache License 2.0bigdatacloud-native
rustfs.com/download/
30k1.3k
alibaba/spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.

JavaMavenApache License 2.0spring-cloudjava
sca.aliyun.com
29.1k8.5k
goharbor/harbor

An open source trusted cloud native registry project that stores, signs, and scans content.

GoGo ModulesApache License 2.0cncfcontainer
goharbor.io
29k5.3k
go-kratos/kratos

Your ultimate Go microservices framework for the cloud-native era.

GoGo ModulesMIT Licensegolangframework
go-kratos.dev
25.8k4.2k
taosdata/TDengine

High-performance, scalable time-series database designed for Industrial IoT (IIoT) scenarios

CGNU Affero General Public License v3.0iotbigdata
tdengine.com
25k5k
lensapp/lens

Lens - The way the world runs Kubernetes

MIT Licensekuberneteskubernetes-ui
lenshq.io
23.2k1.5k
alibaba/Sentinel

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)

JavaMavenApache License 2.0alibabajava
sentinelguard.io
23.1k8.1k