You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/05/04 06:35:19 UTC

[GitHub] [apisix] zhangwenjian opened a new issue #4177: request help: I need tcp upstream connection result as a response to tcp client

zhangwenjian opened a new issue #4177:
URL: https://github.com/apache/apisix/issues/4177


   ### Issue description
   I use openresty as my tcp protocol gateway, you can imagine that is a rdp gateway.
   The tcp client will send final server ip address after connected with gateway, and the balancer_by_lua_block will call set_current_peer to set the assigned server ip address  as final backend. Then I need to response to the client that server is connected successfully or failed. But after set_current_peer returns, I don't known whether final backend server can be connected. How do to get the result and notify my client?
   
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4177: request help: I need tcp upstream connection result as a response to tcp client

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4177:
URL: https://github.com/apache/apisix/issues/4177#issuecomment-831949015


   I have been heard some people did it before. Unfortunately, there is no open source code AFAIK.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] zhangwenjian edited a comment on issue #4177: request help: I need tcp upstream connection result as a response to tcp client

Posted by GitBox <gi...@apache.org>.
zhangwenjian edited a comment on issue #4177:
URL: https://github.com/apache/apisix/issues/4177#issuecomment-831877364


   to spacewander: The solution based on ngx.socket.tcp is to overide the default implemention of upstream connection in nginx? My tcp connection to upstream server will be kept running, not for every request.  Is there any open source code for reference?
    


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4177: request help: I need tcp upstream connection result as a response to tcp client

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4177:
URL: https://github.com/apache/apisix/issues/4177#issuecomment-884183246


   The answer is yes.


-- 
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



[GitHub] [apisix] zhangwenjian commented on issue #4177: request help: I need tcp upstream connection result as a response to tcp client

Posted by GitBox <gi...@apache.org>.
zhangwenjian commented on issue #4177:
URL: https://github.com/apache/apisix/issues/4177#issuecomment-832369480


   Someone suggests to write a nginx c module to realize a own tcp protocol gateway. Actually, the core logic of my gateway is very simple, do I need to write a new full nginx stream module?


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #4177: request help: I need tcp upstream connection result as a response to tcp client

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #4177:
URL: https://github.com/apache/apisix/issues/4177


   


-- 
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



[GitHub] [apisix] spacewander commented on issue #4177: request help: I need tcp upstream connection result as a response to tcp client

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4177:
URL: https://github.com/apache/apisix/issues/4177#issuecomment-831722705


   This feature is not supported by Nginx's stream subsystem's proxy_pass.
   But you can implement the proxy feature in Lua via `ngx.socket.tcp` and achieve it.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] zhangwenjian commented on issue #4177: request help: I need tcp upstream connection result as a response to tcp client

Posted by GitBox <gi...@apache.org>.
zhangwenjian commented on issue #4177:
URL: https://github.com/apache/apisix/issues/4177#issuecomment-831877364


   to spacewander: The solution based on ngx.socket.tcp is to overide the default implemention of upstream connection in nginx? Is there any open source code for reference?
    


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org