Check out a free preview of the full Enterprise DevOps & Cloud Infrastructure course

The "Self-Hosted vs Cloud Providers" Lesson is part of the full, Enterprise DevOps & Cloud Infrastructure course featured in this preview video. Here's what you'd learn in this lesson:

Erik addresses common misconceptions about self-hosting being easier or cheaper than cloud hosting, highlighting the complexities and maintenance involved in self-hosted solutions. The decision between self-hosting and using cloud providers should be based on an organization's specific needs, resources, and confidence in managing infrastructure.


Transcript from the "Self-Hosted vs Cloud Providers" Lesson

>> The next thing I really wanna talk about is self-hosted versus cloud providers, okay? And if you're curious which one is which, Guilfoyle, self-hosted, Dinesh, cloud providers. This is a really common question. It happens a lot I don't know why but it almost seems like people think it's easier to go to self-hosted than it is to cloud.

And I think that's like a common misconception. I think it might be because like, I know how a network switch works right or I know how to, plug in a computer and these lower level pieces, I think, is what makes us confident in self-hosting. However, where that confidence is lost is around the management of it, right?

Making sure that it's up all the time, making sure that it's patched all the time. And this is where a lot of that is completely forgotten and lost. So this is a super common question, but in my opinion, I don't necessarily think it's the right question but let's go a bit further.

So should I self host my infrastructure? No, I don't think you should. However, and again, this is a big however, it's up to the organization, okay? That might be my personal opinion but I will say. If you're in a scenario where self-hosting is maybe required, maybe the infrastructure's already been there and there's not much flexibility.

I have people in our community who are talking in our discord daily about the challenges they have with self-hosted. And a lot of the times, it's the same problem, an outage, this or that and these are the reasons why I say no, if you're a company. Now if you're just a person, it doesn't really matter, you're hobbyist at that point you just having fun, but if you're a company who doesn't wanna have to worry about your servers being online all the time, doesn't have to worry about the electrical bill.

[LAUGH] Even into that, what I mean? These are just reasons why you would you would use a cloud provider instead of a self host, right? [LAUGH] It's so much cheaper. Also, no, it's not. This is also a common misconception. And I'm gonna give a good example of this.

So I built a data center before, and when we did it, we spent around $50,000 in hardware for a specific part of our section, right? So we spent $50,000 on the tech, right? And then we spent probably another month in implementation and development, getting it all set up and running.

And not only that, then we also had to hire somebody who was on colocation, so that when I wasn't at the data center, someone else could handle that for me. Those are called like runners essentially. They cost a lot of money. Datacenters don't wanna touch your servers. And so a lot of the times your money even though you're running it in a DC is around maintenance and making sure that somebody's going to the data center often and checking these things and stuff like that.

If you don't have these in place, it's hard to be away from that physical component and know that it's working all the time. And so this is where I don't even think it's cheaper because you have ongoing maintenance that you just keep doing. And that really just comes down to time and money spent on those problems.

And again, as I mentioned before, you'll spend money on engineers, right? You'll spend more money on maintenance and you'll spend more money on security and security is one we didn't even talk about, right? I don't think any of you guys have armored entrances or complete battery backup failsafes or on premise security guards who monitor access to your, these are things that if you self-host it, if you go into a co-location, you're gonna pay for it.

And if you do it completely on-premises yourself, you have to do it yourself. These are things that you just get out of the box with Amazon by simply saying, I'm gonna spend a little bit more on my VPC. And so again, when should I self-host? So here's a good example of when you should.

Dropbox, Dropbox from ending and this is from what I knew a while ago. I don't know if it's still accurate, but I know at one point, they separated their data from the cloud to be on Prem. And a big reason for that was just because it was easier for them to manage the actual data locally for security and things like that, right?

But then all their API's and stuff still existed in the cloud, right? So they just use their on prem stuff for the data storage part of their their infrastructure. Why did they do that? Well, potentially for security reasons, maybe they had to bring the data closer to home so that they wouldn't have to deal with like shoot, what's the European security?

>> GDPR.
>> Yeah, GDPR and stuff like that right? Once you really start talking about these things it becomes really challenging sometimes to do it on a cloud provider level, especially when you're so big, right? But they didn't say, well, let's just move everything right. They just took that one component and they said, okay, well, this makes more sense for us to host it ourselves, right?

And so this is, I think, a good scenario of where sure self-hosting might be viable for you, right? Because it's about saving yourself time and saving yourself really in the end more opportunity to do other things. And so if this gives you that, then it's probably worth it.

But gotta really be confident in the whole management process of that, right? So self-hosting should really be isolated for separate managed infrastructure or things like that. And as I said before I have self hosted I literally used to go to a Colocation data center once a month I've been inside of it, inside of DCs a lot and I've also done Private clouds as well I've worked on OpenStack and I've worked on VMware.

And in both times it was not cheaper or easier and more time was spent on maintenance. When it was at the CoLo, I was driving to the data center a lot or we were spending thousands of dollars on having somebody get up out of their chair, walk five feet and plug something in, because that's what they charge if you do that.

Whereas the Private cloud scenario, you're entirely in charge of that cloud, right? So you're in charge of all the services, you're in charge of all the data stuff, or all the databases and things like that. And so what happens if your database breaks on your open source cloud provider?

[LAUGH] Nothing works. And so this is what I mean by it's just not easier because you take on the responsibility of what you're essentially managing. So, which cloud providers should I use? If we decide not to use self-hosted, which cloud providers should I use? I put Amazon on here.

We're gonna be using Amazon. I also put Google Cloud Platform and Azure Cloud. These I think are probably the most talked about clouds out there right now. IBM is a more, I would say, focused on specific problems, and they have a really good solution but I think for general purpose clouds, Amazon Web Services, GCP, and Azure Cloud are probably the ones that people talk about the most.

And what about other ones that you've seen before, like DigitalOcean, Linode, Heroku, like where do those fit in? So when I worked at MediaTemple, we got coined the phrase a boutique hosting provider. And if you've ever gotten to like shoes and stuff, there's boutiques for shoes, it's kinda the same concept is these are providers that are very niche or very small.

And they actually normally 9 times out of 10 already built on top of existing providers. So for example, Linodes, object storage, that's just Amazon. [LAUGH] It's just rebranded Amazon. Same thing with a lot of DOs, like droplets and stuff. That's not their infrastructure, that's running on something else or at least it was, it might not be now.

But a lot of these are essentially what we call resellers. They're taking the products that already exist and they're reselling on top of them for a more premium value. They could be valuable to you, but it's gonna be more expensive. A bucket through linode is just, they want more of a cut.

So they're gonna take a bit more out of it. They're not really considered enterprise cloud providers at least from my perspective because they already build on top of enterprise cloud providers that exist. So again, how can they help? A good example of this is if you have specific requirements, say you've got a frontend team that wants to deploy or something like, edge, workers or something like that.

Cloud workers might be a good solution for you. That's more of like a boutique-specific niche thing, right? If you're into Next.js and all that stuff, those are popular solutions that solve specific problems. And the last one, I think that really helps everyone is they can help with speed to market.

If you're in a situation where you genuinely just don't care about any of your infrastructure, you're just a developer who wants to host things, Heroku and these other services are really powerful. They can get you there really quickly. So, if you don't wanna build infrastructure, essentially, these providers can really help you with that.

This is the question I get a lot, right? Which cloud providers should I use? I don't like, the TLDR on all of this is I don't have a standardized, strict way of giving that to you. I don't. The reality of it is it's about your confidence in trying something new and experimenting with it, really.

And so, for me, whenever I pick a cloud provider again, I evaluate my requirements. I look and I see, what do I just need to get this running? Do I just need an EC2 instance or just an instance? Do I need a container? Things like that. And I think it's also good to include possible future requirements with that as well.

There's a solid chance you might be on that provider for a while. So might ask yourself questions like, would we ever get into serverless? Would we ever want to use a CDN solution provided by them or other things like that? But don't let that decision be the guiding force.

It's just something that will help you with getting through the the question. Determine which provider fits your needs in the sense of actually look at what you need and say, okay, yep, it does it, this, actually solves that. And then determine which one fits your budget with it.

So once you know it can do what you want, price it. Do not go to the cloud without pricing anything. If you do that, your credit card will cry, [LAUGH] okay? So you do not want to, even if you're going to create an instance, go to Amazon's calculator, all these big providers have calculators, you can look in at least see a vague idea of how much you're gonna be spending and that's how I do it.

I'll build a small piece of infrastructure. I'll go to the calculator and then I'll say, yep, that's not a good idea. [LAUGH] I'll go back and I'll rebuild it until it's cost effective. This is another one as well, which I think is very important. Test with a constant proof of concept.

What does that mean? Basic hypothesis, what is it? The hypotherm? I can't even speak, but the hypothesis theory, that's what I'm trying to say, you have a constant, and you do the same thing on all of them to actually be able to see what the differences are, right?

So going all the way back to the terraform versus Pulumi examples that I showed you, right? You can do the same thing, but with cloud providers. Build one network on Amazon, build another one on GCP and realize why you don't like GCP. No, I'm just kidding. [LAUGH] but realize why it might not be something that you're interested in or not.

And don't build one thing on one cloud and then one on another and expect it to give you a reasonable answer cuz they work differently. And then document your findings and compare. I genuinely think if you go through this list for each cloud provider and by the time you get to the last one you'll very confident in at least what you know and what you will wanna chose and it might take a couple of times.

You might try Amazon first then you might try GCP and then you might try Azure and then you might look at all three of them and then go like, Stick with your gut. What felt the easiest to use? If it was that, then that might be the best one for you to use.

It's not a simple decision, as I said, and it should be taken seriously with proper research. You're buying your next home for your company. You have to be very considerate of if that home is gonna help you scale the way that you want.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now