我可以使用两个 S3 存储桶在 Route53 上进行主要和次要故障转移吗?
Can I use two S3 buckets for primary and secondary failover on Route53?
我想设置 Route53,这样当人们去 xyz.mydomain.com 时,他们会访问我使用 S3 复制设置的两个 S3 存储桶之一。
我已经在 Route53 上配置了其中一个存储桶,但我不明白如何配置第二个存储桶,比如我应该为别名目标设置什么?
谢谢。
我们在中断时对 s3 进行负载平衡时遇到了同样的问题,下面是解决方法,
这不仅仅是一个故障转移,它也是基于延迟的路由的主动-主动,
https://read.iopipe.com/multi-region-s3-failover-w-route53-64ff2357aa30
感谢 Erica Windisch 这篇精彩的文章。
故障转移的唯一缺点 url 是它只能在 http 而不能在 https 上提供服务。
您可以通过云端获取 http 和服务器,使其成为 https。
'AWS is still pending giving a cleaner solution for this issue'
理想情况下,应该在多个区域接受 cname,并自动执行故障转移或基于延迟的路由。
希望对您有所帮助。
这是我的解决方法。
假设
Main Region: us-east-1
Failover Region: us-west-2
S3
S3 Bucket 1:
Name Suggestion: xyz.mydomain.com-failover
Region: us-west-2
Properties:
Versioning: Enable Versioning
Static Website Hosting: Use this bucket to host a website
S3 Bucket 2:
Name: xyz.mydomain.com
Region: us-east-1
Properties:
Versioning: Enable Versioning
Static Website Hosting: Use this bucket to host a website
Management:
Replication:
Add rule:
Source:
Source: All Contents
Status: Enabled
Destination:
Destination Bucket: xyz.mydomain.com-failover
Permissions:
Select IAM Role: Create new Role
CloudFront 分布
CloudFront Distribution:
Type: Web
Origin Settings:
Origin Domain Name: xyz.mydomain.com-failover.s3-website-us-west-2.amazonaws.com
Origin Id: S3-Failover-Bucket
Distribution Settings:
Alternate Domain Names (CNAMEs): xyz.mydomain.com
53 号公路
Route 53 HealthCheck 1:
Name: xyz.mydomain.com
What to monitor: Endpoint
Specify Endpoint by: Domain Name
Protocol: HTTP
Domain Name: xyz.mydomain.com.s3-website-us-east-1.amazonaws.com
Route 53 Record Set 1:
Name: xyz.mydomain.com
Type: CName
Value: xyz.mydomain.com.s3-website-us-east-1.amazonaws.com
Routing Policy: Failover
Failover Record Type: Primary
Associate with HealthCheck: Yes
Health Check to Associate: xyz.mydomain.com
Route 53 Record Set 2:
Name: xyz.mydomain.com
Type: A
Alias: Yes
Alias Target: [CloudFront Distribution for xyz.mydomain.com]
(可选)HTTPS 支持
将上面的xyz.mydomain.com
替换为abc.mydomain.com
CloudFront Distribution:
Type: Web
Origin Settings:
Origin Domain Name: abc.mydomain.com
Origin Id: CrossRegionDomain
Distribution Settings:
Alternate Domain Names (CNAMEs): xyz.mydomain.com
理由
我们使用 Route 53 记录集指向的任何服务都必须能够处理该域的请求。
在撰写本文时,要使用 S3 托管网站,存储桶的名称必须是您希望 S3 响应的域,这就是我们将 S3 Bucket 2 xyz.mydomain.com
.
Bucket 名称在撰写本文时必须是全局唯一的,因此对于 S3 Bucket 1,我们将其与 CloudFront 分配结合使用,以便该分配知道如何响应域。这也是为什么建议使用 S3 Bucket 1 的名称。
对于可选的 HTTPS 支持,我们将解决方案包装在 CloudFront 中,因为这是将 S3 存储桶升级到 HTTPS 支持的标准做法。 CloudFront 别名在撰写本文时也必须是全球唯一的,这就是为什么我们要支持 HTTPS,我们必须重命名域,至少 S3 Bucket 2。我们基本上采用故障转移解决方案并将其包装在 CloudFront 上。
I want to setup Route53 so that when people go to xyz.mydomain.com
they will hit one of my two S3 buckets that I've setup with S3
replication.
由于 AWS limitation 要求将存储桶名称作为 Route53 中的域名,因此仅使用 S3 和 Route53 是不可能直接实现的,因为您需要创建两个存储桶名称(不同的存储桶名称用于在另一个区域中进行复制).
The bucket must have the same name as your domain or subdomain. For example, if you want to use the subdomain acme.example.com, the name of the bucket must be acme.example.com.
我推荐的解决方案是(假设由于法规要求,您正在为 S3 的高可用性和容错进行复制)让两个 AWS CloudFront 分布指向原始和复制的存储桶,同时进行故障转移路由针对各个 CloudFront 分配的 CName 配置。
话虽如此,AWS S3 发生故障的可能性很小,因为 S3 的设计具有 99.999999999% 的耐用性和 99.99%(AWS 提供 99.9% 的 SLA)和内部冗余架构,您需要上述设置,仅当有独特的监管要求时。
我想设置 Route53,这样当人们去 xyz.mydomain.com 时,他们会访问我使用 S3 复制设置的两个 S3 存储桶之一。
我已经在 Route53 上配置了其中一个存储桶,但我不明白如何配置第二个存储桶,比如我应该为别名目标设置什么?
谢谢。
我们在中断时对 s3 进行负载平衡时遇到了同样的问题,下面是解决方法,
这不仅仅是一个故障转移,它也是基于延迟的路由的主动-主动,
https://read.iopipe.com/multi-region-s3-failover-w-route53-64ff2357aa30
感谢 Erica Windisch 这篇精彩的文章。
故障转移的唯一缺点 url 是它只能在 http 而不能在 https 上提供服务。
您可以通过云端获取 http 和服务器,使其成为 https。
'AWS is still pending giving a cleaner solution for this issue'
理想情况下,应该在多个区域接受 cname,并自动执行故障转移或基于延迟的路由。
希望对您有所帮助。
这是我的解决方法。
假设
Main Region: us-east-1
Failover Region: us-west-2
S3
S3 Bucket 1:
Name Suggestion: xyz.mydomain.com-failover
Region: us-west-2
Properties:
Versioning: Enable Versioning
Static Website Hosting: Use this bucket to host a website
S3 Bucket 2:
Name: xyz.mydomain.com
Region: us-east-1
Properties:
Versioning: Enable Versioning
Static Website Hosting: Use this bucket to host a website
Management:
Replication:
Add rule:
Source:
Source: All Contents
Status: Enabled
Destination:
Destination Bucket: xyz.mydomain.com-failover
Permissions:
Select IAM Role: Create new Role
CloudFront 分布
CloudFront Distribution:
Type: Web
Origin Settings:
Origin Domain Name: xyz.mydomain.com-failover.s3-website-us-west-2.amazonaws.com
Origin Id: S3-Failover-Bucket
Distribution Settings:
Alternate Domain Names (CNAMEs): xyz.mydomain.com
53 号公路
Route 53 HealthCheck 1:
Name: xyz.mydomain.com
What to monitor: Endpoint
Specify Endpoint by: Domain Name
Protocol: HTTP
Domain Name: xyz.mydomain.com.s3-website-us-east-1.amazonaws.com
Route 53 Record Set 1:
Name: xyz.mydomain.com
Type: CName
Value: xyz.mydomain.com.s3-website-us-east-1.amazonaws.com
Routing Policy: Failover
Failover Record Type: Primary
Associate with HealthCheck: Yes
Health Check to Associate: xyz.mydomain.com
Route 53 Record Set 2:
Name: xyz.mydomain.com
Type: A
Alias: Yes
Alias Target: [CloudFront Distribution for xyz.mydomain.com]
(可选)HTTPS 支持
将上面的xyz.mydomain.com
替换为abc.mydomain.com
CloudFront Distribution:
Type: Web
Origin Settings:
Origin Domain Name: abc.mydomain.com
Origin Id: CrossRegionDomain
Distribution Settings:
Alternate Domain Names (CNAMEs): xyz.mydomain.com
理由
我们使用 Route 53 记录集指向的任何服务都必须能够处理该域的请求。
在撰写本文时,要使用 S3 托管网站,存储桶的名称必须是您希望 S3 响应的域,这就是我们将 S3 Bucket 2 xyz.mydomain.com
.
Bucket 名称在撰写本文时必须是全局唯一的,因此对于 S3 Bucket 1,我们将其与 CloudFront 分配结合使用,以便该分配知道如何响应域。这也是为什么建议使用 S3 Bucket 1 的名称。
对于可选的 HTTPS 支持,我们将解决方案包装在 CloudFront 中,因为这是将 S3 存储桶升级到 HTTPS 支持的标准做法。 CloudFront 别名在撰写本文时也必须是全球唯一的,这就是为什么我们要支持 HTTPS,我们必须重命名域,至少 S3 Bucket 2。我们基本上采用故障转移解决方案并将其包装在 CloudFront 上。
I want to setup Route53 so that when people go to xyz.mydomain.com they will hit one of my two S3 buckets that I've setup with S3 replication.
由于 AWS limitation 要求将存储桶名称作为 Route53 中的域名,因此仅使用 S3 和 Route53 是不可能直接实现的,因为您需要创建两个存储桶名称(不同的存储桶名称用于在另一个区域中进行复制).
The bucket must have the same name as your domain or subdomain. For example, if you want to use the subdomain acme.example.com, the name of the bucket must be acme.example.com.
我推荐的解决方案是(假设由于法规要求,您正在为 S3 的高可用性和容错进行复制)让两个 AWS CloudFront 分布指向原始和复制的存储桶,同时进行故障转移路由针对各个 CloudFront 分配的 CName 配置。
话虽如此,AWS S3 发生故障的可能性很小,因为 S3 的设计具有 99.999999999% 的耐用性和 99.99%(AWS 提供 99.9% 的 SLA)和内部冗余架构,您需要上述设置,仅当有独特的监管要求时。