5 Cost-Saving Tips for Azure

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
as a developer it's important that you understand how to work with azure microsoft's cloud platform however a common thing i hear is the cloud is just too expensive either you can't spend the money necessary to learn it or your boss thinks it's too expensive to move your services to well in this video i'm going to show you five ways you can save money in azure that way you can have the confidence to move your career or your business forward this video is sponsored by my getting started with azure course i created this course to empower users to take full advantage of the cloud with confidence a major focus of the course is on taking away the confusion and uncertainty of azure that includes a heavy focus on managing costs effectively for instance if i had paid for every demo i performed in the course my total bill would have been less than five dollars we set up 14 services over the course of about 13 hours of content and for each we discuss how much it will cost how to minimize that cost and what the best way is to optimize our expenditures so if you're looking to get up to speed in azure in a way that leaves you ready to start using it in the real world check out the link below now let's get started by viewing my portal you may have seen this portal already if you've been watching the timco retail manager series because we've deployed to azure and here in fact are our azure services we've deployed so far so this is not only my place for doing the temco series but it's also a place where i host my own services and build up new services so there's a lot going on in this azure instance and i thought it'd be a great opportunity to kind of take you through some of the steps that i do when i'm thinking about how to make the most efficient use of my money now just so you know i get about a hundred and fifty dollars a month because i am a microsoft mvp so that money is applied to this account and if you look here you'll see that i have about 53 cents left in credit so i'm getting pretty close to the end of my credit and in fact i will go over my credit amount i have been for the past few months and that's because i've been doing my own thing as well as doing demos pretty heavily in azure so that's okay but i really want to keep an eye on that because i am spending my own money once i hit that credit limit i'm spending my own money to go over that so i don't want to just let services run wild if i don't need to so let's see how i tweak and hone these services and the first way comes when you go to create a new service there's lots of things you can do if you go create resource there's lots of options here these are the popular ones but then you've got so many more underneath all of these other options so what do i do before i even start well i go to the azure pricing calculator now if you go to azure pricing calculator in your search just search for it you'll see here azure.microsoft.com en us slash pricing slash calculator or just google or bing the azure pricing calculator and you're good to go so let's go here and look at how to use this this is a incredible tool for helping you save money that's especially true if you are making decisions about which service to use one of the things i hear a lot is well i'm going to put a virtual machine in azure and then use that for my website well if you did that i recommend you click on virtual machines here and it's going to create a calculator down below it's going to pop that up in just a minute there we go and now you can do your calculations to find out how much it will cost now by default they set some things up for you so for example it says i'm in region west u.s well i'm actually in central u.s this may change the costs a little bit depending on where your region is now notice up here it says in the upper right hand corner it says monthly is expected to be a hundred and fifty four dollars and eight cents that seems rather high to me so you can come in here and make some tweaks it's a windows operating system operating system only well what if we want sql server well now you've changed to 1249 dollars a month that seems a little too much so let's take that to operating system only tier is standard low priority and basic you say well you know what it's not a big deal i can go low priority okay now we're down to 61 dollars a month what about basic now you're down to 13 and 19 cents a month okay you may say well what's the difference well down here it's going to tell you so for example instance i have one core .75 gigabytes of ram and 20 gigabytes of temporary storage it costs me just just under two pennies an hour which works out to 13 and 19 cents a month so by doing that you can say okay well i guess that's gonna work or you know what that's just not enough ram i bump it up to this one now we're at 25.60 a month what this allows you to do is plan before you build because you can look at this and say that's just too much money and then you know before you start don't start something and then figure out how much it's going to cost because the calculator will tell you how much it will cost or at least estimate for those things that are based upon usage so with this what it's saying is we've got a basic operating system only windows installation of a virtual machine with 1.75 gigabytes of ram 40 gigabytes of temporary storage it's going to have one virtual machine which is going to run for 730 hours also known as one month you can change that to months and see one month there but that way you can say well i'm gonna you know only run for half the month and and show how it look as far as license operating system license is included as is pay as you go so what that's going to do is it's going to provide you with a windows license to run a virtual machine in the cloud just because you're running azure doesn't mean you're exempt from paying for licensing that's why the sql server was so expensive because you're paying for a sql server license now if you have a license you can put on there with the azure hybrid benefits you might do that now there's also managed disks you can add different type of hard drives for example a standard hard drive which is a spinning platter or a standard solid state drive which is much faster and you can say well i want one disc gigabytes no i want something more like 256 gigabytes what's going to cost you 19.20 a month but you've got a solid state hard drive to work with storage transaction you're going to um a hundred transaction units which is ten thousand transaction units times point zero zero two um dollars an hour that's gonna be hard to estimate i understand that because you don't necessarily know what the transaction units are or how many you're going to do based upon your usage what i would do is use the defaults at first but then do some research there is up the top here there is this information bubble right next to the name of what you're doing click on that you can go to documentation and product details as well as pricing details that will break those three areas right there will break down all the information you need about this specific thing that way you can learn more about why you're paying so much now let's just say for instance that you were thinking to do a sql server installation you know run sql server on virtual machine in the cloud and you look at that bill and say even for a basic i am paying which is way underpowered for sql server don't do that you really want to have a standard and you want way more than that you probably want um let's go with an a4 8 course 14 gigabytes of ram at the very least so you're talking about 2700 a month and you look at that and say that's outrageous we can never afford to have sql server in the cloud this is why i say that coming to the pricing calculator can help you make decisions about how you're going to work with your azure account what you're going to do and not do is you say you know what that's way too much we're not gonna do that and this is why i don't recommend virtual machines for most instances because you're not getting any of the benefits of azure except a hosting platform for a virtual machine that's about it there's lots more benefits to azure and the course goes way more in detail with this kind of stuff but let's just say that we wanted to have sql server in the cloud we said our first thought was a virtual machine with sql server on it we say nope that's not going to happen 27 100 is way too much i'll come back up here and see what your other options are how about an azure sql database okay well it's a little cheaper it's fourteen hundred dollars and seven or fourteen hundred seventy six dollars and forty three cents which that's still very expensive it's way too expensive for most people now businesses that might be the right choice but you start come over here and play the pricing well let's go to central us first single database or elastic pool we cover that in the course but this is a really cool option if you are a business but for a single database this is fine backup storage is fine purchase model dtu or virtual core right now we're on virtual core again this information here will talk more about those details but let's just say that you knew that dtu can be a cheaper option which it can be let's choose that one did you see that pricing jump that is not a pricing mistake a sql server database in the cloud can cost you as little as four dollars and ninety cents a month so when you look at that virtual machine twenty one hundred dollars whatever it was twenty seven hundred dollars um a month for maybe with a demo database or something small you might get discouraged but if you play around you find out oh i can get a pretty cheap option here for four dollars and ninety cents now is this going to be the the slamming sql server that can host 100 000 people no it won't be but if you didn't notice down here we have five dtus because we've got the basic server plan well he bumped up the standard well now we're at 14.76 or 72 cents but now we have 10 need to use what if he wanted 20. now a dtu if you're not familiar well again this link will tell you more about that but it's a data transmission unit calculation based upon the usage of the cpu the ram and i believe the transmission across the wire it's a an amalgamation of those three numbers so it's not something you can easily calculate based upon how much load you're going to have on your database well what it's going to do is basically slow down your database if you have too many people trying to hit it but you can always scale up a service as you need it but to start off with even at this this uh standard rate you're talking about less than 15 dollars a month and then we want to bump it up well now there's 30 a month but you've doubled your dtus and just so you know this is kind of a side note but the the azure sql databases can replicate from your local database on your local network so i've done that where you make the azure sql database your backup database or your fallback database and then you switch over and make it the primary database and your local database be the fallback database so a lot of cool stuff you can do starting at 4.90 a month so just using this calculator you can play around with it and say you know what let's compare this to mysql so you search for azure database for mysql notice it put down below here it say okay 138 dollars a month but you know not to be too freaked out yet because you can look at well are there other options basic that sounds great sixty dollars a month well a little expensive still how about 35 dollars a month that's about the cheapest you can go with azure database for mysql about 35 a month that includes five gigabytes of storage so an additional backup storage we've got a hundred gigabytes we could make it down to 10 we're down to 26 oh nope 26 from monthly costs oh don't ignore this one this is the cumulative of both i often get those two mixed up but if you if you look at the top here for a specific one or at the bottom of that one it will take the monthly cost which we've gotten down to 26.32 so not as cheap as a sql database which makes sense i mean microsoft owns sql they do not own mysql um they've optimized sql and so on so there's a very very cheap version for a sql database but by playing around in here you have been able to figure out what's your lowest cost going forward even if you are locked into microsoft sql you now know what your options are a virtual machine or different levels of azure sql database and what those costs are so the pricing calculator is your friend now when you're done you can just either save it or you can start deleting all or delete specific ones let's delete all and now your calculator is clean again you can start over with different things for example azure functions or whatever you want to test out so tip number one use this pricing calculator it may seem simple but it really does save you hundreds of dollars potentially a month just by making the right choice all right let's go back to the portal and if you haven't noticed i'm using microsoft edge which is actually chromium based and one of the nice new features is this vertical tab i love it and you can pin these but i like to have them collapsed just to have more screen real estate so let's go back to our azure portal and this next one is one that people often overlook when you create a resource let's just create oh i don't know a um well a sql database cool we're gonna we're not actually gonna create it but i wanna show you um by the way here's a quick s this is a bonus tip number one um when you go to create something make sure you look at the pricing down here configure database you go back to standard and premium now your um five dollars a month okay so 4.99 they said four dollars and 90 cents in the calculator 4.99 here i'm not sure the difference is but there is a slight discrepancy so there you go so we've we've configured it now for 4.90 uh 99 cents less than five dollars so but the next tip is about your resource group notice this resource group right here this is important that you take advantage of it now a resource group is free it's there's no charge for resource group all it's doing is grouping your services and things together so you can create as many as you want i have one called delete me that's probably from a demo but when you create a resource group you can name things and connect things together so let's look at let's create this let's go back to the search and search for resource groups and in resource groups you'll see all of my resource groups let's just pick one and we're going to do i think i'll choose uh this one first storage resource group then i want to show you something else a bonus tip number two is coming up so this resource group here's all the resources inside of it what this does it keeps all your your connected things in one group but there's more to it than that because you can also when you're done working with it you can delete the resource group now what this will do is it will not only delete the resource group but it will also delete all the resources in the resource group which is a big deal you don't want to do that accidentally but what that allows you to do is let's just say you want to test something out well create a new resource group maybe called delete me and then you test all the things out you want to in that resource group when you're done you go to the resource group let me just even look there's nothing in here uh you delete the resource group so you have to type the resource group which is a name delete me and you can delete it and that will delete the resource group and everything inside of it now there's another benefit of having that resource group this resource group here is for a friend of mine he runs a dry cleaner and fur storage site and one of the things he wanted me to do was find a place to host his website now his website's very very simple so i didn't want him to be paying lots of money per month so i used azure you may say well azure's not the cheapest thing to host website well actually it is let's look at his website first so i've actually got saved here so let's go to it and this website is a very simple website a little bit of javascript and some images and so on all right that's all there is to it single page not a big deal well why would we pay even five dollars a month to host this so if we look at this resource group one of the things you can do is go to cost analysis and see how much this resource group is costing me and i think you'll be surprised so this is near the end of my month so this is a perfect time to look at my costs and as you can see this chart looks scary i mean look at that those prices just jump right up until the actual cost which is about a penny so it has cost about one cent to host this website for the entire month that is with ssl that is with a custom domain name so if you look it's secured it has a custom domain name this is not a an azure domain name and yet it's cost me one penny to host it that's because this entire resource group is costing me one penny a month so it comes time to evaluate what should i get rid of what should i not keep when i look at this resource group i don't think let's get rid of it i think let's ignore it because it's not costing me anything in fact there's actually extra stuff in here this cheap hosting plan i don't think it's hosting anything that's why i moved from it's actually a free hosting plan but i haven't deleted it yet but azure key vault we're using azure a storage account the cdn profile and endpoint and also application insights all of that is running for this one website and it's costing me about a penny a month so if you want cheap website hosting now it's not a c-sharp application it's just a html css and javascript application but you could host a blazer web assembly app there but it's costing me a penny a month so bonus tip number two is look into azure static web apps i'm gonna cover that on this channel in the future um but azure static web apps are a great way to save lots of money on really tiny web applications or web applications that don't need uh the server-side scripting so if it is just html css and javascript even your angular applications they can be azure static web apps with ssl with a cdn with i mean lots of great features all right so that was bonus tip number two but tip number two was to use these resource groups and then when you're done with a resource group delete the entire resource group so you make sure you delete all the things associated with it one of the things that often happens is like for example i created this cdn for the first storage well it also created this endpoint so it created two things well if i delete one i'm not necessarily guaranteed to delete both but if it's in the same resource group and i delete the resource group it deletes everything so even if your service creation create additional things it's still going to get rid of all of those things got to clear up the whole thing and not leave things hanging out there to be cleaned up later or to sit there and just accumulate cost so that's tip number two use the resource group to delete everything when you're done tip number three is about budgeting so let's look at my subscription just type for subscription and find a subscription in this case i have just one most people do so in my subscription i have a cost by resource and a spending rate and forecast this is a great thing to keep an eye on this will give you a good overview of what's going on with your your azure account it's gonna tell you just how much you're spending and how close you're gonna come to whatever um goal you have for spending for example my 150 credit that's that blue line right there and notice that if we zoom in here i am going to get beyond that this month the forecast is 158.75 which that's 8.75 above my credits so i'm gonna spend less than ten dollars this month but i've actually spent a lot more than that in previous months before i went oops i missed something i can review these things and have done the things that i'm talking about right now so the tip number three in your subscription is to look for this budget and this budget here will allow you to set up a budget notice i have a budget called overflow budget and my overflow budget let's click into it is i have set up a budget of two hundred and fifty dollars now with azure you're either gonna be pay as you go or you're going to have a just use the free credits so if you're having if you have credits you can say just use those free creds and no more and turn everything off once you hit the limit or basically charge me and continue to charge me until the month is over i wish there's a middle ground there somewhere where you could say hey you know what i want your limit to be in this case 250 don't spend more than that but that's not how azure works so instead we can set up this budget now if i spend more than 250 azure will just keep going you'll keep spending the money it's not like this is a stop point like i want but what it is is a set of speed bumps that i can put along the way so i've said you know what the most i should ever spend in a month on azure is 250 but i don't want to be satisfied with spending that much money in fact what i want to do is i want to put some speed bumps along the way so i know when i am hitting certain milestones so milestone number one for me hundred was fifty dollars when you hit that i want an email which is sixty percent of my budget so email me at my email address and say hey you know what you've hit your budget alert there is a um a budget alert at this amount you've hit this because what i can do is look at that very quickly and go okay i know i'm going to spend more than 150 a month but if i get this email and it is five days into the month that's a problem if i get this email and it's 25 days into the not the month the billing cycle if it's 25 days into the 30 day billing cycle then that's not a big deal but if it's five days in that's a big deal so just getting that email allows me to gauge where i'm at without even going to the portal now i was doing some extra things a couple months ago and i was doing some work and i went well past this budget amount and so i've actually hit this next watch this 80 threshold for 200 a month so i got this email i'll show you the email this email comes through it says you have an alert for budget overflow budget your total spend for is now 311 dollars and 14 cents exceeding your specified threshold of 200 i blew past it um just note that's the actual value i'm gonna be spending hey check it out and maybe you know figure that out so i got this email and let me know oh there is something to evaluate and make sure that i address now i did and of course that was an email that i knew was coming because i had seen the previous ones come through but i want to save that and kind of show you what that looks like so how do you create a budget well under budgets you just say add now let's walk you through the the steps here you give it a name this is our test budget and the reset period is monthly i prefer to see monthly because that's what azure bills you on and because also i don't want to wait until the end of the quarter let's just say my budget is 150 a month that would be 450 a quarter if i say well my budget's 450 dollars and i'm gonna wait until eighty percent of that's spent to get an email well what happens if five days into the quarter i get an email it's kind of too late to do much about that right so i like it the shortest period possible that monthly cycle and then i can adjust from there so creation date you know we can go through today and expiring date you can send it way into the future now the budget amount you say how much you're going to give based upon your their threshold amount now that had estimated before it walked out i mean it's i think 219 but let's just say my budget is actually more like uh 200 okay and then i can hit next and i say okay what conditions do you want to happen well i want when it's based upon a forecast of 60 i want you to do none you can set up action groups if you want with more smart stuff you can take none though and just put in a recipient don't double at it but then from there you can do forecast amount or you can say actual amount here and say when you actually hit 60 80 you can say another one for actual at 50 you know or actual ads 20. whatever you want to do and then right now it just emails me but if you want to create and set an action group you can do that and then the action group can be get a text message or get an email direct email and so on so for me it's just send me an email when it hits these thresholds this is probably too much the the 20 but um but you know it's up to you once you're done oh and and you can actually change the the language that comes in which is kind of nice and then from there you hit create once you do that i'm not going to do that but once you do that then you get this uh this right here which is my budget which you can see based upon the progress of the month where we're at and how much i'm spending so this page gives you a great overview and this page gives you an idea this is how much you're going to spend this month but this budget alert will give you a heads up even you're not in the portal actively looking at it so tip number three is to use the budget set up a budget set up your speed bumps along the way so you're making sure that you watch out for it don't just set a speed bump at the top of the budget again if you hit the top of the budget and you are five days in that's a problem so you want that speed bump to happen a lot earlier i do it 60 80 and 100 but you might want to set yours a little lower than that i am pretty active in the portal and keeping an eye on my expenses but you might want to set your first one at 20 because then you know just how fast you've gone through your your budget and maybe set one for expected at your 90 range or something like that so that once the portal says oh nope i'm expecting you to spend more than 90 of your budget it sends you an email lets you know because that might be on day one if it is then you can look at that and see how much to expect it is and if that's acceptable or not so lots of different ways you can use this budget to really inform you when there's going to be any kind of surprise you don't want surprises when it comes to your bill you don't want to forget that you left on a ten thousand dollar per month service you want your budget to tell you immediately that there's a problem and that's where both the estimate and the actual budget alerts can help keep you on top of things without you having to be in the portal all right now tip number four we're gonna stay right in our subscription again if you search for subscription you'll find the subscriptions and they can choose the one that you're running under should be only one usually but in here we're going to look at all the charges we're being charged this month and how to really read that information this is tip number four let's go to cost analysis and cost analysis there's actually a try preview here and i want you to use this because even though this gives you some good information here and if you wanted to do it this way this could be fine okay service names which one do i cost you the most this month azure app service is going to cost the most then sql database and so on resource groups which one cost me the most web hooks then the lead magnets group and notice i can say okay i don't really care about the first storage resource group because it's costing a penny but i do care about looking at web hooks and lead magnet group because those two combined cost me over a hundred dollars a month so you can kind of dial in and see which one you want but this try preview here if you select the new cost analysis view and hit close and then reopen the cost management view you will see that there's an additional option here called cost analysis preview we're just in cost analysis but we're going to look at cost analysis preview which gives you a different view and i like this view a lot better so this shows me the list of let's see if we can zoom in a little bit here zooming into the portals is messy um so no we cannot that's the best we can do sorry um the can we nope shrinking down does not help um oh hey look at that we can shrink down these groups and then we can zoom in okay probably a little better to read sorry about that um but these resource groups here tell you it tells you how much the resource group is gonna cost you this month or has cost you this month and it sorts it by most expensive to least expensive and when you are looking at how to save money it makes no sense to spend time on things that cost you very little to no money if you were not looking at the budget and you looked at first storage resource group and you noticed how many things were in now it's only list two right now because the only thing is costing me money in there but if you look at the actual resource group you would notice man there's a lot of stuff in there that must be expensive let's see if we can cut it down let's see if we can get rid of that key vault well the key vault costs you nothing so no this is why this view this cost analysis preview which may become the regular view at some point but this view right here is so helpful because it orders it and it shows you this web hooks view is costing you 38 but then you can expand it out and look at inside there what's costing me the most in here well again that key vault is less than a penny so not cost me anything it's when we look at this right here the webhook app service that we see 23.58 a month so this is the most expensive thing in the most expensive resource group if i can make an adjustment here that will have the most impact on my bottom line so let's look at this app service plan you actually click on it and go right to it and one of the nice things about azure is that for almost every service you have this option here to scale up or scale out and scaling up will allow you to actually scale down so click on scale up you can see right here that i am currently known as the the blue border around this s1 this is what is currently being used is the s1 production uh tier which has cost me about 43 and 80 cents a month okay so if i want to go cheaper i can look at the other plans and go those aren't cheaper additional plans um those aren't cheaper either so what do i do well i can go down to dev and test and i can look at well free is getting a lot cheaper but maybe this one right here at 32 dollars a month i'm going to zoom back out a little bit to get a better view of this so 32 a month that's um a little better than 43 a month but notice down here the things that we get traffic manager daily backups ten times a day five staging slots up to ten instances whereas with this one right here we don't get any of those manual scale and that's it so we're losing a lot there but we can see additional options and go oh well there's this one but it's 64 a month so you can at least look at this and go okay it makes sense i think we're good at this level it's the cheapest one we can get for what we need but then you can also look around look at the the s1 for a standard one versus the pre or p1v2 which is premium one notice this is just for comparison sets you have to understand what the what these mean but 100 total acu versus 210 acu um twice as much ram and a um a dv2 series com compute equivalent this is a better system but notice that it's only less than ten dollars a month difference so you could say well we were looking at costs and saying okay is this the right cost for us but we could more than double the performance of the web server for ten dollars a month and well normally when you're looking at your budget you want to cut costs where possible it sometimes makes sense to look at this and go hey you know what let's spend a little more so let's zoom out here a little bit more um and look at these these features here and we can select this one and notice we now have 20 instances 20 slots 50 times a day backup so a lot more stuff in this one and we're spending ten dollars a day more so we came into this looking at can he save money and he said well no but maybe he could spend a little more but maybe we're the opposite maybe this is what we're on right now we can say you know what we don't need all of this what we're doing we could drop down and save 10 a month and not lose anything vital if that were the case when we did make that selection you just hit apply it would take a little bit and now you're paying at the new price which would be ten dollars a month cheaper if that's the way we're going but op is the one that's more expensive or is the one that we'd be going to so hit apply now and that's when it would do the the switch over so this scaling will allow you to look at can i save some money when you're done go back to click this cost management and you're back to where you were you say okay there's nothing there i can save money on how about the sql server go this one this costs you 7.68 so far okay let's come down here actually for a sql server you have to go into the server itself so you click on that now we can come down in here whoops i was wrong with that sorry go back to your database and in the database they move these things around unfortunately doesn't say scale up but what it does say is compute plus storage click on that and right now we're paying for the standard workload which is 10d to use for our server but what if went back to basic and basic is now five dollars a month instead of the fifteen dollars a month notice down here where we're seeing them the dollar amounts um we could cut this price in a third so i could look at that and say hey you know what we're not using a lot of these dtus notice the um the dtus i have 10 the dtu percentage is 2 utilization which means i absolutely could scale back to a basic which is going to take this down to half the dtus would be now the max because we're down five instead of ten but that's not a problem because i you can see this chart right here saying i don't need anywhere near that much well now i've saved ten dollars a month just by hitting apply then you can go back to um well this car does changes and unfortunately this didn't lose us our place let's go back to subscriptions select it go back to cost analysis oops try preview unfortunately the preview thing turned off but good go to preview portal um because that will actually take you to a new page with the with the same portal but with now the um the cost analysis preview and some other things so let's go back here and if we want to we've now identified that we can save in this resource group about 10 a month all right so that would get me below the 150 limit so right there i have now figured out how to not spend money on azure this month well not this month because i've already spent most of it but next month for sure and if i had done this analysis earlier in the month i would have been able to save that ten dollars coming underneath the limit now again you're not done you can go the next group down and look at the cost here and again the lead magnet app service plan 23.94 a month notice we have a whoops we have a service plan for web hooks and we have one for the lead magnets let's go let it refresh sorry um when everything's clickable in the azure portal and if you're not carefully go the wrong spot and then it takes a bit for it to remember its brain let's refresh here let remember its brain there we go so we've got a a plan in here and a plan here both of which are app service plans now for me particularly this is actually important because it provides some separation of concerns i have two very different systems that i use for very different things so i wanted that separation but in general if you have an app service plan you want to stuff that thing so full that it screams you use every bit of processing power in that thing you can put as many websites as you can in there so that you're taking full advantage of the cost you're paying in my case i know that i'm not taking full advantage of the cost i'm paying i have two different app service plans that aren't being utilized their fullest and i notice i'm paying so far 23.94 cents a month for a total of 43 dollars a month each so i'm paying an additional 43 a month that i don't need to so eventually i am going to rectify that and get rid of one of them but i'm not ready to do that yes i'm doing some transition period but that's something to keep an eye on you have two app service plans why unless this one's maxed out there's no reason to have a second one and if it's maxed out maybe just upgrade this one to a bigger one instead so that's what i encourage you so tip number four is to review your charges look at these charges in the cost analysis i prefer the cost analysis preview because of how easy it is to see this in a spreadsheet type view but review these charges you can actually download this if you want i believe it downloads a csv but review these charges and make sure that you're not double spending on a service or that you are over paying for a service or something like that so review these and review the biggest ones first get the most bang for your buck get the the biggest return on your time in your review all right there's no reason to spend any time on the ones down here unless you know for sure that you're not actually using it and then yeah it's 17 cents a month but 17 cents that you don't need to spend so get rid of it but for the most part start your analysis at the top again since you use resource groups it's much easier to understand what the things inside of it are for if you don't use resource groups well then you might have a jumbled mess of azure services you're afraid to delete because you don't know if they're affecting if they're needed for something else and that's where you really get into the costs because you're holding on to services that might not be used at all but you are really afraid to make any changes to them okay so use your resource groups to help you organize your services so you know what services are associated with what services um so with that that is tip number four review your charges tip number five this is one that people don't often understand so let's look let's go back to the home actually let's go to um let's go to my my desktop instead or dashboard so oh this is the preview portal sorry um go back to here and go to dashboard there we go so when you have a web app i think this one's too small um let's get a peek at it yes we've not upgraded this one but i do know that i have two service plans that do so let's go to my um my resources i'm gonna look for the web hooks because in the web hooks i have an app service resource plan inside there i have an api okay this is an actual api we're using if you are um yeah we're using this eight with api we'll talk more about in the future but um this is a real api so this resource plan one of the things it has is what's called deployment slots right down here and right now this is our production deployment slot well we can add a slot and you may say what's a slot why would we add a slot so let's add one let's call this one i don't know development let's keep it all lowercase all right and we're going to not clone any settings we could if you want to we're not going to for this instance notice let's zoom in here it says the url is going to be webhook receiver api dash development.azurewebsites.net why it choose that well if you come over here and if we were to go back and look at this webhook receiver the url for webhook receiver is webhook receiver api dot azure websites.net so by adding a slot it adds a dash and a slot name so dash development so it's got a full url that's unique to this particular slot and hit add and what this will do is basically create a total duplicate of your website spot okay so our api has certain resources available to it it has um the ability to do certain things like talk to key vault and so on well this can do the same thing if you want now i didn't copy any of the data over but now you click on this it's like it's a whole web app you can even go to this web app which should probably time out or say you know blank page yep there's a blank page so why is that helpful well we're paying for i'm paying for the um the whole hosting plan for this webhook receiver api this is this can be a this could be a production app let's just pretend it is so this production web app well what if i wanted to have a staging server that was nearly identical to my production settings because the closer is to the production settings the easier it will be to find bugs before they get to production well you create a slot for that what if i wanted to have a development server my developers could all work on and try out new things that was as close as possible to production well we just did that right there so i could deploy my my new changes to this slot now i can test it out now i have a fully functioning test server without doing hardly any more changes i would just need to point to the right databases for development and so on so now this is a development server and i have a staging one i give a pre-production one so with these slots i can have different stages of my process of deploying my site and the coolest part is that when you're ready you can do what's called a slot swap and what that will do is it will take two of your slots and swap them and make what was the development site for example now the production site and it will change everything over so it's pointing to the production stuff and so on basically your users will never know that it is that they have swapped over to a different place but you've just basically done a mid-week midday deployment with without causing any downtime so really cool stuff there we cover that more in the course but the point here is that you can have a development environment a staging environment a testing environment a qa environment a pre-production environment and a production environment for no extra cost and very little extra setup so you don't have to have a separate website with a separate app service plan and a separate bill in order to get all those things for every website you have even cooler if you wanted to you could start putting some traffic towards another slot maybe you have a an a b test you're running where you want five percent of your traffic to go to this other site well i'll just put you know five percent in here and now notice that 95 will go to the main one five percent will go to well it probably shouldn't go to development but let's just say it's you know a b test version or you know b version whatever you want to call it well you can send five percent of your traffic there and see how the test goes or maybe go all the way to 50. and now you've got a 50 50 split between two different versions try them out see which one converts better and then make that one the primary one so lots of stuff you can do like that with these slots they can save you a lot of money there is no reason to have multiple app service plans for one site you don't need to have a separate development one versus your production one you can keep them all the same and just have different slots each slot is treated as if it's its own site and yet so it can have its own permissions it can have its own connection strings it can have its own uh secure key vault connection everything but it's all under the same main service that way you can have something as close as possible to production and yet be in development mode or staging mode or whatever and that's a big cost savings and it's actually even better for your process so that's tip number five is to use those slots for your dev and your staging environments in your production web applications now you do have to have something large enough notice that that one site i went to a web app i went to didn't have slots because we weren't paying enough we were paying for the the very very cheap plan but for anything production related this is going to essentially be a free dev environment for your team so that's another way you can save money in azure so just to review the five tips i gave you one is to use the pricing calculator to save you money two is to use resource groups to delete everything the bonus tip number one there was also to use that resource group to look at the costs for just that group and then tip number three was to use a budget to put those speed bumps in place so that you are paying attention or so azure is paying attention for you to your costs and that you don't get a surprise at the end of the month tip number four is to review your charges in your subscription and look at how to do a cost analysis on the most expensive things first and then tip number five is to use those slots for deploying to your dev environment your staging environment for free and then uh bonus tip number two was to use azure static web apps to host websites for basically free i mean as one penny as we saw for that website so those are your five tips plus your two bonus tips um let me know down in the comments what other tips you have for saving money in azure now i hope you enjoy these tips if you want to dig even deeper and learn a lot more about azure don't forget to check out my getting started with azure course every course purchase goes into supporting more free content like this thanks for watching and as always i am tim cory [Music] you
Info
Channel: IAmTimCorey
Views: 8,204
Rating: undefined out of 5
Keywords: .net, C#, Visual Studio, code, programming, tutorial, course, training, how to, tim corey, C# course, C# training, C# tutorial, C# app start to finish, timco, timco retail manager, wpf, asp.net, .net core, asp.net mvc, autofac, c# solid, c# solid principles, dependency injection, tdd, unit testing, xunit, moq
Id: wMeoLA05uwI
Channel Id: undefined
Length: 59min 0sec (3540 seconds)
Published: Mon Apr 19 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.