Replies: 14 comments 1 reply
-
I was thinking about that, too. |
Beta Was this translation helpful? Give feedback.
-
Haha, I have the same idea as you. I tried to use Nginx to proxy proxy last night, but it didn’t work. I don’t know if there is a problem with my configuration. |
Beta Was this translation helpful? Give feedback.
-
My virtual IP does connect to all of my proxies, and it's polling |
Beta Was this translation helpful? Give feedback.
-
Can you share your Nginx configuration? |
Beta Was this translation helpful? Give feedback.
-
Sorry, I'm using LVS. |
Beta Was this translation helpful? Give feedback.
-
I can give you the steps of LVS if you want to use LVS too |
Beta Was this translation helpful? Give feedback.
-
OK, let me see |
Beta Was this translation helpful? Give feedback.
-
LB Server Configuration: ifconfig network_card_name vip/mask up
ipvsadm -C
ipvsadm --set 30 5 60
ipvsadm -A -t vip:port -s rr -p 60
ipvsadm -a -t vip:port -r proxy_ip:port -g -w 1
#All proxy ip must be matched
ipvsadm -ln
ipvsadm -S > /etc/sysconfig/ipvsadm
systemctl restart ipvsadm Web Server Configuration: cat >>/etc/sysctl.conf<<EOF
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2 EOF
sysctl -p Bind virtual IP addresses, add static routes, receive packets from the LB server, and forward the packets to the LO network adapter for processing: ip addr add vip/mask dev lo
route add -host proxy_ip dev lo |
Beta Was this translation helpful? Give feedback.
-
Haha, thank you, I built one with Haproxy and it worked! |
Beta Was this translation helpful? Give feedback.
-
congratulations |
Beta Was this translation helpful? Give feedback.
-
@marker-wu @crackersuperior Hi, everyone, thanks for your discussion, especially @crackersuperior 's diagram, looks nice. |
Beta Was this translation helpful? Give feedback.
-
Well done ! It definitely need to write a great article with Building a high available sharding-proxy with HAProxy or LVS. |
Beta Was this translation helpful? Give feedback.
-
I'd like to share our use case of ss as sidecar in Kubernetes. Inject ShardingSphere as side car container to app pod, and let app connect to 127.0.0.1:3306 directly. |
Beta Was this translation helpful? Give feedback.
-
How to build a sharding-proxy cluster?
Beta Was this translation helpful? Give feedback.
All reactions