Handling data redundancy
In addition to redundancy at the compute layer (e.g., load balancing across multiple EC2 instances), it’s crucial to address redundancy at the data layer to ensure complete fault tolerance for your applications. Most applications rely on some form of data storage, such as object stores or databases (NoSQL, SQL, etc.), to persist user data or system data required for proper functioning. Running your database on a single EC2 instance introduces a single point of failure, which can compromise the availability and durability of your application, as you can see in Figure 7.6.
Figure 7.6 – A single point of failure with a database
While you can take regular snapshots of the instance to prevent data loss in case of an AZ disruption, this approach alone does not provide fault tolerance. In the event of a failure, you would need to restore the snapshot, which can lead to prolonged downtime and potential data loss or inconsistencies...