By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Amazon document db single instance failure recover

0

Planning to use AWS MongoDB as Oauth session storage for a spring boot app

My question is if I used a single instance of Amazon document DB to store sessions for users, in case of failure of Document DB for any reason

  1. Can Amazon document db single instance recover from failure automatically?
  2. How much time does it take AWS Document DB need to recover from failure if session storage contains around 4GB of data?
  3. Do I need to pay for multiple instances of Document DB to achieve 100% up time for log in flow ? Or a single instance can be enough ?

Thanks

asked 9 months ago461 views
1 Answer
1

Hello.

Can Amazon document db single instance recover from failure automatically?

The document below states:
If there is only a primary instance in the cluster and an AWS Availability Zone failure occurs, the primary instance will be recreated.
https://docs.aws.amazon.com/documentdb/latest/developerguide/db-cluster-fault-tolerance.html

If the cluster doesn't contain any Amazon DocumentDB replicas, the primary instance is re-created during a failure event. A failure event results in an interruption, during which read and write operations fail with an exception. Service is restored when the new primary instance is created, which typically takes less than 10 minutes. Promoting an Amazon DocumentDB replica to the primary instance is much faster than creating a new primary instance.

How much time does it take AWS Document DB need to recover from failure if session storage contains around 4GB of data?

I think this will recover within 10 minutes if the above documentation is to be believed.
However, the database recovery time usually varies depending on the content of the stored data and the application workload, so it is best to use the information of 10 minutes or less as a reference only.

Do I need to pay for multiple instances of Document DB to achieve 100% up time for log in flow ? Or a single instance can be enough ?

Having instances across multiple Availability Zones allows for faster failover than with a single instance.
However, even in this case, there may be times when you cannot write to the database for several seconds during the switchover.
https://docs.aws.amazon.com/documentdb/latest/developerguide/db-cluster-fault-tolerance.html

By promoting an existing Amazon DocumentDB replica to the new primary instance chosen based on the Promotion Tier setting of each replica, and then creating a replacement for the former primary. A failover to the replica instance typically takes less than 30 seconds. Read and write operations may experience brief interruption during this period. To increase the availability of your cluster, we recommend that you create at least one or more Amazon DocumentDB replicas in two or more different Availability Zones.

profile picture
EXPERT
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions