High Availability Design Example

HA
Scenario

You have a website that requires a minimum of 6 instances and it must be highly available.
You must also be able to tolerate the failure of 1 AZ.
What is the ideal architecture for this environment while also being the most cost effective?
3Availability Zones with 3 instances in each AZ.

There are a number of ways you can optimise performance above that of choosing the correct EBS type.
One of the easiest options is to drive more I/O throughput than you can provision for a single EBS volume, by striping using RAID 0.
You can join multiple gp2, io1, st1, or sc1 volumes together in a RAID 0 configuration to use the available bandwidth for these instances.
You can also choose an EC2 instance type that supports EBS optimisation. This ensures that network traffic cannot contend with traffic between your instance and your EBS volumes.
The final option is to manage your snapshot times, and this only applies to HDD based EBS volumes.
When you create a snapshot of a Throughput Optimized HDD (st1) or Cold HDD (sc1) volume, performance may drop as far as the volume's baseline value while the snapshot is in progress.
This behaviour is specific to these volume types. Therefore you should ensure that scheduled snapshots are carried at times of low usage.

Additional clones of your production environment, ElastiCache, and CloudFront can all help improve your site performance.
Changing your autoscaling policies will not help improve performance times as it is much more likely that the performance issue is with the database back-end rather than the front end.
The Provisioned IOPS would also not help, as the bottleneck is with the memory, not the storage.

Stateless Application

The essence of a stateless installation is that the scalable components are disposable, and configuration is stored away from the disposable components.
The best way to solve this type of problem is by elimination.
Storage Gateway offers no advantage in this situation.
CloudWatch is a reporting tool and will not help.
An ELB will distribute load but will not really specific to stateless design.
Elasticache is well suited for very short fast cycle data and is very suitable to replace in memory or on disk state data previously held on the web servers.
RDS is well suited to structured and long cycle data, and DynamoDB is well suited for unstructured and medium cycle data.
Both can be used for certain types of stateful data either in partner with or instead of Elasticache.

Exam Questions

Difference between scaling out and scaling up?
Scaling out is where you use Auto Scaling Groups and you add more EC2 instances if needed.
Scaling up is when you increase the resources inside our instances, like going from a t2 micro to a m5 or add more ram ect.