LEGO® for the Cloud: Architecting Complex Solutions with Simple AWS Patterns (Part-6 covering Patterns for Relational Databases)
Patterns for Relational Databases
DB Replication Pattern
Problem : Rare, but entire data-center many be damaged
Solution : Use a Multi-AZ Amazon Relational Database Service (RDS) to achieve replication across AZs with ease.
NOTE: Replication across regions: data transfer rates will be applied. Depending on the data criticality decision can be taken.
Read Replica Pattern
Problem : Normally the proportion of reading from a database is high when compared to writing to the database, so you should distribute the reading processes to the performance of the system as a whole.
Solution : A Read Replica follows the writing to a master, reflecting the data to itself. You can reduce the load on the master through using primarily Read Replicas for reading.
Inmemory DB Cache Pattern
Problem : Normally the proportion of reading from a database is high when compared to writing to the database, so you should distribute the reading processes to the performance of the system as a whole.
Solution : Data that has been used is placed in a cache, so that it can be read in from memory (rather than from the disk) the next time it is used.
Note: Evaluate MemCache Vs Redis
DAX if it’s DynamoDB
Sharding Write Pattern
Problem : Multiple database servers to produce performance beyond that which can be achieved through scaling-up, but how to do so is an extremely important issue.
Solution : Fundamentally, databases with identical structures are prepared and divided using appropriate table columns as keys, to distribute the writing processes
Example: MySQL server combined with a Spider Storage Engine on an EC2 instance