AWS Database Specialty - Optimal Solution for Automatic Failover in LAMP Stack Applications

Optimal Solution for Automatic Failover in LAMP Stack Applications

Question

A company has LAMP (Linux, Apache, MySQL, PHP) stack applications deployed to AWS.The availability requirements for its backend database specify automatic failover in case of disaster recovery.What is the optimal solution that meets this requirement?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer: A.

Option A is CORRECT because with RDS Multi-AZ deployment, a primary DB instance is automatically and synchronously replicated to a secondary RDS instance in a different availability zone (AZ).In case of a disaster causing primary instance failure, RDS performs an automatic failover to the standby RDS instance.

Option B is incorrect because RDS Read-Replica provides secondary RDS instances that are asynchronously replicated from the primary.RDS read-replicas have different endpoints and do not provide automatic failover.Additionally, they only provide read (not write) operations.

Option C is incorrect.

Since the scenario calls for MySQL, we must choose a relational database for the backend database.

Option D is incorrect because this solution does not provide automatic data synchronization between instances.

Reference:

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html

The optimal solution that meets the availability requirements for a LAMP stack application on AWS with automatic failover in case of disaster recovery is to use RDS with Multi-AZ deployment.

Explanation:

A. RDS with Multi-AZ deployment: Amazon RDS (Relational Database Service) is a managed database service offered by AWS. RDS provides high availability, durability, and automatic backup capabilities for relational databases. With Multi-AZ deployment, AWS automatically creates a replica of the primary database in a different Availability Zone (AZ). The replica database stays in sync with the primary database using synchronous replication. In case of a failure in the primary database, RDS automatically promotes the replica to the primary database. This provides a highly available database with automatic failover capability.

B. RDS with Read-Replica deployment: Read replicas in RDS provide scalability for read-heavy database workloads. Read replicas are asynchronous replicas of the primary database. They can be used to offload read queries from the primary database, but they do not provide automatic failover in case of disaster recovery.

C. DynamoDB with Global Tables deployment: DynamoDB is a managed NoSQL database service provided by AWS. It provides scalability, performance, and durability for non-relational databases. With Global Tables deployment, AWS automatically replicates data across multiple AWS regions for increased availability and disaster recovery. However, DynamoDB is a non-relational database, and it may not be suitable for LAMP stack applications that require a relational database.

D. Deploy multiple RDS instances: Deploying multiple RDS instances and configuring DNS failover with Route53 and health checks can provide high availability and disaster recovery. However, it requires additional manual configuration and maintenance compared to RDS Multi-AZ deployment.

In summary, the optimal solution that meets the availability requirements for a LAMP stack application on AWS with automatic failover in case of disaster recovery is to use RDS with Multi-AZ deployment.