Skip to content

Commit d3150f5

Browse files
Miss-youSaberMaster
authored andcommitted
doc: Added FAQ about how to reload your own plugin (apache#1568)
1 parent 7b5ea5a commit d3150f5

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

FAQ.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,17 @@ Steps:
172172
2. Restart APISIX
173173

174174
Now you can trace the info level log in logs/error.log.
175+
176+
## How to reload your own plugin
177+
178+
The Apache APISIX plugin supports hot reloading. If your APISIX node has the Admin API turned on, then for scenarios such as adding / deleting / modifying plugins, you can hot reload the plugin by calling the HTTP interface without restarting the service.
179+
180+
```shell
181+
curl http://127.0.0.1:9080/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
182+
```
183+
184+
If your APISIX node does not open the Admin API, then you can manually load the plug-in by reloading APISIX.
185+
186+
```shell
187+
apisix reload
188+
```

FAQ_CN.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,17 @@ https://github.com/iresty/lua-resty-radixtree#operator-list
123123
2、重启APISIX
124124

125125
之后便可以在logs/error.log中查看到info的日志了。
126+
127+
## 如何加载自己编写的插件
128+
129+
Apache APISIX 的插件支持热加载,如果你的 APISIX 节点打开了 Admin API,那么对于新增/删除/修改插件等场景,均可以通过调用 HTTP 接口的方式热加载插件,不需要重启服务。
130+
131+
```shell
132+
curl http://127.0.0.1:9080/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
133+
```
134+
135+
如果你的 APISIX 节点并没有打开 Admin API,那么你可以通过手动 reload APISIX 的方式加载插件。
136+
137+
```shell
138+
apisix reload
139+
```

0 commit comments

Comments
 (0)