AWS Cognito in Multi region Automated Failover application

0

Hey Everyone ,

I am planning to use AWS cognito connecting with external IDP for my multi region serverless web application (Active/Standby) mode . I am using Cloudfront origin failover functionality along with Route53 based regional failover for my API.

Here in AWS Cognito , how can I determine the health and to watch for service degradations so that i can route to the secondary cognito domain from my Edge lambdas.

I want to do this failover in a seamless way.

Some ideas - TCP route53 healthcheck on cognito domain copuled with AWS health notifications

1개 답변
0

Hi,

First, you should consider simply using what Route53 provides out of the box: Amazon Route 53 health checks. See https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html

If you find it insufficient for your use case, your lambdas at edge can check the CloudWatch metrics published by API gateway to check the overall health in your various regions. They can then decide which region to call depending on your choice algorithm based on those metrics.

For example:

4XXError The number of client-side errors captured in a given period.

The Sum statistic represents this metric, namely, the total count of the 4XXError 
errors in the given period. The Average statistic represents the 4XXError error rate, 
namely, the total count of the 4XXError errors divided by the total number of requests 
during the period. The denominator corresponds to the Count metric (below).
Unit: Count

5XXError
The number of server-side errors captured in a given period.

The Sum statistic represents this metric, namely, the total count of the 5XXError errors 
in the given period. The Average statistic represents the 5XXError error rate, namely, 
the total count of the 5XXError errors divided by the total number of requests during the period. 
The denominator corresponds to the Count metric (below).
Unit: Count

Latency
The time between when API Gateway receives a request from a client and when 
it returns a response to the client. The latency includes the integration latency and 
other API Gateway overhead.
Unit: Millisecond

See https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-metrics-and-dimensions.html for all possible such metrics.

Best,

Didier

profile pictureAWS
전문가
답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인