You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Mararesliu (via GitHub)" <gi...@apache.org> on 2023/12/01 03:11:48 UTC
[I] help request: how can i loadbalance two or more upstream nodes by stream tcp mode [apisix]
Mararesliu opened a new issue, #10577:
URL: https://github.com/apache/apisix/issues/10577
### Description
stream route can proxy to one upstream node, but unavailable two or more nodes
As Follow
set one upstream json, is available
{
"server_addr": "serverIP",
"server_port": 9801,
"upstream": {
"nodes": {
"upstrea_ip1:30010": 1
},
"type": "roundrobin"
}
}
set two upstream json, is unavailable
{
"server_addr": "serverIP",
"server_port": 9801,
"upstream": {
"nodes": [
{"host": "upstream_ip1", "port": 30010, "weight": 1},
{"host": "upstream_ip2", "port": 30010, "weight": 1}
],
"type": "roundrobin"
}
}
### Environment
- APISIX version (run `apisix version`): 3.2.0
- Operating system (run `uname -a`): 3.10.0-1160.59.1.el7.x86_64
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
--prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DAPISIX_BASE_VER=1.21.4.1.8 -DNGX_GRPC_CLI_ENGINE_PATH=/usr/local/openresty/libgrpc_engine.so -DNGX_HTTP_GRPC_CLI_ENGINE_PATH=/usr/local/openresty/libgrpc_engine.so -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl111/include' --add-module=../ngx_devel_kit-0.3.1 --add-module=../echo-nginx-module-0.62 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.33 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.09 --add-module=../srcache-nginx-module-0.32 --add-module=../ngx_lua-0.10.21 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.9 --add-module=../ngx_strea
m_lua-0.0.11 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -Wl,-rpath,/usr/local/openresty/wasmtime-c-api/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl111/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl111/lib' --add-module=/tmp/tmp.cLFc1OlJDR/openresty-1.21.4.1/../mod_dubbo-1.0.2 --add-module=/tmp/tmp.cLFc1OlJDR/openresty-1.21.4.1/../ngx_multi_upstream_module-1.1.1 --add-module=/tmp/tmp.cLFc1OlJDR/openresty-1.21.4.1/../apisix-nginx-module-1.12.0 --add-module=/tmp/tmp.cLFc1OlJDR/openresty-1.21.4.1/../apisix-nginx-module-1.12.0/src/stream --add-module=/tmp/tmp.cLFc1OlJDR/openresty-1.21.4.1/../apisix-nginx-module-1.12.0/src/meta --add-module=/tmp/tmp.cLFc1OlJDR/openresty-1.21.4.1/../wasm-nginx-module-0.6.4 --add-module=/tmp/tmp.cLFc1OlJDR/openresty-1.21.4.1/../lua-var-nginx-module-v0.5.3 --add-module=/tmp/tmp.cLFc1OlJDR/openresty-1.21.4.1/../grpc-client-nginx-module
-v0.4.2 --with-poll_module --with-pcre-jit --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-compat --with-stream --with-http_ssl_module
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: how can i loadbalance two or more upstream nodes by stream tcp mode [apisix]
Posted by "Mararesliu (via GitHub)" <gi...@apache.org>.
Mararesliu commented on issue #10577:
URL: https://github.com/apache/apisix/issues/10577#issuecomment-1835513481
I found the cause,it's a bug from my balance.lua when i enable the stream log.
But I found a bug. if not custom ip port,the log do not log out, if i use 9801 server port
As follow config
stream_proxy: # TCP/UDP proxy
tcp: # TCP proxy address list
- 9800
- ip:9801
- ip:9802
By the way, Can any plugins working in L4 stream proxy ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: how can i loadbalance two or more upstream nodes by stream tcp mode [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #10577:
URL: https://github.com/apache/apisix/issues/10577#issuecomment-1839864343
Can this issue be closed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: how can i loadbalance two or more upstream nodes by stream tcp mode [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #10577:
URL: https://github.com/apache/apisix/issues/10577#issuecomment-1835444109
do you have any error logs to share?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: how can i loadbalance two or more upstream nodes by stream tcp mode [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #10577:
URL: https://github.com/apache/apisix/issues/10577#issuecomment-1835533097
Yeah there are some plugins that can run on L4 but not many. There's an endpoint you can use to check (without flipping through the code):

https://apisix.apache.org/docs/apisix/admin-api/#request-methods-9
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: how can i loadbalance two or more upstream nodes by stream tcp mode [apisix]
Posted by "Mararesliu (via GitHub)" <gi...@apache.org>.
Mararesliu commented on issue #10577:
URL: https://github.com/apache/apisix/issues/10577#issuecomment-1839853131
many thx
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: how can i loadbalance two or more upstream nodes by stream tcp mode [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 closed issue #10577: help request: how can i loadbalance two or more upstream nodes by stream tcp mode
URL: https://github.com/apache/apisix/issues/10577
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org