@@ -214,7 +214,7 @@ add_server
214
214
` syntax: ok,err = upstream.add_server(upstream_name,ip:port,weight,max_fails,fail_timeout) `
215
215
216
216
Add a server to upstream. if the server is exist will return err and notes the server is exist.
217
- Warning:
217
+ Warning:
218
218
`it also to add server to ngx_http_upstream_server_t structure ,so you should call add_peer.
219
219
[ Back to TOC] ( #table-of-contents )
220
220
@@ -223,8 +223,13 @@ add_peer
223
223
` syntax: ok,err = upstream.add_peer(upstream,ip:port) `
224
224
225
225
Add a server to back-end peers. if back-end peers is exist will return err and notes the peer is exist.
226
- it's suitable for ip_hash or round_robin.
226
+ it's suitable for ip_hash or round_robin and least_conn.
227
+ Warning:
228
+ ` if you are using a least_conn and you should update something to below `
227
229
230
+ ``` nginx
231
+ Modified macro variable 'NGX_HTTP_UPSTREAM_LEAST_CONN' 1 ,it's default 0 at 'lua-upstream-nginx-module/src/ngx_http_lua_upstream_module.h' file.
232
+ ```
228
233
229
234
[ Back to TOC] ( #table-of-contents )
230
235
@@ -233,7 +238,7 @@ remove_server
233
238
` syntax: ok,err = upstream.remove_server(upstream,ip:port) `
234
239
235
240
Remove a server from upstream. if the server is not exist will return err and notes the server is not found.
236
- Warning:
241
+ Warning:
237
242
`it also to add server to ngx_http_upstream_server_t structure ,so you should call add_peer.
238
243
239
244
@@ -244,8 +249,13 @@ remove_peer
244
249
` syntax: ok,err = upstream.remove_peer(upstream,ip:port) `
245
250
246
251
Remove a server to back-end peers. if back-end peers not exist will return err and notes the peer is not found.
247
- it's suitable for ip_hash or round_robin.
252
+ it's suitable for ip_hash or round_robin and least_conn.
253
+ Warning:
254
+ ` if you are using a least_conn and you should update something to below `
248
255
256
+ ``` nginx
257
+ Modified macro variable 'NGX_HTTP_UPSTREAM_LEAST_CONN' 1 ,it's default 0 at 'lua-upstream-nginx-module/src/ngx_http_lua_upstream_module.h' file.
258
+ ```
249
259
250
260
[ Back to TOC] ( #table-of-contents )
251
261
0 commit comments