2个Cloudfront分布之间的加权轮询DNS [英] Weighted round robin dns between 2 Cloudfront distributions

查看:138
本文介绍了2个Cloudfront分布之间的加权轮询DNS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正尝试使用aws对我们的JavaScript代码进行一些逐步的部署测试,但似乎使我们失败了

We are trying to use aws to do some a gradual deployment test with our javascript code, but it seems to fail us

我们创建了2个CF分布的S3存储桶:

we created 2 S3 buckets with CF distributions :

a.example.net-> aaa.cloudfront.net

a.example.net -> aaa.cloudfront.net

b.example.net-> bbb.cloudfront.net

b.example.net -> bbb.cloudfront.net

,我们在route53

than we created a weighted round robin DNS entry in route53

test.example中创建了加权轮询DNS条目。净->(cname)-> aaa.cloudfront.net(5)

test.example.net -> (cname) -> aaa.cloudfront.net (5)

test.example.net->(cname)-> bbb.cloudfront.net(95 )

test.example.net -> (cname) -> bbb.cloudfront.net (95)

在S3存储桶中,我们为每个存储桶放置了一个具有CF对应域名的文件:

in the S3 bucket we put a file with the CF corresponding domain name for each bucket :

< a href = http://test.example.net/dns-test/test.txt rel = nofollow> http://test.example.net/dns-test/test.txt

我期望的是得到95%的时间bbb和5%的时间d3nrwpaeicu4xy。我们实际上得到的是100%的时间aaa :(

What I am expecting is to get 95% of the time bbb and 5% of the time d3nrwpaeicu4xy. What we actually get is aaa 100% of the time :(

我打开了route53小组的票,以检查这是否与dns配置有关,但他们有给我看了,我自己也看到了dns查询在两个存储桶之间拆分。

I opened a ticket to the route53 team to check if this is a problem with the dns configuration but they have shown me , and I have seen it myself that the dns queries split between the 2 buckets.

希望这很清楚。

推荐答案

不幸的是,您无法尝试执行此操作。CloudFront或任何与此相关的HTTP服务器,只能看到test.example.com的主机头。不知道你怎么到达那里,无论是WRR DNS还是主机文件,它只看到主机头。我不确定你是如何在两个CloudFront发行版上配置相同的CNAME的,

Unfortunately what you are trying to do is not possible. CloudFront, or any HTTP server for that matter, only see's the host header of test.example.com. It has no idea how you got there, be it WRR DNS or hosts file, it only see's the host header. I'm not sure how you configured the same CNAME on two CloudFront distributions, it shouldn't be possible.

要实现此目的,您需要利用两个不同的服务,例如S3和CloudFront,为test.example.net创建一个存储桶,并为test.example.net配置一个CloudFront分发。净值,那么您就可以进行WRR了,因为这两种服务都将为您的考试内容提供服务。 ple.net

For this to work, you would need to utilize two different services, for example, S3 and CloudFront. Create a bucket for test.example.net and a CloudFront distribution configured with test.example.net. Then you can WRR as both services will serve your content for test.example.net

这篇关于2个Cloudfront分布之间的加权轮询DNS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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