Skip to content

Commit

Permalink
docs: replace apisix-base with apisix-runtime
Browse files Browse the repository at this point in the history
Signed-off-by: Sn0rt <[email protected]>
  • Loading branch information
Sn0rt committed Dec 7, 2023
1 parent c92ca1e commit d5f1092
Show file tree
Hide file tree
Showing 38 changed files with 60 additions and 61 deletions.
2 changes: 1 addition & 1 deletion apisix/cli/ngx_tpl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ http {
{% if use_apisix_base then %}
# For servers which obey the standard, when `:authority` is missing,
# `host` will be used instead. When used with apisix-base, we can do
# `host` will be used instead. When used with apisix-runtime, we can do
# better by setting `:authority` directly
grpc_set_header ":authority" $upstream_host;
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion apisix/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ end

local function verify_tls_client(ctx)
if apisix_base_flags.client_cert_verified_in_handshake then
-- For apisix-base, there is no need to rematch SSL rules as the invalid
-- For apisix-runtime, there is no need to rematch SSL rules as the invalid
-- connections are already rejected in the handshake
return true
end
Expand Down
2 changes: 1 addition & 1 deletion apisix/plugins/client-control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ end

function _M.rewrite(conf, ctx)
if not ok then
core.log.error("need to build APISIX-Base to support client control")
core.log.error("need to build APISIX-Runtime to support client control")
return 501
end

Expand Down
2 changes: 1 addition & 1 deletion apisix/plugins/gm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ local _M = {
function _M.init()
if not pcall(function () return C.Tongsuo_version_num end) then
error("need to build Tongsuo (https://github.com/Tongsuo-Project/Tongsuo) " ..
"into the APISIX-Base")
"into the APISIX-Runtime")
end

ssl.enable_ntls()
Expand Down
2 changes: 1 addition & 1 deletion apisix/plugins/gzip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ end

function _M.header_filter(conf, ctx)
if not is_apisix_or then
core.log.error("need to build APISIX-Base to support setting gzip")
core.log.error("need to build APISIX-Runtime to support setting gzip")
return 501
end

Expand Down
2 changes: 1 addition & 1 deletion apisix/plugins/prometheus/exporter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function _M.stream_init()
end

if not pcall(function() return C.ngx_meta_lua_ffi_shdict_udata_to_zone end) then
core.log.error("need to build APISIX-Base to support L4 metrics")
core.log.error("need to build APISIX-Runtime to support L4 metrics")
return
end

Expand Down
2 changes: 1 addition & 1 deletion apisix/plugins/proxy-control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ end
-- we want to control proxy behavior before auth, so put the code under rewrite method
function _M.rewrite(conf, ctx)
if not ok then
core.log.error("need to build APISIX-Base to support proxy control")
core.log.error("need to build APISIX-Runtime to support proxy control")
return 501
end

Expand Down
2 changes: 1 addition & 1 deletion apisix/plugins/real-ip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ end

function _M.rewrite(conf, ctx)
if not is_apisix_or then
core.log.error("need to build APISIX-Base to support setting real ip")
core.log.error("need to build APISIX-Runtime to support setting real ip")
return 501
end

Expand Down
4 changes: 2 additions & 2 deletions apisix/upstream.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if ok then
set_upstream_tls_client_param = apisix_ngx_upstream.set_cert_and_key
else
set_upstream_tls_client_param = function ()
return nil, "need to build APISIX-Base to support upstream mTLS"
return nil, "need to build APISIX-Runtime to support upstream mTLS"
end
end

Expand All @@ -47,7 +47,7 @@ if not is_http then
set_stream_upstream_tls = apisix_ngx_stream_upstream.set_tls
else
set_stream_upstream_tls = function ()
return nil, "need to build APISIX-Base to support TLS over TCP upstream"
return nil, "need to build APISIX-Runtime to support TLS over TCP upstream"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion apisix/wasm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ end

function _M.require(attrs)
if not support_wasm then
return nil, "need to build APISIX-Base to support wasm"
return nil, "need to build APISIX-Runtime to support wasm"
end

local name = attrs.name
Expand Down
4 changes: 2 additions & 2 deletions docs/en/latest/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ make deps ENV_LUAROCKS_SERVER=https://luarocks.cn

If this does not solve your problem, you can try getting a detailed log by using the `--verbose` or `-v` flag to diagnose the problem.

## How do I build the APISIX-Base environment?
## How do I build the APISIX-Runtime environment?

Some functions need to introduce additional NGINX modules, which requires APISIX to run on APISIX-Base. If you need these functions, you can refer to the code in [api7/apisix-build-tools](https://github.com/api7/apisix-build-tools) to build your own APISIX-Base environment.
Some functions need to introduce additional NGINX modules, which requires APISIX to run on APISIX-Runtime. If you need these functions, you can refer to the code in [api7/apisix-build-tools](https://github.com/api7/apisix-build-tools) to build your own APISIX-Runtime environment.

## How can I make a gray release with Apache APISIX?

Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/admin-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ The following should be considered when setting the `hash_on` value:
- When set to `consumer`, the `key` is optional and the key is set to the `consumer_name` captured from the authentication Plugin.
- When set to `vars_combinations`, the `key` is required. The value of the key can be a combination of any of the [Nginx variables](http://nginx.org/en/docs/varindex.html) like `$request_uri$remote_addr`.
The features described below requires APISIX to be run on [APISIX-Base](./FAQ.md#how-do-i-build-the-apisix-base-environment):
The features described below requires APISIX to be run on [APISIX-Runtime](./FAQ.md#how-do-i-build-the-apisix-runtime-environment):
You can set the `scheme` to `tls`, which means "TLS over TCP".
Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/building-apisix.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ apisix stop
Some features of APISIX requires additional Nginx modules to be introduced into OpenResty.
To use these features, you need to build a custom distribution of OpenResty (apisix-base). See [apisix-build-tools](https://github.com/api7/apisix-build-tools) for setting up your build environment and building it.
To use these features, you need to build a custom distribution of OpenResty (apisix-runtime). See [apisix-build-tools](https://github.com/api7/apisix-build-tools) for setting up your build environment and building it.
## Running tests
Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/mtls.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Sometimes the upstream requires mTLS. In this situation, the APISIX acts as the

When configuring `upstreams`, we could use parameter `tls.client_cert` and `tls.client_key` to configure the client certificate APISIX used to communicate with upstreams. Please refer to [Admin API](./admin-api.md#upstream) for details.

This feature requires APISIX to run on [APISIX-Base](./FAQ.md#how-do-i-build-the-apisix-base-environment).
This feature requires APISIX to run on [APISIX-Runtime](./FAQ.md#how-do-i-build-the-apisix-runtime-environment).

Here is a similar Python script to patch a existed upstream with mTLS (changes admin API url if needed):

Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/plugins/client-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The `client-control` Plugin can be used to dynamically control the behavior of N

:::info IMPORTANT

This Plugin requires APISIX to run on APISIX-Base. See [apisix-build-tools](https://github.com/api7/apisix-build-tools) for more info.
This Plugin requires APISIX to run on APISIX-Runtime. See [apisix-build-tools](https://github.com/api7/apisix-build-tools) for more info.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/plugins/dubbo-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The `dubbo-proxy` Plugin allows you to proxy HTTP requests to [Apache Dubbo](htt

:::info IMPORTANT

If you are using OpenResty, you need to build it with Dubbo support. See [How do I build the APISIX base environment](./../FAQ.md#how-do-i-build-the-apisix-base-environment) for details.
If you are using OpenResty, you need to build it with Dubbo support. See [How do I build the APISIX runtime environment](./../FAQ.md#how-do-i-build-the-apisix-runtime-environment) for details.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/plugins/gzip.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The `gzip` Plugin dynamically sets the behavior of [gzip in Nginx](https://docs.

:::info IMPORTANT

This Plugin requires APISIX to run on [APISIX-Base](../FAQ.md#how-do-i-build-the-apisix-base-environment).
This Plugin requires APISIX to run on [APISIX-Runtime](../FAQ.md#how-do-i-build-the-apisix-runtime-environment).

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/en/latest/plugins/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ You can then expose it by using the [public-api](public-api.md) Plugin.
If the Prometheus plugin collects too many metrics, it will take CPU resources to calculate the metric data when getting the metrics via URI, which may affect APISIX to process normal requests. To solve this problem, APISIX exposes the URI and calculates the metrics in the [privileged agent](https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/process.md#enable_privileged_agent).
If the URI is exposed using the public-api plugin, then APISIX will calculate the metric data in a normal worker process, which may still affect APISIX processing of normal requests.

This feature requires APISIX to run on [APISIX-Base](../FAQ.md#how-do-i-build-the-apisix-base-environment).
This feature requires APISIX to run on [APISIX-Runtime](../FAQ.md#how-do-i-build-the-apisix-runtime-environment).

:::

Expand Down Expand Up @@ -381,7 +381,7 @@ curl http://127.0.0.1:9180/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f1

:::info IMPORTANT

This feature requires APISIX to run on [APISIX-Base](../FAQ.md#how-do-i-build-the-apisix-base-environment?).
This feature requires APISIX to run on [APISIX-Runtime](../FAQ.md#how-do-i-build-the-apisix-runtime-environment?).

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/plugins/proxy-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The proxy-control Plugin dynamically controls the behavior of the NGINX proxy.

:::info IMPORTANT

This Plugin requires APISIX to run on [APISIX-Base](../FAQ.md#how-do-i-build-the-apisix-base-environment). See [apisix-build-tools](https://github.com/api7/apisix-build-tools) for more info.
This Plugin requires APISIX to run on [APISIX-Runtime](../FAQ.md#how-do-i-build-the-apisix-runtime-environment). See [apisix-build-tools](https://github.com/api7/apisix-build-tools) for more info.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/plugins/real-ip.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This is more flexible but functions similarly to Nginx's [ngx_http_realip_module

:::info IMPORTANT

This Plugin requires APISIX to run on [APISIX-Base](../FAQ.md#how-do-i-build-the-apisix-base-environment).
This Plugin requires APISIX to run on [APISIX-Runtime](../FAQ.md#how-do-i-build-the-apisix-runtime-environment).

:::

Expand Down
14 changes: 7 additions & 7 deletions docs/en/latest/support-fips-in-apisix.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords:
- Code Contribution
- Building APISIX
- OpenSSL 3.0 FIPS
description: Compile apisix-base with OpenSSL 3.0 (FIPS enabled)
description: Compile apisix-runtime with OpenSSL 3.0 (FIPS enabled)
---

<!--
Expand All @@ -29,11 +29,11 @@ description: Compile apisix-base with OpenSSL 3.0 (FIPS enabled)
#
-->

OpenSSL 3.0 [supports](https://www.openssl.org/blog/blog/2022/08/24/FIPS-validation-certificate-issued/) [FIPS](https://en.wikipedia.org/wiki/FIPS_140-2) mode. To support FIPS in APISIX, you can compile apisix-base with OpenSSL 3.0.
OpenSSL 3.0 [supports](https://www.openssl.org/blog/blog/2022/08/24/FIPS-validation-certificate-issued/) [FIPS](https://en.wikipedia.org/wiki/FIPS_140-2) mode. To support FIPS in APISIX, you can compile apisix-runtime with OpenSSL 3.0.

## Compilation

To compile apisix-base with OpenSSL 3.0, run the commands below as root user:
To compile apisix-runtime with OpenSSL 3.0, run the commands below as root user:

```bash
cd $(mktemp -d)
Expand All @@ -52,9 +52,9 @@ cd ..
export cc_opt="-I$OPENSSL3_PREFIX/openssl-3.0/include"
export ld_opt="-L$OPENSSL3_PREFIX/openssl-3.0/lib64 -Wl,-rpath,$OPENSSL3_PREFIX/openssl-3.0/lib64"

wget https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-base.sh
chmod +x build-apisix-base.sh
./build-apisix-base.sh latest
wget --no-check-certificate https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-runtime.sh
chmod +x build-apisix-runtime.sh
./build-apisix-runtime.sh
```

This will install apisix-base to `/usr/local/openresty-debug`.
This will install apisix-runtime to `/usr/local/openresty`.
1 change: 0 additions & 1 deletion docs/en/latest/wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ title: Wasm

APISIX supports Wasm plugins written with [Proxy Wasm SDK](https://github.com/proxy-wasm/spec#sdks).

This plugin requires APISIX to run on [APISIX-Base](./FAQ.md#how-do-i-build-the-apisix-base-environment), and is under construction.
Currently, only a few APIs are implemented. Please follow [wasm-nginx-module](https://github.com/api7/wasm-nginx-module) to know the progress.

## Programming model
Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/xrpc/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The Redis protocol support allows APISIX to proxy Redis commands, and provide va

:::note

This feature requires APISIX to be run on [APISIX-Base](../FAQ.md#how-do-i-build-the-apisix-base-environment).
This feature requires APISIX to be run on [APISIX-Runtime](../FAQ.md#how-do-i-build-the-apisix-runtime-environment).

It also requires the data sent from clients are well-formed and sane. Therefore, it should only be used in deployments where both the downstream and upstream are trusted.

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/latest/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ make deps ENV_LUAROCKS_SERVER=https://luarocks.cn

如果通过上述操作仍然无法解决问题,可以尝试使用 `--verbose``-v` 参数获取详细的日志来诊断问题。

## 如何构建 APISIX-Base 环境?
## 如何构建 APISIX-Runtime 环境?

有些功能需要引入额外的 NGINX 模块,这就要求 APISIX 需要运行在 APISIX-Base 上。如果你需要这些功能,你可以参考 [api7/apisix-build-tools](https://github.com/api7/apisix-build-tools) 中的代码,构建自己的 APISIX-Base 环境。
有些功能需要引入额外的 NGINX 模块,这就要求 APISIX 需要运行在 APISIX-Runtime 上。如果你需要这些功能,你可以参考 [api7/apisix-build-tools](https://github.com/api7/apisix-build-tools) 中的代码,构建自己的 APISIX-Runtime 环境。

## 我该如何使用 Apache APISIX 进行灰度发布?

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/admin-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ APISIX 的 Upstream 除了基本的负载均衡算法选择外,还支持对上
- 设为 `cookie` 时,`key` 为必传参数,其值为自定义的 cookie name,即 "cookie\_`key`"。请注意 cookie name 是**区分大小写字母**的。例如:`cookie_x_foo` 与 `cookie_X_Foo` 表示不同的 `cookie`。
- 设为 `consumer` 时,`key` 不需要设置。此时哈希算法采用的 `key` 为认证通过的 `consumer_name`。

以下特性需要 APISIX 运行于 [APISIX-Base](./FAQ.md#如何构建-APISIX-Base-环境?):
以下特性需要 APISIX 运行于 [APISIX-Runtime](./FAQ.md#如何构建-APISIX-Runtime-环境?):

- `scheme` 可以设置成 `tls`,表示 `TLS over TCP`。
- `tls.client_cert/key` 可以用来跟上游进行 mTLS 通信。他们的格式和 SSL 对象的 `cert` 和 `key` 一样。
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/latest/building-apisix.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ apisix quit
apisix stop
```
## 为 APISIX 构建 APISIX-Base
## 为 APISIX 构建 APISIX-Runtime
APISIX 的一些特性需要在 OpenResty 中引入额外的 NGINX 模块。
如果要使用这些功能,你需要构建一个自定义的 OpenResty 发行版(APISIX-Base)。请参考 [apisix-build-tools](https://github.com/api7/apisix-build-tools) 配置你的构建环境并进行构建。
如果要使用这些功能,你需要构建一个自定义的 OpenResty 发行版(APISIX-Runtime)。请参考 [apisix-build-tools](https://github.com/api7/apisix-build-tools) 配置你的构建环境并进行构建。
## 运行测试用例
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/latest/mtls.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ curl --cacert /data/certs/mtls_ca.crt --key /data/certs/mtls_client.key --cert /

### 如何配置

你需要构建 [APISIX-Base](./FAQ.md#如何构建-APISIX-Base-环境?),并且需要在配置文件中设定 `etcd.tls` 来使 ETCD 的双向认证功能正常工作。
你需要构建 [APISIX-runtime](./FAQ.md#如何构建-APISIX-runtime-环境?),并且需要在配置文件中设定 `etcd.tls` 来使 ETCD 的双向认证功能正常工作。

```yaml title="conf/config.yaml"
deployment:
Expand Down Expand Up @@ -163,7 +163,7 @@ curl --resolve 'mtls.test.com:<APISIX_HTTPS_PORT>:<APISIX_URL>' "https://<APISIX

在配置 upstream 资源时,可以使用参数 `tls.client_cert` 和 `tls.client_key` 来配置 APISIX 用于与上游进行通讯时使用的证书。可参考 [Upstream API 文档](./admin-api.md#upstream)。

该功能需要 APISIX 运行在 [APISIX-Base](./FAQ.md#如何构建-apisix-base-环境) 上。
该功能需要 APISIX 运行在 [APISIX-Runtime](./FAQ.md#如何构建-apisix-runtime-环境) 上。

下面是一个与配置 SSL 时相似的 Python 脚本,可为一个已存在的 upstream 资源配置双向认证。如果需要,可修改 API 地址和 API Key。

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/client-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ description: 本文介绍了 Apache APISIX proxy-control 插件的相关操作

:::info 重要

此插件需要 APISIX 在 [APISIX-Base](../FAQ.md#如何构建-apisix-base-环境) 环境上运行。更多信息请参考 [apisix-build-tools](https://github.com/api7/apisix-build-tools)
此插件需要 APISIX 在 [APISIX-Runtime](../FAQ.md#如何构建-apisix-Runtime-环境) 环境上运行。更多信息请参考 [apisix-build-tools](https://github.com/api7/apisix-build-tools)

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/dubbo-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ title: dubbo-proxy

## 要求

如果你正在使用 `OpenResty`, 你需要编译它来支持 `dubbo`, 参考 [APISIX-Base](../FAQ.md#如何构建-apisix-base-环境)
如果你正在使用 `OpenResty`, 你需要编译它来支持 `dubbo`, 参考 [APISIX-Runtime](../FAQ.md#如何构建-apisix-runtime-环境)

## 运行时属性

Expand Down
6 changes: 3 additions & 3 deletions docs/zh/latest/plugins/gm.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ description: 本文介绍了关于 Apache APISIX gm 插件的基本信息及使

## 启用插件

**该插件要求 Apache APISIX 运行在编译了 Tongsuo 的 APISIX-Base 上。**
**该插件要求 Apache APISIX 运行在编译了 Tongsuo 的 APISIX-Runtime 上。**

首先,我们需要安装 Tongsuo(此处我们选择编译出 Tongsuo 的动态链接库):

Expand All @@ -50,7 +50,7 @@ make -j2
sudo make install_sw
```

其次,我们需要构建 APISIX-Base,让它使用 Tongsuo 作为 SSL 库:
其次,我们需要构建 APISIX-Runtime,让它使用 Tongsuo 作为 SSL 库:

```
export OR_PREFIX=/usr/local/openresty
Expand All @@ -60,7 +60,7 @@ export pcre_prefix=$OR_PREFIX/pcre
export cc_opt="-DNGX_LUA_ABORT_AT_PANIC -I${zlib_prefix}/include -I${pcre_prefix}/include -I${openssl_prefix}/include"
export ld_opt="-L${zlib_prefix}/lib -L${pcre_prefix}/lib -L${openssl_prefix}/lib64 -Wl,-rpath,${zlib_prefix}/lib:${pcre_prefix}/lib:${openssl_prefix}/lib64"
./build-apisix-base.sh
./build-apisix-runtime.sh
```

该插件默认是禁用状态,你需要将其添加到配置文件(`./conf/config.yaml`)中才可以启用它:
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/gzip.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ description: 本文介绍了关于 Apache APISIX `gzip` 插件的基本信息及

:::info IMPORTANT

该插件要求 Apache APISIX 运行在 [APISIX-Base](../FAQ.md#如何构建-apisix-base-环境) 上。
该插件要求 Apache APISIX 运行在 [APISIX-Runtime](../FAQ.md#如何构建-apisix-runtime-环境) 上。

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/latest/plugins/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ plugin_attr:
如果 Prometheus 插件收集的指标数量过多,在通过 URI 获取指标时,会占用 CPU 资源来计算指标数据,可能会影响 APISIX 处理正常请求。为解决此问题,APISIX 在 [privileged agent](https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/process.md#enable_privileged_agent) 中暴露 URI 并且计算指标。
如果使用 public-api 插件暴露该 URI,那么 APISIX 将在普通的 worker 进程中计算指标数据,这仍可能会影响 APISIX 处理正常请求。

该特性要求 APISIX 运行在 [APISIX-Base](../FAQ.md#如何构建-apisix-base-环境) 上。
该特性要求 APISIX 运行在 [APISIX-Runtime](../FAQ.md#如何构建-apisix-runtime-环境) 上。

:::

Expand Down Expand Up @@ -351,7 +351,7 @@ curl http://127.0.0.1:9180/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f1

:::info IMPORTANT

该功能要求 APISIX 运行在 [APISIX-Base](../FAQ.md#如何构建-APISIX-Base-环境?) 上。
该功能要求 APISIX 运行在 [APISIX-Runtime](../FAQ.md#如何构建-APISIX-Runtime-环境?) 上。

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/proxy-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ description: 本文介绍了 Apache APISIX proxy-control 插件的相关操作

:::info 重要

此插件需要 APISIX 在 [APISIX-Base](../FAQ.md#如何构建-apisix-base-环境) 环境上运行。更多信息请参考 [apisix-build-tools](https://github.com/api7/apisix-build-tools)
此插件需要 APISIX 在 [APISIX-Runtime](../FAQ.md#如何构建-apisix-runtime-环境) 环境上运行。更多信息请参考 [apisix-build-tools](https://github.com/api7/apisix-build-tools)

:::

Expand Down
Loading

0 comments on commit d5f1092

Please sign in to comment.