feature: balancer_by_lua_* for stream subsystem#43
feature: balancer_by_lua_* for stream subsystem#43doujiang24 wants to merge 3 commits intoopenresty:masterfrom
Conversation
|
@doujiang24 I was just about to start addressing your comments. Looks like you beat me to the chase. Glad that you got these issues sorted out. Thank you. |
|
@rshriram I needed it to build a dynamic tcp proxy system, and it's online now. |
|
@doujiang24 can you possibly point me to your dynamic tcp proxy? |
|
@rshriram I think the latest nginx core has got nginx variable support. |
|
@agentzh is there any way to combine the balancer_by_lua functionality with nginx features like max_fails, fail_timeout, max_conns (http://nginx.org/en/docs/stream/ngx_stream_upstream_module.html#server) ? In the same vein, how do I combine lua-resty-upstream-healthcheck (http/tcp) with balancer_by_lua ? |
|
@rshriram Sorry, there is no public code. |
95fe041 to
7de79f3
Compare
…le directives to allow NGINX load balancers written in Lua Also added pure C API to support the ngx.balancer Lua API implemented in the lua-resty-core library.
|
No longer needed. |
For now, only
set_current_peerandset_more_tries(not respectproxy_next_upstream_tries) are provided.get_last_failure, there is only one fail status, so we do not need it?set_timeoutsthe
connect_timeoutonly inngx_stream_proxy_srv_conf_t,and it only support
proxy_connect_timeoutandproxy_timeout(no proxy_read_timeout and proxy_send_tiemout like http system does), so I suggest just mark it to do for now.set_more_triesSeems we need to patch to the nginx core to get the configured max retry num, so just not respect
proxy_next_upstream_triesfor now, marked it's todo.The nginx stream system is growing, so I think it's better to not patch for the nginx base code.
This PR is basically from lua-nginx-module & learn much from @rshriram @splitice #30