Hi guys welcome to this video where we're going to take a look at devops could you afford to miss this video probably not because more and more infrastructure is changing over the years and as developers even if you're just a front-end developer you're still going to need to know this knowledge .
And you still really need to understand how to host correctly and what packages to choose correctly and if you don't make the right choice it can end up costing you rather a lot and sometimes it can end up being too difficult to host a particular application so then .
You go with more expensive vendors that usually cost you money if you don't want to end up like that go ahead and watch this video and hit that like button hit that subscribe button if you want loads of free content like this one that's sharing knowledge and information so first of all what is standard sort of .
Server technology well standard server technology as we know servers are computers they've got ram cpus and so forth and they're normally server grades so they're a little bit more expensive than your average computer they're designed with failsafes in so that your website can still be served .
Out most traditional hosts have something called shared hosting which is a giant computer rack and this rack contains many many computers with lots of cpus lots of ram and lots of hard drives and also they offer a dedicated host when your site starts .
To get more popular you can't no longer have a shared vested interest in in the server rack because you're using too much so then you have to go to a dedicated host when you start becoming really popular or you start streaming media for example this can also be a very expensive process .
But what does that really mean well with shared hosting you're you're basically saying i'm using this resource i'm using two gigabytes of ram i'm using 500 gigabyte hard drive i'm using maybe one cpu or the cpu normally will be shared and so you're sharing the cost of the .
Hardware and the services to run the hardware those shared servers need to be maintained they need to still pay an isp for a one terabyte connection usually as a server hoster and of course if you start using too much bandwidth and too much processing a memory you have to go to a .
Dedicated host just like you going down to your computer store buying a computer plugging it into the internet that is a dedicated server that's what the server companies are doing they have a dedicated computer obviously there's a lot more involved in networking and security but normally they get a computer plug it in and you .
Pay a rental price for that hardware so really what i want you to take away from what standard sort of hosting is which is just basically you are paying for a set amount of hardware each and every month .
And so you're just paying for that now probably going well serverless we still have servers right with serverless you're still going to have to have a computer right there's still got to be a computer there with ram and cpu to deliver your content to the masses over the network but the difference with .
Serverless technology is that you're not actually paying a shared price for that server or a specific price for that dedicated host what you're actually paying for is compute power and serverless is a lot more flexible and this will become .
Apparent when you actually look at virtual machines which is what we'll do next but serverless doesn't mean that there isn't a computer there doesn't mean there isn't a physical computer serving out your data what it means is you're not paying the set shared price you're not paying .
For the dedicated hardware this is all to do with hardware and how it's being rented from you so with those things they're dedicated to you that's a dedicated all that resource is dedicated to you and whether you use that or not is going to cost you that amount same with shared hosting if you don't use .
Your portion of shared hosting it's still going to cost you that much every month so serverless technology is much more flexible it's still a server it's still a computer but think of it like a virtual machine so i have a computer a box right and that computer i can install virtual machines on .
And what you're really doing is you're only actually paying for the cpu that you're using the ram that you're using and if i boot up multiple vms you can think of these vms as customers i can have a giant computer rack a big computer rack and all i need is one operating system .
And i start booting up virtual machines and depending on how much data you're going to use cpu and ram is normally how much hardware processing power you're going to use that is actually what you're paying for so you're not paying a dedicated price .
For that much ram that much cpu power and data what you're actually paying for is how much you use of these things hence why it's technically serverless you are in a virtual machine this computer that you've got .
Can have several virtual machines on there and those virtual machines you can increase the ram you can increase the cpu and so forth but don't think of it like setting it that way because that wouldn't be correct what you're actually doing .
Is you're saying i could use up to two cpus i could use up to four gigabytes of ram and normally they'd charge a flat price for that but then they will also say for example when you use that amount of ram and i've got all these virtual machines and people log into those virtual .
Machines and they can put their content on there they can upload stuff they can serve out websites and configure their websites and when those websites start using cpu and when they start using ram and when they start using these things okay you can set a baseline so i need .
This much ram i need ideally this much as a base plate but if you go over that's fine too if you go over unlike a dedicated host or classical hosting you have to go to another package you have to go to another tier whereas serverless it just charges you .
For what you're actually using in the thing and if they have to allocate if you say to them right initially i want you to allocate me four gigabytes of ram two cpus if you don't use those things the price could potentially come down whereas if you over utilize them and let's say you start using five gigabytes .
Of ram your website doesn't automatically get shut down what happens is they will charge you for the cpu and memory and if you're saying you're going to use four gigs of ram and a two virtual cpus notice the word virtual cpus then as a result they will .
Charge you a base plate price for that because that's technically what you're saying initially i need that compute power but then if you start over utilizing it because it's a virtual machine because it's kind of more virtual it's not set in concrete like dedicated hosts the virtual machine gets to decide .
How much sort of ram and cpu it will monitor how much ram and cpu you're using and then it will charge you for that usage so serverless doesn't mean that there isn't a computer there but it's more virtual and it elasticates as well this is what makes serverless really great is the fact that let's say my site does .
Really great in certain periods of the month you'll get this a lot with the commerce client so towards the december time people are going to want to buy more stuff okay we need to up the bandwidth excellent you can just stretch that out you can up the bandwidth you can .
Up the ram you can up the virtual cpus virtual ram virtual cpus and of course what's really great about that is you can also decrease that when you don't need it so for example in let's say july time sales drop off naturally do i need all of that compute power like a dedicated host that says nope that's .
You that's your hardware you're paying that price this price grows and shrinks as your business grows and shrinks it's called elastic hosting so what are the pros and cons of each one well with the dedicated server don't get me .
Wrong there are some pros like for example you know what your bill is going to be exactly and number two with a dedicated host you do have quite a lot of control over it uh but the downside the real downside to serverless technology is upgrading okay so you look at shared hosting .
You're renting a section of that hardware for that price you start going over they want you to go to a dedicated host that means you need to replicate everything onto the brand new computer they've just plugged into the internet for you and that's fine now obviously that .
Computer that they're plugging in should be able to be upgradable at some point you know you've got your motherboard right you've probably got a few ram slots empty they could probably add some ram they could probably add some cpus the real downside is when you've maximized the potential of that dedicated computer .
Oh i've got to re-replicate it all over again or i've got to do load balancing with dedicated hosts and then i've got to replicate everything that i'm doing again and so it's a bit of a pain in the bottom now with serverless technology the pros .
Are that number one it can actually be cheaper because your prices can go up when they need to go up when you when you've got more customers and when you've got a down slump you can bring it right down and you don't have to reinstall anything you don't have to change tiers you can do this on the fly now the other .
Really great thing about this technology is that it has all of these compute power all across the board so if i need to expand or detract i don't have to reinstantiate that instance my server my website right all i have to do is expand and contract the actual resources that the website .
Uses and if i go over it's not whoa whoa you've gone over you need to go to no it will just carry on doing it but it will charge you for that extra ram that you've used that extra cpu that you've used that extra disk space that you've used or utilizing and so that is how .
That works all right guys so if you really love this content hit that subscribe button hit that like button i've got loads of more free content for you guys and if you go to the avilex website you can sign up for the newsletter where i'll be distributing premium and free content as well .
Come and join us and thank you very much for watching