AWS RDS Read-Replica
- The geo read replication is available
- The primary database has following records
- The read replica also has the same records
- Now lets add some more records into primary database
- Check in replicated database
- Promote the read replica to support the write operations and disable replication from primary database
- In Multiaz rds two db instances master and standby are created.
- Replication rules are auto configured.
- The endpoint is not directly the master endpoint, AWS RDS will forward the request to server which is working.
- If the master fails, AWS will automatically make standby the master (failover) which is automatic.
- If you have a single AZ database that can be converted into multiaz
- Lets try to create a new multi az database
- Modify the db instance size
- Even while the database is modifying we can still use the database
- Exercise: Is the same true with single AZ?
CREATE TABLE Persons (
INSERT INTO `employees`.`Persons` VALUES (1, 'one','one','one','one');
INSERT INTO `employees`.`Persons` VALUES (2, 'two','two','two','two');
INSERT INTO `employees`.`Persons` VALUES (3, 'three','three','three','three');
INSERT INTO `employees`.`Persons` VALUES (4, 'four','four','four','four');
select * from employees.Persons;
Pricing of RDS
- Factors impacting price of RDS
- database engine
- db instance size
- storage costs
- back up costs
- Refer Here for pricing calculator.
- Reserved instances ( Save costs atleast 25-51% )
- All upfront
- Partial Upfront
- No Upfront (1 year)
- Reserved instances is commitment from customers to amazon for a long duration. Reserved instances will be charged if the database is up or not.
Pre-req’s for tomorrows workshop
Visual Studio Code
AWS CLI installed
Json and YAML knowledge refer here