How to Manage Fault Tolerance with Availability Zone and Regions in AWS

What are Regions and Availability Zones in AWS

AWS infrastructure is available across various geographical region.  Usually regions are across continents of countries but for large countries like US there can be multiple regions.  Each regions is divided into 2 or more Availability zones which are nothing but collection of data centers which are connected to each other with high speed connections.

These data centers are separate units which are located away from each other so that if any calamity happens around one of them the other data centers can take care of the load.   These data centers are located in highly secure buildings with power backups as well as multiple network connectivity.

How Regions and AZs Help in Achieving Fault Tolerance

Availability zones constains data center which are insulated from failures in other data centers.
 If a particular data center goes down then also application will not go down as other data centers are insulated.  AZs have low latency high speed connection between the data centers.

Usually fault tolerant systems have instances across different AZs in a regions.  It is highly unlikely that all the AZs in a region would go down at the same time.

Example architecture of multi AZ hosted Application

In a multi AZ hosted application where you have web, backed and database layers and the layers are hosted across two AZs in a active - active scenario then traffic is distributed by the ELB across the two AZs.  When any one AZ is goes down in that case other AZ can take over.

Another scenario is active - standby scenario where one set up is active but the other set up is is a standby mode. However data replication happens from the primary to the backup.  If active AZ is impaired then the standby database is elevated to be primary and the traffic is routed to the new database.

For active - active setup, ELB can be used to direct the traffic to different stacks which can be hosted as separate stack in same AZ or across multiple AZs.

What if You want to Achieve fault tolerance across Regions

ELB can work only within same region. For fault tolerance across multiple regions you would need Route 53.

Comments

Popular posts from this blog

Some Important Architectural Considerations

Role of AMIs and EBS in designing Fault Tolerant Systems