Okay.
Hello cloud gurus and welcome to this lecture.
This lecture is on H A architecture.
So this is a theory radical lecture going into your exam you're going to get an awful lot of scenario
based questions around hate designs.
You need to understand it what it is and how to design for it.
So the very first fundamental principle when thinking about architecture is you need to plan for failure.
Everything fails literally everything and you should always plan for failure.
And this is a real picture of one of Amazon's data centers on fire.
Now this data center was actually under construction or wasn't a live one but one of their data centers
did catch fire.
I think it was in Virginia.
I can't quite remember but do you know natural disasters and things do happen.
You should always plan for failure and Netflix actually sort of pioneered this is a great article.
If you go to the link down below and I'll make sure that's in the resources section of the course.
But they created this thing called simian army and this is where they would inject failure into their
production systems.
So things like chaos monkey for example chaos monkey would go in and terminate production easy.
Two instances and I wanted to see how that affected their their actual platform.
Chaos gorilla would go in and you know basically go ahead and delete entire Availability Zones which
simulate an availability zone failure.
And so they've got all these different tools.
I'm not gonna go through them all latency monkey for example is where they introduce latency into the
production environment et cetera et cetera.
I would go check this U.R.L. out.
It is a really really good read but Netflix have always planned for failure and they actually will introduce
failure into their production environment just to check that it does work.
So what is a good example of high availability architecture.
Well let's say we've got our user and our users going to Hello cloud gurus 2019 dot com and that's hosted
at Route 53 Route 53 then sends them to this region it might be EU W1 because they're a European user
and that inside EU W1 we've got our public subnets here.
We've got our private subnets here.
Here's our web servers in two different public subnets.
Here's our database servers in two different public subnets got our NAT gateway in here and then we've
got our auto scaling group as well.
And let's say that each subnet is a different availability zone.
So this is availability zone one A one B etc. etc. and our databases might be doing some kind of replication
they might be doing might be a RDX multi easy deployment or these could be too easy two instances that
you've set up to do synchronous replication and then of course we have our Health Check Route 53 is
performing a health check on this entire region and making sure that it's up.
We then have a another region with identical environments set up and this might be an us e one.
And this is also backed by a health check and then that way if one of the regions goes down or perhaps
it's just an availability zone you've got fail fail over you can fail over from one region to another
or you can fail over from one availability zone to another.
So this is a good example of how a highly available architecture.
So you might get some exam questions talking about highly available architecture so you might have a
website that requires a minimum of six instances and it must be highly available and you must also be
able to tolerate the failure of one availability zone.
So you're always going to need six instances and you can tolerate one availability zone.
So what is the ideal architecture for this environment while being the most cost effective and you have
to go through and have a look at it now costs or straight away we know one availability zone with six
instances in each AC is going to be wrong because that's not going to be highly available if you lose
that one availability zone.
Are you going to lose the entire environment so you got always going to have more than one AC so we
could either start with two aces or three aces.
Now if we had two aces with two instances that's going to be wrong as well because we're only going
to have four instances in total and we require a minimum of six.
If we have three Availability Zones with two instances that will give us six.
But what happens if one of those Availability Zones fails we're going to go down to four and we need
a minimum of six instances.
So therefore we're always going to need three Availability Zones with three instances to meet this requirement.
We're gonna need nine instances in total that way if we lose one AC we've still got six instances that
we'll be able to look after our environment.
So that was an example of a typical exam question that you might see.
So what are my exam tips just remember the following.
You should always be designing for failure you should use multiple bases and multiple regions wherever
you can.
You should know the difference between multi easy and read replicas for RDX a multi easy is for disaster
recovery read replicas is for performance you should know the difference between scaling out and scaling
up So scaling out is we use auto scaling groups and we add additional easy to instances scaling up is
where we increase the resources inside our AC two instances.
So we might go from a t to micro to a 6 x extra large or something like that.
See that's where you increase the amount of RAM or CPE you etc. and you should always read the questions
carefully and always consider the cost element as well.
So sometimes it will say you know how can you do this in the most cost effective way possible.
And then there'll be one answer that's complete overkill that would be super expensive versus a much
more simple way of doing it.
That's cost effective and you should always know the difference.
S3 storage class is going into your exam so remember just standard S3 and standard S3 infrequently access
are still highly available.
The one that's not highly available is either reduce redundancy storage or S3 a single easy as well
so that is it for this lecture everyone.
Now what we're going to do is going to put everything that we've learnt into practice.
We're going to go ahead and create a wordpress site that's highly available.
We're gonna be serving content out of cloud front.
We're gonna be using Route 53 we're gonna be using application load balancers going to be using auto
scaling groups.
Going to be using S3 to store some of our code.
Gonna be doing an awful lot of stuff.
So if you've got the time please join me in the next lecture.
Thank you.