Skip to playerSkip to main content
  • 4 days ago
Transcript
00:00welcome to this lesson on scaling a very important concept within compute so what is scaling there
00:11are two kinds of scaling which is possible one is called vertical scaling one is called horizontal
00:15scaling as the name signifies here vertical scaling basically means you are scaling up or
00:21scaling down instant shapes now what can you scale well you can scale compute the course you
00:28can scale memory and some of the other characteristics scale accordingly the the important
00:33thing to keep in mind here is when you scale up or scale down there is a downtime required because
00:38likely we take your machine and we instantiate a new when you instantiate a new shape it actually
00:46goes to another host so there is some kind of downtime required keep that in mind when you do
00:51vertical scaling there is another good practice here is you stop your instance before you do
00:57any kind of vertical scaling there is another kind of scaling which is called auto scaling
01:02or also referred to as horizontal scaling now as as you can see in the picture there this basically
01:10means that you add more vms of the same shape or you take away more vms of the same shape this
01:17enables large-scale deployment of vms there is scale out as you can see from the picture you're going from
01:23one vm to four vms or there's also scaling we are going from four vms back to one vm so both models
01:29supported why is this so popular and and powerful the the reason it is so powerful is it gives you that
01:37scaling capability but it also gives you that high availability in this case one virtual machine fails
01:43others can still keep working as you can as you can see from the picture and the thing which makes it
01:49really powerful is you can match traffic demand by adding removing vms automatically so let's say
01:56you are operating a web store suddenly you start getting more traffic you could easily auto scale and
02:01you could add more vms the traffic goes down you could take away those vms that's how it works there is
02:07no extra cost for using auto scaling so how does it work in in practice there are three steps you have to
02:14follow to get auto scaling and it's super easy to do first thing you do is you have a running instance
02:20on which you want to do auto scaling so you create a template and a template is called a config in in oci
02:27terminology it's basically things like your operating system image your metadata the shape the size
02:34and and some other characteristics like storage networking etc so first you create a stamp you have a
02:40running instance you create a stamp of that running instance the second step is you take that stamp
02:46and then you create this thing called a instance pool and pool is basically a collection of those
02:52instances in advance you you create that and the idea here is you can manage all these instances
02:59as one unit so you could stop all of them at the same time you could start them you could terminate them
03:05and to get high availability you could put them in different availability domains
03:09or different data centers so that's step number two and then step number three is you take your
03:14instance pool and then you write these auto scaling rules on that you start with a desired or initial
03:21size there is a minimum size and then there is a maximum size and you write a rule as you can see on
03:28the screen if cpu or memory goes beyond a particular percentage threshold add some instances or if it goes
03:35below some threshold remove some instances and auto scaling is constantly monitoring your traffic
03:41it's constantly monitoring your cpu usage and it's looking at whether to add instances or remove instances
03:50so as you can see in this picture here we started with an initial size of two and then if the cpu goes
03:56beyond 70 percent we have to add two more instances and if it does you have you end up with four instances
04:02so auto scaling not only helps you meet the traffic demand but can also give you high availability
04:09so that's a recap very powerful feature auto scaling and then we also looked at another way of scaling
04:15the vertical scaling i hope you found this lesson useful thanks for watching
Be the first to comment
Add your comment

Recommended