Skip to content

Commit

Permalink
update site at 20240806-180736, machine LiaoSirui-MacMini.local
Browse files Browse the repository at this point in the history
  • Loading branch information
LiaoSirui committed Aug 6, 2024
1 parent ae90a78 commit 4e953e2
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 89 additions & 0 deletions 虚拟化技术/VMware虚拟化平台/Horizon/高可用HAProxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
![img](./.assets/高可用HAProxy/image.png)

```conf
! Configuration File for keepalived
global_defs {
router_id PhotonLB1
vrrp_skip_check_adv_addr
vrrp_garp_interval 0
vrrp_gna_interval 0
}
vrrp_script chk_haproxy {
script "/usr/bin/kill -0 haproxy"
interval 2
weight 2
}
vrrp_instance LB_VIP {
interface eth0
state MASTER # BACKUP on PhotonLB2
priority 101 # 100 on PhotonLB2
virtual_router_id 11 # same on all peers
authentication { # same on all peers
auth_type AH
auth_pass Pass1234
}
unicast_src_ip 192.168.1.251 # real IP of MASTER peer
unicast_peer {
192.168.1.252 # real IP of BACKUP peer
}
virtual_ipaddress {
192.168.1.250 # Virtual IP for HAProxy loadbalancer
192.168.1.20 # Virtual IP for Horizon
192.168.1.30 # Virtual IP for AppVolumes Manager
}
track_script {
chk_haproxy # if HAProxy is not running on this peer, start failover
}
}
```

备用

```
! Configuration File for keepalived
global_defs {
router_id PhotonLB2
vrrp_skip_check_adv_addr
vrrp_garp_interval 0
vrrp_gna_interval 0
}
vrrp_script chk_haproxy {
script "/usr/bin/kill -0 haproxy"
interval 2
weight 2
}
vrrp_instance LB_VIP {
interface eth0
state BACKUP # MASTER on PhotonLB1
priority 100 # 101 on PhotonLB1
virtual_router_id 11 # same on all peers
authentication { # same on all peers
auth_type AH
auth_pass Pass1234
}
unicast_src_ip 192.168.1.252 # real IP of BACKUP peer
unicast_peer {
192.168.1.251 # real IP of MASTER peer
}
virtual_ipaddress {
192.168.1.250 # Virtual IP for HAProxy loadbalancer
192.168.1.20 # Virtual IP for Horizon
192.168.1.30 # Virtual IP for AppVolumes Manager
}
track_script {
chk_haproxy # if HAProxy is not running on this peer, start failover
}
}
```

## 参考链接

- <https://itpro.peene.be/vmware-horizon-appvolumes-lb-with-haproxy-and-keepalived-on-photonos/>

- <https://docs.vmware.com/en/vRealize-Operations/8.10/vrops-manager-load-balancing/GUID-425274B4-7E57-4A71-A260-317097293231.html>

- <https://www.virtualtothecore.com/balance-multiple-view-connection-servers-using-haproxy/>

- <https://itpro.peene.be/haproxy-health-checks-for-vmware-horizon-appvolumes/>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Horizon 的连接服务器支持多节点部署,但并不提供单一的入口,管理员可以在 DNS 上为多台 CS 配置同一个外部域名,这样用户在进行域名解析时就可以获得不同 CS 的真实地址,从而让不同的用户连到不同的 CS 节点。但 DNS 并不能监测后端 CS 是否正常工作,CS 节点故障时可能会导致部分 Client 无法正常使用桌面。因此使用负载均衡器是一个更优的选择

## Horizon 流量

在 Horizon 环境中共有两大类流量:

- 用户认证流量(HTTPS):用户登陆时的身份认证均使用此协议传输。认证功能由 CS 提供,在 Horizon 下 CS 本身默认提供 TLS 加密功能,如果要给 CS 配置负载均衡,则要做端到端的 TLS 加解密;
Expand Down
25 changes: 25 additions & 0 deletions 虚拟化技术/VMware虚拟化平台/Horizon/高可用UAG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## UAG 简介

UAG 全称 Unified Access Gateway,在 Horizon 环境中可以放置在网络边界,隔离来自互联网的 Client (或其他网络区域)和托管在内网的 Horizon 桌面。一个典型的部署架构如下图所示:

![img](./.assets/高可用UAG/16154611_62d26cc3b26a957898.png)

UAG 支持多网卡部署,因此可以很好地适应各种网络拓扑,通常来说 UAG 会为 Horizon 提供两项功能:

- 认证代理 :用户使用 VDI 时,会将认证请求发送给 UAG ,UAG 将请求转发给后端的 Connection Server 进行处理
- VDI 桌面流量的代理(安全网关):和 Connection Server 的安全网关功能类似,开启后用户桌面数据将通过 UAG 集中转发

一般在生产环境下需要部署多台 UAG 来提供高可用,UAG 自身也支持为多台设备配置浮动 IP 来提供简单的 HA 功能。第一台开启 HA 功能的 UAG 会成为主节点,浮动 IP 托管在主节点上,所有到 UAG 的访问均会先发给主 UAG 节点,主 UAG 节点再做请求的分发。当主节点故障后备节点会进行接管

## UAG 负载均衡模式

![image-20240806172526369](./.assets/高可用UAG/image-20240806172526369.png)

![img](./.assets/高可用UAG/16154611_62d26cc39d95d58481.png)

### 单 VIP 配置 L7 & L4



### 单一四层虚拟服务

0 comments on commit 4e953e2

Please sign in to comment.