- July 16, 2017
- Posted by: Manuj Aggarwal
- Category: Cloud Computing
This post will take you through the important concepts regarding AWS database high availability. It explains many concepts such as Amazon RDS, DB Instance, Availability zone, Region concepts, high availability, and Failover Process.
Amazon RDS stands for Amazon Relational Database Service. It is a service provided by AWS to create and operate on databases on the cloud very easily. Amazon RDS lets you collaborate with different database systems like MariaDB, SQL Server, MySQL, PostgreSQL, and Oracle. It provides backup of all databases. Managing databases and managing its administrative task is very difficult, but AWS Database provides you with a very user-friendly and easy-to-use service for managing and doing all the administrative work of database on the cloud.
It is the database instance of AWS DB which is created on the cloud. You can create, delete, redefine and modify database instance in AWS. It provides handling for database security on the cloud.
Availability Zone and Region Concepts
Amazon Web Service creates different Regions which are completely independent. Inside the Region, different Availability zones will be connected with each other.
So all the regions will be completely isolated from the other regions. For Region, Amazon EC2 Regions will be used. Two regions will also be able to communicate in AWS but that will use the public Internet. So for the communication part, necessary encryption methods are used to pass messages.
When you create any instance, you can choose its Availability zone. If you don’t choose an Availability zone, one Availability zone will be selected automatically. You can mask any failure of a database instance in your Availability zone by using the Elastic IP address. Availability zone is denoted by different region code.
It is also known as Multi-AZ. Amazon used Multi-AZ deployment for MySQL, Oracle, MariaDB, and PostgreSQL. Multi-AZ deployment can be established using AWS CLI. In Multi-AZ deployment, the primary DB instance will be replicated with other availability zones to avoid I/O freezes.
Failover Process in Amazon RDS
If Amazon-AZ is available during the failover process, Amazon RDS automatically creates a replica of the Availability Zone. The failover time is between 60 to 120 seconds, but if the database transaction or recovery process is very lengthy then failover process time can be increased.
Amazon RDS automatically handles the failover process so you can resume back your database operation as soon as possible without any more administrative tasks.
There are different ways to check if your Multi-AZ DB has failed or not. You can create a configuration so if any failover occurs, its notifications will be sent by email or SMS. You can check your database even by the Amazon RDS APIs or console. You can also take a look at your current state of Multi-AZ deployment using Amazon RDS APIs and console.
The primary database instance will be switched automatically to replica if any of the below conditions are met:
- If database instance server type is modified.
- If manual failover of database instance is initiated by reboot with failover.
- If the operating system of the database instance is undergoing software patching.
- If your primary database instance is going to fail.
This post explained various important concepts regarding AWS database high availability. If you want to know more about it, have a look at our video tutorials.