You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/09/26 03:57:55 UTC

[GitHub] [shardingsphere] hisunwei opened a new issue #7616: connection rebalance issue while make shardingproxy ha on k8s

hisunwei opened a new issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616


   Anyone deploy shardingproxy on k8s as a service ? I have a issue that client connections can transfer to new or restarted pod, the service is unbalance unless I restart all the client. Any one have Ideas to resolve this issue?
   
   I have multi shardingproxy pod to make the service HA, But cannot balance connections while add a new shardingproxy instance.
   


----------------------------------------------------------------
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] [shardingsphere] hisunwei commented on issue #7616: connection rebalance issue while make shardingproxy ha on k8s

Posted by GitBox <gi...@apache.org>.
hisunwei commented on issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616#issuecomment-700511286


   @tristaZero  I am trying to add ServiceMess into k8s to resolve this issue to keep the proxy and client simple.
   I am not sure what will happen if the servicemess force broken the connection.


----------------------------------------------------------------
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] [shardingsphere] tristaZero closed issue #7616: connection rebalance issue while make shardingproxy ha on k8s

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616


   


----------------------------------------------------------------
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] [shardingsphere] hisunwei commented on issue #7616: connection rebalance issue while make shardingproxy ha on k8s

Posted by GitBox <gi...@apache.org>.
hisunwei commented on issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616#issuecomment-699973323


   I think it will work if restart all the client connection to relance immediately  or set diffrent ttl to rebalance slowly, but it will make the application service more complexity. 
   
   I prefer the proxy layer can auto detect the number of node changed, and disconnect part existing connections to force the client to reconnect. 


----------------------------------------------------------------
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] [shardingsphere] hisunwei edited a comment on issue #7616: connection rebalance issue while make shardingproxy ha on k8s

Posted by GitBox <gi...@apache.org>.
hisunwei edited a comment on issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616#issuecomment-700511286


   @tristaZero  I am trying to add ServiceMess into k8s to resolve this issue to keep the proxy and client simple.
   I am not sure what will happen if the servicemess force broken the connection.
   Thanks very much for your repies.


----------------------------------------------------------------
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] [shardingsphere] hisunwei commented on issue #7616: connection rebalance issue while make shardingproxy ha on k8s

Posted by GitBox <gi...@apache.org>.
hisunwei commented on issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616#issuecomment-699974400


   BTW:  the app service connect the proxy on k8s via Service, which act like tcp loadbalance.


----------------------------------------------------------------
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] [shardingsphere] tristaZero commented on issue #7616: connection rebalance issue while make shardingproxy ha on k8s

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616#issuecomment-699746175


   > spring.datasource.hikari.max-lifetime=540000
   
   This is a setting item for SpringBoot? How is it connected to the k8s?
   


----------------------------------------------------------------
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] [shardingsphere] johnny2002 commented on issue #7616: connection rebalance issue while make shardingproxy ha on k8s

Posted by GitBox <gi...@apache.org>.
johnny2002 commented on issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616#issuecomment-699627271


   just simply add the following:
   spring.datasource.hikari.max-lifetime=540000
   
   then all connections will be released and reconnection after max-lifetime.
   


----------------------------------------------------------------
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] [shardingsphere] tristaZero commented on issue #7616: connection rebalance issue while make shardingproxy ha on k8s

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616#issuecomment-699580996


   Do you think there is any good ways to balance the connections for MySQL?


----------------------------------------------------------------
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] [shardingsphere] tristaZero commented on issue #7616: connection rebalance issue while make shardingproxy ha on k8s

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616#issuecomment-700420742


   Hi @hisunwei 
   > BTW: the app service connect the proxy on k8s via Service, which act like tcp loadbalance.
   
   I prefer to balance requests in the service layer above the Proxy. 
   Is there any reasonable reason for ShardingProxy to refuse connections, unless users tell it to do so by some settings or SQLs.
   How do you think?


----------------------------------------------------------------
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] [shardingsphere] tristaZero commented on issue #7616: connection rebalance issue while make shardingproxy ha on k8s

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #7616:
URL: https://github.com/apache/shardingsphere/issues/7616#issuecomment-701136265


   @hisunwei Maybe some of the tests could tell us the answer. :)


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