mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-02 20:17:35 +08:00
doc: add more steps for install. (#1805)
This commit is contained in:
parent
8494506767
commit
5a38df1ffe
146
README.md
146
README.md
@ -27,17 +27,16 @@
|
||||
- Mail list: Mail to dev-subscribe@apisix.apache.org, follow the reply to subscribe the mail list.
|
||||
- ![Twitter Follow](https://img.shields.io/twitter/follow/ApacheAPISIX?style=social)
|
||||
|
||||
APISIX is a cloud-native microservices API gateway, delivering the ultimate performance, security, open source and scalable platform for all your APIs and microservices.
|
||||
## What's Apache APISIX?
|
||||
Apache APISIX is a dynamic, real-time, high-performance API gateway, based on the Nginx library and etcd.
|
||||
|
||||
APISIX is based on Nginx and etcd. Compared with traditional API gateways, APISIX has dynamic routing and plug-in hot loading, which is especially suitable for API management under micro-service system.
|
||||
APISIX provides rich traffic management features such as load balancing, dynamic upstream, canary release, circuit breaking, authentication, observability, and more.
|
||||
|
||||
## Why APISIX?
|
||||
You can use Apache APISIX to handle traditional north-south traffic,
|
||||
as well as east-west traffic between services.
|
||||
It can also be used as a k8s ingress controller.
|
||||
|
||||
If you are building a website, mobile device or IoT (Internet of Things) application, you may need to use an API gateway to handle interface traffic.
|
||||
|
||||
APISIX is a cloud-based microservices API gateway that handles traditional north-south traffic and handles east-west traffic between services, and can also be used as a k8s ingress controller.
|
||||
|
||||
APISIX provides dynamic load balancing, authentication, rate limiting, other plugins through plugin mechanisms, and supports plugins you develop yourself.
|
||||
The technical architecture of Apache APISIX:
|
||||
|
||||
![](doc/images/apisix.png)
|
||||
|
||||
@ -70,7 +69,6 @@ A/B testing, canary release, blue-green deployment, limit rate, defense against
|
||||
- Hash-based Load Balancing: Load balance with consistent hashing sessions.
|
||||
- [Health Checks](doc/health-check.md): 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.
|
||||
- [Dynamic service discovery](doc/discovery.md):Support service discovery based on registry, reduce the reverse proxy maintenance costs.
|
||||
|
||||
- **Fine-grained routing**
|
||||
- [Supports full path matching and prefix matching](doc/router-radixtree.md#how-to-use-libradixtree-in-apisix)
|
||||
@ -78,7 +76,7 @@ A/B testing, canary release, blue-green deployment, limit rate, defense against
|
||||
- Support [various operators as judgment conditions for routing](https://github.com/iresty/lua-resty-radixtree#operator-list), for example `{"arg_age", ">", 24}`
|
||||
- Support [custom route matching function](https://github.com/iresty/lua-resty-radixtree/blob/master/t/filter-fun.t#L10)
|
||||
- IPv6: Use IPv6 to match route.
|
||||
- Support [TTL](doc/zh-cn/admin-api.md#route)
|
||||
- Support [TTL](doc/admin-api.md#route)
|
||||
- [Support priority](doc/router-radixtree.md#3-match-priority)
|
||||
- [Support Batch Http Requests](doc/plugins/batch-requests.md)
|
||||
|
||||
@ -95,6 +93,7 @@ A/B testing, canary release, blue-green deployment, limit rate, defense against
|
||||
|
||||
- **OPS friendly**
|
||||
- OpenTracing: support [Apache Skywalking](doc/plugins/skywalking.md) and [Zipkin](doc/plugins/zipkin.md)
|
||||
- works with external service discovery:In addition to the built-in etcd, it also supports `Consul` and `Nacos` [DNS discovery mode](https://github.com/apache/incubator-apisix/issues/1731#issuecomment-646392129), and [Eureka](doc/discovery.md)
|
||||
- Monitoring And Metrics: [Prometheus](doc/plugins/prometheus.md)
|
||||
- Clustering: APISIX nodes are stateless, creates clustering of the configuration center, please refer to [etcd Clustering Guide](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/clustering.md).
|
||||
- High availability: support to configure multiple etcd addresses in the same cluster.
|
||||
@ -113,60 +112,103 @@ A/B testing, canary release, blue-green deployment, limit rate, defense against
|
||||
- Custom load balancing algorithms: You can use custom load balancing algorithms during the `balancer` phase.
|
||||
- Custom routing: Support users to implement routing algorithms themselves.
|
||||
|
||||
## Installation
|
||||
## Configure and Installation
|
||||
|
||||
APISIX Installed and tested in the following systems(OpenResty MUST >= 1.15.8.1, or Tengine >= 2.3.2):
|
||||
APISIX Installed and tested in the following systems:
|
||||
|
||||
CentOS 7, Ubuntu 16.04, Ubuntu 18.04, Debian 9, Debian 10, macOS, **ARM64** Ubuntu 18.04
|
||||
|
||||
Steps to install APISIX:
|
||||
1. Installation runtime dependencies: Nginx and etcd, refer to [documentation](doc/install-dependencies.md)
|
||||
2. There are several ways to install Apache APISIX:
|
||||
- [Source Release](doc/how-to-build.md#installation-via-source-release)
|
||||
- [RPM package](doc/how-to-build.md#installation-via-rpm-package-centos-7) for CentOS 7
|
||||
- [Luarocks](doc/how-to-build.md#installation-via-luarocks-macos-not-supported)
|
||||
- [Docker](https://github.com/apache/incubator-apisix-docker)
|
||||
There are several ways to install the Apache Release version of APISIX:
|
||||
1. Source code compilation (applicable to all systems)
|
||||
- Installation runtime dependencies: OpenResty and etcd, and compilation dependencies: luarocks. Refer to [install dependencies documentation](doc/install-dependencies.md)
|
||||
- Download the latest source code release package:
|
||||
```shell
|
||||
wget http://www.apache.org/dist/incubator/apisix/1.4/apache-apisix-1.4-incubating-src.tar.gz
|
||||
tar zxvf apache-apisix-1.4-incubating-src.tar.gz
|
||||
```
|
||||
- Install the dependencies:
|
||||
```shell
|
||||
cd apache-apisix-1.4-incubating
|
||||
make deps
|
||||
```
|
||||
- check version of APISIX:
|
||||
```shell
|
||||
./bin/apisix version
|
||||
```
|
||||
- start APISIX (Please make sure that etcd is started and enabled the v2 protocol):
|
||||
```shell
|
||||
./bin/apisix start
|
||||
```
|
||||
2. [Docker image](https://hub.docker.com/r/apache/apisix) (applicable to all systems)
|
||||
|
||||
## Quickstart
|
||||
By default, the latest Apache release package will be pulled:
|
||||
|
||||
1. start server:
|
||||
```shell
|
||||
docker pull apache/apisix
|
||||
```
|
||||
|
||||
The Docker image does not include `etcd`, you can refer to [docker compose example] (https://github.com/apache/incubator-apisix-docker/tree/master/example) to start a test cluster.
|
||||
|
||||
3. RPM package(only for CentOS 7)
|
||||
- Installation runtime dependencies: OpenResty and etcd, refer to [install dependencies documentation](doc/install-dependencies.md#centos-7)
|
||||
- install APISIX:
|
||||
```shell
|
||||
sudo yum install -y https://github.com/apache/incubator-apisix/releases/download/1.4/apisix-1.4-0.el7.noarch.rpm
|
||||
```
|
||||
- check version of APISIX:
|
||||
```shell
|
||||
apisix version
|
||||
```
|
||||
- start APISIX (Please make sure that etcd is started and enabled the v2 protocol):
|
||||
```shell
|
||||
apisix start
|
||||
```
|
||||
|
||||
**Note**: Apache APISIX does not yet support the v3 protocol of etcd, so you need to enable v2 protocol when starting etcd.
|
||||
We are doing support for etcd v3 protocol.
|
||||
```shell
|
||||
sudo apisix start
|
||||
etcd --enable-v2=true &
|
||||
```
|
||||
|
||||
2. Try the getting started guide
|
||||
## For Developer
|
||||
|
||||
The getting-started guide is a good way to learn the basics of APISIX. Follow the [getting started guide](doc/getting-started.md).
|
||||
1. For developers, you can use the latest master branch to experience more features
|
||||
|
||||
Then you can try more [plugins](doc/README.md#plugins).
|
||||
- build from source code
|
||||
```shell
|
||||
git clone git@github.com:apache/incubator-apisix.git
|
||||
cd incubator-apisix
|
||||
make deps
|
||||
```
|
||||
|
||||
- Docker image
|
||||
```shell
|
||||
git clone https://github.com/apache/incubator-apisix-docker.git
|
||||
cd incubator-apisix-docker
|
||||
sudo docker build -f alpine-dev/Dockerfile .
|
||||
```
|
||||
|
||||
|
||||
2. Getting start
|
||||
|
||||
The getting started guide is a great way to learn the basics of APISIX, just follow the steps in [Getting Started] (doc/getting-started.md).
|
||||
|
||||
Further, you can follow the documentation to try more [plugins] (doc/README.md#Plugins).
|
||||
|
||||
3. Admin API
|
||||
|
||||
Apache APISIX provides [REST Admin API] (doc/admin-api.md) to dynamic control the Apache APISIX cluster.
|
||||
|
||||
4. Plugin development
|
||||
|
||||
You can refer to [plugin development guide] (doc/plugin-develop.md), and [sample plugin `echo`] (doc/plugins/echo.md) documentation and code implementation.
|
||||
|
||||
Please note that Apache APISIX plugins' added, updated, deleted, etc. are hot loaded, without restarting the service.
|
||||
|
||||
For more documents, please refer to [Apache APISIX Document Index] (doc/README.md)
|
||||
|
||||
## Dashboard
|
||||
APISIX has built-in support for Dashboard, as follows:
|
||||
|
||||
1. Please make sure your machine has the latest Node.js(10 or higher), or there will occur build issues.
|
||||
|
||||
2. Download the source codes of dashboard submodule:
|
||||
```
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
3. Install [yarn](https://yarnpkg.com/en/docs/install)
|
||||
|
||||
4. Install dependencies then run build command:
|
||||
```
|
||||
cd dashboard
|
||||
yarn && yarn build:prod
|
||||
```
|
||||
|
||||
5. Integration with APISIX
|
||||
Copy the compiled files under `/dist` directory to the `apisix/dashboard` directory,
|
||||
```
|
||||
cp -r dist/* .
|
||||
```
|
||||
|
||||
open `http://127.0.0.1:9080/apisix/dashboard/` in the browser.
|
||||
Do not need to fill the user name and password, log in directly.
|
||||
APISIX has built-in support for Dashboard,
|
||||
|
||||
The dashboard only allows 127.0.0.1 by default, and you can modify `allow_admin` in `conf/config.yaml` by yourself, to list the list of IPs allowed to access.
|
||||
|
||||
@ -174,6 +216,8 @@ The dashboard only allows 127.0.0.1 by default, and you can modify `allow_admin`
|
||||
|
||||
Using AWS's 8 core server, APISIX's QPS reach to 140,000 with a latency of only 0.2 ms.
|
||||
|
||||
[benckmark script](benchmark/run.sh), [test method and process](https://gist.github.com/membphis/137db97a4bf64d3653aa42f3e016bd01) has been open source, welcome to try and contribute.
|
||||
|
||||
## Document
|
||||
[Document Indexing for Apache APISIX](doc/README.md)
|
||||
|
||||
@ -217,6 +261,8 @@ Using AWS's 8 core server, APISIX's QPS reach to 140,000 with a latency of only
|
||||
| Speed limit for a specified time window | Yes | No |
|
||||
| Support any Nginx variable as routing condition | Yes | No |
|
||||
|
||||
Benchmark comparison test [details data](https://gist.github.com/membphis/137db97a4bf64d3653aa42f3e016bd01)
|
||||
|
||||
## Videos And Articles
|
||||
- [APISIX technology selection, testing and continuous integration](https://medium.com/@ming_wen/apache-apisixs-technology-selection-testing-and-continuous-integration-313221b02542)
|
||||
- [Analysis of Excellent Performance of Apache APISIX Microservices Gateway](https://medium.com/@ming_wen/analysis-of-excellent-performance-of-apache-apisix-microservices-gateway-fc77db4090b5)
|
||||
|
143
README_CN.md
143
README_CN.md
@ -27,20 +27,18 @@
|
||||
- 邮件列表: 发邮件到 dev-subscribe@apisix.apache.org, 然后跟着回复邮件操作即可。
|
||||
- ![Twitter Follow](https://img.shields.io/twitter/follow/ApacheAPISIX?style=social)
|
||||
|
||||
APISIX 是一个云原生、高性能、可扩展的微服务 API 网关。
|
||||
## Apache APISIX 是什么?
|
||||
Apache APISIX 是一个动态、实时、高性能的 API 网关,基于 Nginx 网络库和 etcd 实现,
|
||||
提供负载均衡、动态上游、灰度发布、服务熔断、身份认证、可观测性等丰富的流量管理功能。
|
||||
|
||||
它是基于 Nginx 和 etcd 来实现,和传统 API 网关相比,APISIX 具备动态路由和插件热加载,特别适合微服务体系下的 API 管理。
|
||||
你可以使用 Apache APISIX 来处理传统的南北向流量,以及服务间的东西向流量,
|
||||
也可以当做 k8s ingress controller 来使用。
|
||||
|
||||
## 为什么选择 APISIX?
|
||||
|
||||
如果你正在构建网站、移动设备或 IoT(物联网)的应用,那么你可能需要使用 API 网关来处理接口流量。
|
||||
|
||||
APISIX 是基于云原生的微服务 API 网关,它是所有业务流量的入口,可以处理传统的南北向流量,也可以处理服务间的东西向流量,也可以当做 k8s ingress controller 来使用。
|
||||
|
||||
APISIX 通过插件机制,提供动态负载平衡、身份验证、限流限速等功能,并且支持你自己开发的插件。
|
||||
Apache APISIX 的技术架构如下图所示:
|
||||
|
||||
![](doc/images/apisix.png)
|
||||
|
||||
|
||||
## 功能
|
||||
你可以把 Apache APISIX 当做流量入口,来处理所有的业务数据,包括动态路由、动态上游、动态证书、
|
||||
A/B 测试、金丝雀发布(灰度发布)、蓝绿部署、限流限速、抵御恶意攻击、监控报警、服务可观测性、服务治理等。
|
||||
@ -70,7 +68,6 @@ A/B 测试、金丝雀发布(灰度发布)、蓝绿部署、限流限速、抵
|
||||
- 支持一致性 hash 的负载均衡:动态支持一致性 hash 的负载均衡。
|
||||
- [健康检查](doc/health-check.md):启用上游节点的健康检查,将在负载均衡期间自动过滤不健康的节点,以确保系统稳定性。
|
||||
- 熔断器: 智能跟踪不健康上游服务。
|
||||
- [动态服务发现](doc/zh-cn/discovery.md):支持基于注册中心的服务发现功能,降低反向代理维护成本。
|
||||
|
||||
- **精细化路由**
|
||||
- [支持全路径匹配和前缀匹配](doc/router-radixtree.md#how-to-use-libradixtree-in-apisix)
|
||||
@ -95,6 +92,7 @@ A/B 测试、金丝雀发布(灰度发布)、蓝绿部署、限流限速、抵
|
||||
|
||||
- **运维友好**
|
||||
- OpenTracing 可观测性: 支持 [Apache Skywalking](doc/zh-cn/plugins/skywalking.md) 和 [Zipkin](doc/zh-cn/plugins/zipkin.md)。
|
||||
- 对接外部服务发现:除了内置的 etcd 外,还支持 `Consul` 和 `Nacos` 的 [DNS 发现模式](https://github.com/apache/incubator-apisix/issues/1731#issuecomment-646392129),以及 [Eureka](doc/zh-cn/discovery.md)。
|
||||
- 监控和指标: [Prometheus](doc/zh-cn/plugins/prometheus.md)
|
||||
- 集群:APISIX 节点是无状态的,创建配置中心集群请参考 [etcd Clustering Guide](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/clustering.md)。
|
||||
- 高可用:支持配置同一个集群内的多个 etcd 地址。
|
||||
@ -113,61 +111,104 @@ A/B 测试、金丝雀发布(灰度发布)、蓝绿部署、限流限速、抵
|
||||
- 自定义负载均衡算法:可以在 `balancer` 阶段使用自定义负载均衡算法。
|
||||
- 自定义路由: 支持用户自己实现路由算法。
|
||||
|
||||
## 安装
|
||||
## 编译和安装
|
||||
|
||||
APISIX 在以下操作系统中可顺利安装并做过运行测试,需要注意的是:OpenResty 的版本必须 >= 1.15.8.1:
|
||||
APISIX 在以下操作系统中可顺利安装并做过测试:
|
||||
|
||||
CentOS 7, Ubuntu 16.04, Ubuntu 18.04, Debian 9, Debian 10, macOS, **ARM64** Ubuntu 18.04
|
||||
|
||||
安装 APISIX 的步骤:
|
||||
1. 安装运行时依赖:OpenResty 和 etcd,参考[依赖安装文档](doc/zh-cn/install-dependencies.md)
|
||||
2. 有以下几种方式来安装 Apache APISIX:
|
||||
- 通过[源码包安装](doc/zh-cn/how-to-build.md#通过源码包安装);
|
||||
- 如果你在使用 CentOS 7,可以使用 [RPM 包安装](doc/zh-cn/how-to-build.md#通过-rpm-包安装centos-7);
|
||||
- 其它 Linux 操作系统,可以使用 [Luarocks 安装方式](doc/zh-cn/how-to-build.md#通过-luarocks-安装-不支持-macos);
|
||||
- 你也可以使用 [Docker 镜像](https://github.com/apache/incubator-apisix-docker) 来安装。
|
||||
有以下几种方式来安装 APISIX 的 Apache Release 版本:
|
||||
1. 源码编译(适用所有系统)
|
||||
- 安装运行时依赖:OpenResty 和 etcd,以及编译的依赖:luarocks。参考[依赖安装文档](doc/zh-cn/install-dependencies.md)
|
||||
- 下载最新的源码发布包:
|
||||
```shell
|
||||
wget http://www.apache.org/dist/incubator/apisix/1.4/apache-apisix-1.4-incubating-src.tar.gz
|
||||
tar zxvf apache-apisix-1.4-incubating-src.tar.gz
|
||||
```
|
||||
- 安装运行时依赖的 Lua 库:
|
||||
```shell
|
||||
cd apache-apisix-1.4-incubating
|
||||
make deps
|
||||
```
|
||||
- 检查 APISIX 的版本号:
|
||||
```shell
|
||||
./bin/apisix version
|
||||
```
|
||||
- 启动 APISIX (请先确保已经启动了 etcd,并打开了 v2 协议):
|
||||
```shell
|
||||
./bin/apisix start
|
||||
```
|
||||
2. [Docker 镜像](https://hub.docker.com/r/apache/apisix)(适用所有系统)
|
||||
|
||||
## 快速上手
|
||||
默认会拉取最新的 Apache 发布包:
|
||||
|
||||
1. 启动 APISIX
|
||||
```shell
|
||||
docker pull apache/apisix
|
||||
```
|
||||
|
||||
Docker 镜像中并不包含 etcd,你可以参考 [docker compose 的示例](https://github.com/apache/incubator-apisix-docker/tree/master/example)来启动一个测试集群。
|
||||
|
||||
3. RPM 包(只适用于 CentOS 7)
|
||||
- 安装依赖:OpenResty 和 etcd,参考[依赖安装文档](doc/zh-cn/install-dependencies.md#centos-7)
|
||||
- 安装 APISIX:
|
||||
```shell
|
||||
sudo yum install -y https://github.com/apache/incubator-apisix/releases/download/1.4/apisix-1.4-0.el7.noarch.rpm
|
||||
```
|
||||
- 检查 APISIX 的版本号:
|
||||
```shell
|
||||
apisix version
|
||||
```
|
||||
- 启动 APISIX (请先确保已经启动了 etcd,并打开了 v2 协议):
|
||||
```shell
|
||||
apisix start
|
||||
```
|
||||
|
||||
**注意**:Apache APISIX 现在还不支持 etcd 的 v3 协议,所以启动 etcd 时需要开启 v2 协议的支持。
|
||||
我们正在做 etcd v3 协议的支持。
|
||||
```shell
|
||||
sudo apisix start
|
||||
etcd --enable-v2=true &
|
||||
```
|
||||
|
||||
## 针对开发者
|
||||
|
||||
1. 对于开发者而言,可以使用最新的 master 分支来体验更多功能
|
||||
|
||||
- 源码编译
|
||||
```shell
|
||||
git clone git@github.com:apache/incubator-apisix.git
|
||||
cd incubator-apisix
|
||||
make deps
|
||||
```
|
||||
|
||||
- Docker 镜像
|
||||
```shell
|
||||
git clone https://github.com/apache/incubator-apisix-docker.git
|
||||
cd incubator-apisix-docker
|
||||
sudo docker build -f alpine-dev/Dockerfile .
|
||||
```
|
||||
|
||||
2. 入门指南
|
||||
|
||||
入门指南是学习 APISIX 基础知识的好方法。按照 [入门指南](doc/zh-cn/getting-started.md)的步骤即可。
|
||||
入门指南是学习 APISIX 基础知识的好方法。按照 [入门指南](doc/zh-cn/getting-started.md)的步骤即可。
|
||||
|
||||
更进一步,你可以跟着文档来尝试更多的[插件](doc/zh-cn/README.md#插件)。
|
||||
更进一步,你可以跟着文档来尝试更多的[插件](doc/zh-cn/README.md#插件)。
|
||||
|
||||
3. Admin API
|
||||
|
||||
Apache APISIX 提供了 [REST Admin API](doc/zh-cn/admin-api.md),方便动态控制 Apache APISIX 集群。
|
||||
|
||||
4. 插件二次开发
|
||||
|
||||
可以参考[插件开发指南](doc/zh-cn/plugin-develop.md),以及[示例插件 echo](doc/zh-cn/plugins/echo.md) 的文档和代码实现。
|
||||
|
||||
请注意,Apache APISIX 的插件新增、更新、删除等都是热加载的,不用重启服务。
|
||||
|
||||
更多文档请参考 [Apache APISIX 文档索引](doc/zh-cn/README.md)。
|
||||
|
||||
## 控制台
|
||||
|
||||
APISIX 内置了对 Dashboard 的支持,使用步骤如下:
|
||||
|
||||
1. 确保你的运行环境中使用了最新的 Node.js 版本(>= 10)。
|
||||
|
||||
2. 下载 dashboard 子模块的源码:
|
||||
```
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
3. 安装 [yarn](https://yarnpkg.com/zh-Hans/docs/install)
|
||||
|
||||
4. 安装依赖并构建
|
||||
```
|
||||
cd dashboard
|
||||
yarn && yarn build:prod
|
||||
```
|
||||
|
||||
5. 与 APISIX 集成
|
||||
把编译后的在 `/dist` 目录下的所有文件,拷贝到 `apisix/dashboard` 目录下。
|
||||
```
|
||||
cp -r dist/* .
|
||||
```
|
||||
|
||||
使用浏览器打开 `http://127.0.0.1:9080/apisix/dashboard/` 即可使用,
|
||||
不用填写用户名和密码,直接登录。
|
||||
APISIX 提供了 [Dashboard 项目](https://github.com/apache/incubator-apisix-dashboard),
|
||||
可以使用 docker compose 直接部署和体验。
|
||||
|
||||
Dashboard 默认只允许 127.0.0.1 访问。你可以自行修改 `conf/config.yaml` 中的 `allow_admin` 字段,指定允许访问 dashboard 的 IP 列表。
|
||||
|
||||
@ -175,9 +216,8 @@ Dashboard 默认只允许 127.0.0.1 访问。你可以自行修改 `conf/config.
|
||||
|
||||
使用 AWS 的 8 核心服务器来压测 APISIX,QPS 可以达到 140000,同时延时只有 0.2 毫秒。
|
||||
|
||||
## 文档
|
||||
[性能测试脚本](benchmark/run.sh),以及[测试方法和过程](https://gist.github.com/membphis/137db97a4bf64d3653aa42f3e016bd01)已经开源,欢迎补充。
|
||||
|
||||
[Apache APISIX 文档索引](doc/zh-cn/README.md)
|
||||
|
||||
## Apache APISIX 和 Kong 的比较
|
||||
|
||||
@ -219,6 +259,7 @@ Dashboard 默认只允许 127.0.0.1 访问。你可以自行修改 `conf/config.
|
||||
| 指定时间窗口的限速 | 是 | 否 |
|
||||
| 支持任何 Nginx 变量做路由条件 | 是 | 否 |
|
||||
|
||||
性能对比测试[详细内容如下](https://gist.github.com/membphis/137db97a4bf64d3653aa42f3e016bd01)。
|
||||
|
||||
## 视频和文章
|
||||
- 2020.1.17 [API 网关 Apache APISIX 和 Kong 的选型对比](https://mp.weixin.qq.com/s/c51apneVj0O9yxiZAHF34Q)
|
||||
|
@ -18,35 +18,27 @@
|
||||
-->
|
||||
|
||||
# Install Dependencies
|
||||
- [CentOS 6](#centos-6)
|
||||
- [Install Dependencies](#install-dependencies)
|
||||
- [Note](#note)
|
||||
- [CentOS 7](#centos-7)
|
||||
- [Fedora 31 & 32](#fedora-31--32)
|
||||
- [Ubuntu 16.04 & 18.04](#ubuntu-1604--1804)
|
||||
- [Debian 9 & 10](#debian-9--10)
|
||||
- [Mac OSX](#mac-osx)
|
||||
- [How to compile the OpenResty](#how-to-compile-the-openresty)
|
||||
- [Note](#note)
|
||||
|
||||
CentOS 6
|
||||
========
|
||||
Note
|
||||
====
|
||||
- Apache APISIX currently only supports the v2 protocol storage to etcd, but the latest version of etcd (starting with 3.4) has turned off the v2 protocol by default.
|
||||
|
||||
You need to add `--enable-v2=true` to the startup parameter to enable the v2 protocol. The development of the v3 protocol supporting etcd has begun and will soon be available.
|
||||
|
||||
```shell
|
||||
# add OpenResty source
|
||||
sudo yum install yum-utils
|
||||
sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
|
||||
|
||||
# install OpenResty, etcd and some compilation tools
|
||||
sudo yum install -y openresty curl git gcc luarocks lua-devel make
|
||||
|
||||
wget https://github.com/etcd-io/etcd/releases/download/v3.3.13/etcd-v3.3.13-linux-amd64.tar.gz
|
||||
tar -xvf etcd-v3.3.13-linux-amd64.tar.gz && \
|
||||
cd etcd-v3.3.13-linux-amd64 && \
|
||||
sudo cp -a etcd etcdctl /usr/bin/
|
||||
|
||||
# start etcd server
|
||||
nohup etcd &
|
||||
etcd --enable-v2=true &
|
||||
```
|
||||
|
||||
- If you want use Tengine instead of OpenResty, please take a look at this installation step script [Install Tengine at Ubuntu](../.travis/linux_tengine_runner.sh).
|
||||
|
||||
|
||||
CentOS 7
|
||||
========
|
||||
|
||||
@ -138,18 +130,3 @@ brew install openresty/brew/openresty etcd luarocks curl git
|
||||
# start etcd server with v2 protocol
|
||||
etcd --enable-v2=true &
|
||||
```
|
||||
|
||||
How to compile the OpenResty
|
||||
============================
|
||||
|
||||
Compiling OpenResty from source is very complicated, it's not easy to make it clear. So we recommend that you refer to the official installation documentation.
|
||||
|
||||
http://openresty.org/en/linux-packages.html
|
||||
|
||||
Note
|
||||
====
|
||||
- Apache APISIX currently only supports the v2 protocol storage to etcd, but the latest version of etcd (starting with 3.4) has turned off the v2 protocol by default.
|
||||
|
||||
You need to add `--enable-v2=true` to the startup parameter to enable the v2 protocol. The development of the v3 protocol supporting etcd has begun and will soon be available.
|
||||
|
||||
- If you want use Tengine instead of OpenResty, please take a look at this installation step script [Install Tengine at Ubuntu](../.travis/linux_tengine_runner.sh).
|
||||
|
@ -18,35 +18,24 @@
|
||||
-->
|
||||
|
||||
# 安装依赖
|
||||
- [CentOS 6](#centos-6)
|
||||
- [注意](#注意)
|
||||
- [CentOS 7](#centos-7)
|
||||
- [Fedora 31 & 32](#fedora-31--32)
|
||||
- [Ubuntu 16.04 & 18.04](#ubuntu-1604--1804)
|
||||
- [Debian 9 & 10](#debian-9--10)
|
||||
- [Mac OSX](#mac-osx)
|
||||
- [如何编译 Openresty](#如何编译-openresty)
|
||||
- [注意](#注意)
|
||||
|
||||
CentOS 6
|
||||
========
|
||||
注意
|
||||
====
|
||||
- Apache APISIX 目前只支持 `v2` 版本的 etcd,但是最新版的 etcd (从 3.4 起)已经默认关闭了 `v2` 版本的功能。所以你需要添加启动参数 `--enable-v2=true` 来开启 `v2` 的功能,目前对 `v3` etcd 的开发工作已经启动,不久后便可投入使用。
|
||||
|
||||
```shell
|
||||
# 添加 OpenResty 源
|
||||
sudo yum install yum-utils
|
||||
sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
|
||||
|
||||
# 安装 OpenResty, etcd 和 编译工具
|
||||
sudo yum install -y openresty curl git gcc luarocks lua-devel make
|
||||
|
||||
wget https://github.com/etcd-io/etcd/releases/download/v3.3.13/etcd-v3.3.13-linux-amd64.tar.gz
|
||||
tar -xvf etcd-v3.3.13-linux-amd64.tar.gz && \
|
||||
cd etcd-v3.3.13-linux-amd64 && \
|
||||
sudo cp -a etcd etcdctl /usr/bin/
|
||||
|
||||
# 开启 etcd server
|
||||
nohup etcd &
|
||||
etcd --enable-v2=true &
|
||||
```
|
||||
|
||||
- 如果你要想使用 Tengine 替代 OpenResty,请参考 [Install Tengine at Ubuntu](../../.travis/linux_tengine_runner.sh)。
|
||||
|
||||
|
||||
CentOS 7
|
||||
========
|
||||
|
||||
@ -138,16 +127,3 @@ brew install openresty/brew/openresty etcd luarocks curl git
|
||||
# 开启 etcd server 并启用 v2 的功能
|
||||
etcd --enable-v2=true &
|
||||
```
|
||||
|
||||
如何编译 Openresty
|
||||
============================
|
||||
|
||||
编译 Openresty 是一件比较复杂的事情,没办法简单地说明白。所以我们推荐你直接参考官方的安装文档。
|
||||
|
||||
http://openresty.org/en/linux-packages.html
|
||||
|
||||
注意
|
||||
====
|
||||
- Apache APISIX 目前只支持 `v2` 版本的 etcd,但是最新版的 etcd (从 3.4 起)已经默认关闭了 `v2` 版本的功能。所以你需要添加启动参数 `--enable-v2=true` 来开启 `v2` 的功能,目前对 `v3` etcd 的开发工作已经启动,不久后便可投入使用。
|
||||
|
||||
- 如果你要想使用 Tengine 替代 OpenResty,请参考 [Install Tengine at Ubuntu](../../.travis/linux_tengine_runner.sh)。
|
||||
|
Loading…
Reference in New Issue
Block a user