有没有办法为两个集群配置 ALB? [英] Is a there way to config an ALB for two clusters?

查看:44
本文介绍了有没有办法为两个集群配置 ALB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 AWS 中为同一个 VPC 中的两个集群设置一个负载均衡器,这可能吗?

I'm trying to set up a single loadbalancer in AWS for two clusters in a the same VPC, is that possible?

因为它只提供一个 DNS 名称,有时路由到集群 A,有时路由到集群 B.

Because it only provides one DNS name which sometimes routes to cluster A and sometimes cluster B.

推荐答案

是的,您绝对可以在位于不同 AZ 的多个集群前面使用单个 LB.

yes you can defintely use a single LB in front of multiple clusters which are in different AZ .

一个 DNS 名称,有时路由到集群 A,有时路由到集群 B.

one DNS name which sometimes routes to cluster A and sometimes cluster B.

ALB 确实公开了一个主机名,该主机名路由到集群 A,有时路由到集群 B,因为这就是负载平衡的含义,将负载/流量平衡到不同的集群,但这种情况正在发生,因为现在可能两个集群都已注册到一个目标群体.

Its true that ALB exposes a single hostname which routes to cluster A and sometimes cluster B because this is what load balancing means, balancing load/raffic to different clusters, but this is happening because right now may be both the clusters are registered to a single target group.

但是,您可以在目标组 1 中注册集群 1,在目标组 2 中注册另一个集群 2.ALB 允许您将请求路由到 不同的目标群体基于;-

However, you can register cluster 1 in target group 1 and another cluster 2 in target group 2. ALB allows you to route request to different target group based on ;-

  • url 中的路径
  • 主机名
  • 查询字符串
  • 源 IP 条件
  • HTTP 标头
  • 主机头

例如在路径条件中的 URL 的情况下 www.example.com/a 将到达目标组 1 意味着集群 1 并且对于 www.example.com/b 请求将到达目标第 2 组表示第 2 组

so for example in the case of URL in path condition www.example.com/a will got to target group one means cluster 1 and for www.example.com/b request will got to target group 2 means cluster 2

这篇关于有没有办法为两个集群配置 ALB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆