You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2021/02/10 16:41:57 UTC
[apisix] branch master updated: docs: update the content of the FAQ
document (#3574)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new b64a1b8 docs: update the content of the FAQ document (#3574)
b64a1b8 is described below
commit b64a1b87e246880c650dafd60f6d125bb4675e79
Author: Yuelin Zheng <22...@qq.com>
AuthorDate: Thu Feb 11 00:41:47 2021 +0800
docs: update the content of the FAQ document (#3574)
---
FAQ.md | 16 +++++++++++++++-
FAQ_CN.md | 16 +++++++++++++++-
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/FAQ.md b/FAQ.md
index 5537e3e..1167ea3 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -78,7 +78,9 @@ An example, `foo.com/product/index.html?id=204&page=2`, gray release based on `i
1. Group A:id <= 1000
2. Group B:id > 1000
-here is the way:
+There are two different ways to do this:
+
+1. Use the `vars` field of route to do it.
```shell
curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
@@ -111,6 +113,10 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/2 -H 'X-API-KEY: edd1c9f034335
Here is the operator list of current `lua-resty-radixtree`:
https://github.com/iresty/lua-resty-radixtree#operator-list
+2. Use `traffic-split` plugin to do it.
+
+Please refer to the [traffic-split.md](doc/plugins/traffic-split.md) plugin documentation for usage examples.
+
## How to redirect http to https via APISIX?
An example, redirect `http://foo.com` to `https://foo.com`
@@ -341,3 +347,11 @@ Note this option is not shown in the output of `etcd --help`.
```
Indeed this distinction was eliminated by etcd in their master branch, but not backport to announced versions, so be care when deploy your etcd cluster.
+
+## How to set up high available Apache APISIX clusters?
+
+The high availability of APISIX can be divided into two parts:
+
+1. The data plane of Apache APISIX is stateless and can be elastically scaled at will. Just add a layer of LB in front.
+
+2. The control plane of Apache APISIX relies on the highly available implementation of `etcd cluster` and does not require any relational database dependency.
diff --git a/FAQ_CN.md b/FAQ_CN.md
index b59c67e..aa43039 100644
--- a/FAQ_CN.md
+++ b/FAQ_CN.md
@@ -79,7 +79,9 @@ luarocks 服务。 运行 `luarocks config rocks_servers` 命令(这个命令
1. A组:id <= 1000
2. B组:id > 1000
-可以这么做:
+有两种不同的方法来实现:
+
+1、使用 route 的 `vars` 字段来实现
```shell
curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
@@ -112,6 +114,10 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/2 -H 'X-API-KEY: edd1c9f034335
更多的 lua-resty-radixtree 匹配操作,可查看操作列表:
https://github.com/iresty/lua-resty-radixtree#operator-list
+2、通过 traffic-split 插件来实现
+
+详细使用示例请参考 [traffic-split.md](doc/zh-cn/plugins/traffic-split.md) 插件文档。
+
## 如何支持 http 自动跳转到 https?
比如,将 `http://foo.com` 重定向到 `https://foo.com`
@@ -289,3 +295,11 @@ etcd --enable-grpc-gateway --data-dir=/path/to/data
```
事实上这种差别已经在 etcd 的 master 分支中消除,但并没有向后移植到已经发布的版本中,所以在部署 etcd 集群时,依然需要小心。
+
+## 如何创建高可用的 Apache APISIX 集群?
+
+APISIX 的高可用可分为两个部分:
+
+1、Apache APISIX 的数据平面是无状态的,可以进行随意的弹性伸缩,前面加一层 LB 即可。
+
+2、Apache APISIX 的控制平面是依赖于 `etcd cluster` 的高可用实现的,不需要任何关系型数据库的依赖。