lvs四层负载均衡
lvs四层负载均衡
使用最少两个网段
使用一个网段
异地负载均衡 realserver必须使用公网Ip,还得需要服务器支持ip隧道协议
↓↑↵→←↔
nat:数据流向从client-->dr--->rs rs-->dr--->client
client cip
↑↓
↑↓------->vip
dr
↑↓------->dip
-------------
↑↓ ↓
rs1 rs2----->rip
dr模式:流量从client-->dr-->rs rs-->client
→→→→→→ client cip
↑ ↓
↑ ↓------->vip
↑ dr
↑ ↓------->dip
↑ +----------+
←←←←↓ ↓
rs1 rs2----->rip
1 nat模式
后端服务器支持数量10-20台使用最少两个网段
2 dr模式
后端服务器支持数量100+台使用一个网段
3 隧道模式
后端服务器支持数量100左右异地负载均衡 realserver必须使用公网Ip,还得需要服务器支持ip隧道协议
4 full-nat
↓↑↵→←↔
nat:数据流向从client-->dr--->rs rs-->dr--->client
client cip
↑↓
↑↓------->vip
dr
↑↓------->dip
-------------
↑↓ ↓
rs1 rs2----->rip
dr模式:流量从client-->dr-->rs rs-->client
→→→→→→ client cip
↑ ↓
↑ ↓------->vip
↑ dr
↑ ↓------->dip
↑ +----------+
←←←←↓ ↓
rs1 rs2----->rip