一 多組LVS設定注意
1.虛擬路由器的ID:在相同組的LVS集羣ID必須設置爲一致;不同組LVS集羣裏面ID必須不同。
2.優先級:對應state爲MASTER的設置值要比BACKUP的值高。
3.虛擬IP:不同組lVS集羣不同。
二 LVS關於網卡和MTU可能出現的問題
訪問LVS出現高延時關於網卡和MTU的原因。
LVS有時接收到用戶發送的信息會因爲數據包大小超過MTU,然後像client發送imcp讓其分組重發。
進一步原因是LVS服務器的網卡的GRO功能對網卡進行大數據包分片的TSO功能進行重組,致使數據包在lvs檢測中大與MTU而致使發送IMCP_FRAG_NEEDED給client。
[root@test1 ~]# ethtool -k eno16777736
Features for eno16777736:
rx-checksumming: off
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on #TSO
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: on
generic-receive-offload: on #GRO
ethtool -K eno16777736 gro off
1)ping負載均衡器的真實IP和虛擬IP,判斷網絡連通性。檢測防火牆等相關配置。