首页 > 其他 > 详细

[SAA + SAP] Route 53

时间:2021-07-19 22:51:43      阅读:24      评论:0      收藏:0      [点我收藏+]

SAA

Overview

  • A: hostname to IPv4

  • AAAA: hostname to IPv6
  • CNAME: hostname to hostname
  • Alias: hostname to AWS resouce

技术分享图片

 

Create a Record point to a IP that you control

技术分享图片

Testing against: can use nslookup / dig

技术分享图片

 技术分享图片

  • Web broswer will cache the DNS response so that request will hit less time to DNS

 

技术分享图片

  • CNAME has to be something.yourcompany.com, NON Root Domain, in this case, root domain is yourcompany.com
  • Alias: has to point to aws resource. Can ref to non or root domain, so work both for yourcompany.cpm and something.yourcompany.com

技术分享图片

技术分享图片

 

技术分享图片

技术分享图片

If you give to IP address, browser will choose which one to go. It is called Client side load balancing.

Affected by TTL. For 60second, it always goes to one IP address.

 

技术分享图片

 

技术分享图片

  • Has a failover capability if you enable health checks

技术分享图片

技术分享图片

技术分享图片

技术分享图片

技术分享图片

技术分享图片

 

技术分享图片

Return multi IP for client side to choose, a full tolerance solution

 

技术分享图片

技术分享图片

技术分享图片

 


  

SAP

技术分享图片

  • You can combine route policy
  • For example, you ca use Latency as Phrase 1 policy, so the user near US, will be sent to us-east-1 region
  • users are close to Asia will be sent to ap-sourth-1 region
  • Then in each Latency group, can split traffic by using weighted policy to different IPs.

 

Good to Know

Private DNS

  • Can use Route 53 for internal private DNS
  • Must enable the VPC settings enableDnsHostNames and enableDnsSupport

DNSSEC (protect against Man in the Middle attack)

  • Amazon Route 53 supports DNSSEC for domain registration
  • Route 53 supports DNSSEC for DNS service as of Dec 2020 (using KMS)
  • You can also run a custom DNS server on Amazon EC2 for example (Bind is the most popular, dnsmasq, KnotDNS, PowerDNS).

3rd Party registrar

  • You can buy the domain out of AWS and use Route 53 as your DNS provider
  • Update the NS records on the 3rd party register

 

Health Checks

技术分享图片

  • Health Checks can be setup to pass/fail based on text in the first 5120 bytes of the response
  • Health Checks pass only with the 2xx and 3xx status response
  • Calculated health checks
    • Create separate individual health checks
    • Specify how many of the health check need to pass to make the parent pass
  • Health Checks can trigger CloudWatch Alarms

 

Health Checks - Private Hosted Zones

  • Route 53 health checkers are outside the VPC
  • They CANNOT access private endpoints (private VPC or on-premise resource)

Options:

  1. To check a resource within a VPC, you must assign a public IP address (But if resouce is in private subnet, then this option is not possible)
  2. You can configure the health checker to check the health of an external resource the instance relies on, for example a database server.
  3. You can create a CloudWatch metric and assoicate an alarm. You then create a health check that checks the alarm itself.

技术分享图片

 

Health check Solution Architecture RDS multi-region failover

  • If we have two RDS databases in two different regions
  • We use Async replication between two RDS databases
  • We want to achieve automatic failover for RDS

For Health Check, we can we two options:

  1. EC2 instances call /health-db endpoint to do health check
  2. Use CW Alarm to do health check

Then got unhealth result, what we can do is:

  • CW alarm linked to Health check
  • CW Event linked to CW Alaram (or SNS topic)
  • Then trigger Lambda
    • Update DNS record in Route 53 to point to read replica
    • Send a request to Promote Read Replicas as Primary database

技术分享图片

 

技术分享图片

https://aws.amazon.com/premiumsupport/knowledge-center/private-hosted-zone-different-account/

[SAA + SAP] Route 53

原文:https://www.cnblogs.com/Answer1215/p/15020160.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!