Here's a version with no background music: th-cam.com/video/jFrGhodqC08/w-d-xo.html I tried the music and the feedback is clear enough that I think it's worth uploading a version of this with no music. I'm still learning! I'm sorry :( I really liked the riff I wrote for the intro since it has a time signature of 7/4 but I clearly got carried away a bit...
7/4 is really cool .. but as our brains are so used to 4/4, we as an audience actually start to think about the beat instead of 100% on what you're trying to teach. Choose your moments for the "weird" beats.😊Putting the right sound to video isn't easy if you want it to make sense. Takes loads of learning and practice.
the music didn’t bother me (meter not volume) but kudos for taking feedback and iterating quickly. it’s almost like a metaphor for what the video is advocating
I simply paid attention to the music a lot more than the voiceover and the voiceover sounded more like mumbling rather than trying to be very clear on how you communicate to the viewers. As far as I know, one of the WCAG standards state that the music needs to be 20dB below voiceover. In fact, I was paying attention to the sub-bass coming from my subwoofer.
@@w花b because its an abstraction and when things go tits up or you dont have out of the box compatibility for what you wanna do you need the linux skills that was considered too annoying along with an in-depth understanding of how to do things the nix way
As a fellow Aussie app developer, my business can no longer get insurance if I use my own hosting. Call it a wrought, but if I don't host using a reputable supplier I simply can't provide app services legally. It sucks. So I do the very minimal. I host only the front end in digital ocean in Sydney and do my back end in my own data centre in Melbourne. Everything is docker based.
I would like to mention that most ISP will change your public IP periodically, so it's always worth to have a dynamic DNS service running. There are plenty of free and self-hostable options, but you could also build your own one in a weekend.
my isp has optional and free dynamic dns. you name your subdomain and pick from a couple of domains. they manage it, you don't have to install anything.
@@JegErN0rsk i didn't have the tutorial for doing all of this and just using a cheap virtual private server running ubuntu with docker was still easier for me to figure out than trying to figure out which aws service to use lol
Docker doesn’t replace ECS. You’d want to setup a Kubernetes cluster across multiple physical machines and manage them with kubelet. That’s the hard part about it. Developers know how to setup their local developer environment with Docker but that is not suitable for production.
When "production" means you're Amazon. I have seen Transport System Operators (Sometimes state owned companies owning/controlling infrastructure to move natural gas for example) using 5$ VM to host auctions. IMO even docker is sometimes an example of prematured 'optimization' and unnecessary overhead. E.g. self contained dotnet + SQLite can often do good enough job but people and companies chose to pay for SQL Server, Amazon, Azure etc for enterprise something that has like 50 users, or 5000 hits or DB updates/inserts per day. And when the service fail, phone and mail still work well enough.
@@denissornI mean you just need high availability so it means are least 2 replicas of everything of two servers etc. Just running on one node doesn’t cut it, can’t even reboot it for updates at that point.
@@EraYaN Sometimes you do, but many companies and use cases can do reasonably well even without it. Also, old school way of achieving HA still exists. There are dedicated servers available for lease for like 5 bucks. 2 can be enough, plus reverse proxy, DB replication or similar.
@@denissorn Point being that it quickly become less simple, and often stuff it in contracts with customers so it’s not an option to not do it. In my experience colo is never really simpler it just might be cheaper in the long run.
@@EraYaN there are obviously different situations and use cases, but (IMO) people are too easily influenced and affected by hype, and trends (real or fake/advertised) created by multi billion corporations. Kinda related I think i have noticed how in 'developed' EU language can work as a barrier. MongoDB usually still comes in a package together with JS where I live (most of these could literally stick with sqlite and be fine.), because reasons and 'full stack' (someone in some HR dep probably confused MERN stack with full stack lol).
Great video I'd personally recommend traefik as a reverse proxy since it reloads config automatically and auto detects services in docker network, and you also can run docker swarm on a single machine and it has rolling update built-in, so you end up with only 1 bash line to deploy a new version 'docker swarm deploy'
I think a key reason people use cloud, is that when you need to handoff the project to other devs there is support and documentation to do so. Majority of people are building for a company which means they need that flexibility when staff leave. I know that all the services you listed are documented, but the level you’re working at is past 95% of developers. Most want to see a gui and do some clickops Awesome video, love the detail.
Developers are using clickdrops?!! What are they getting paid for? More importantly, how much are they getting paid? Most importantly, how do I get that job?
that’s an interesting take, @mrdavidrees, but i think it reinforces the point of the video. being reductive, “we do it because bigger companies do it”.
You're right, but I wish you weren't. The majority of fellow engineers I've had the misfortune of working with don't deserve the title. Expecting people to have basic proficiency with commons tools is asking too much in the current industry.
This was my exact thought. A single rockstar can do this, but as you scale to bigger teams or use lower skill developers for cost, then you end up needing to do a lot of teaching to make it work, increasing the onboarding time drastically
I understand where you're coming from. That said, cloud environments are not designed with mom & pop shops in mind. They're geared towards major IT corporations that require granular control and solutions to problems often unique to specific industries & companies. This is key to note. Large corporations don't need to penny pinch near as hard, and the benefits of performance, throughput, reliability, scalability, visibility, security, compliance, automation, compatibility, interoperability, financial & technical support and employment are simply not on the table for compromising, and are worth the extra cost associated. Ironically, it saves them money long-term.
IMO the sweet spot for cloud is when you've grown enough that managing dozens of machines with your web app, your DB replicas, your queues and background workers (and don't forget staging/QA environments) becomes legitimately a hassle, but not grown enough to justify hiring full-time DBA & Linux admin staff.
@@CodecrafterArtemis Well, like anything, it should be looked at on a case by case basis. Personally, I wouldn't define that as the sweet spot, as it gives the impression it's the only scenario in which one would want a cloud environment. It's not black and white. After all, a lot of companies are neither full cloud nor strictly on-prem, but a hybrid to suit their individual needs. No matter if you're a small business or a large IT organization, there's immense value in fast & quickly scalable systems with a strong internet backbone that can be deployed in seconds with no strings attached. It's easier to hire an AWS engineer than an engineer with specific skill sets across particular vendors, an issue particularly pervasive on both the infrastructure & networking sides. A problem that is exacerbated by the shortage of IT engineers in most Western nations. Hiring ill equipped employees that require months to transition can affect performance of the department, and cost a lot of money. I could talk about this from so many angles. But take IT security as an example alone. Having an entire environment automatically indexed for IPAM, DCIM, SIEM, NMS and CM purposes, managed via IAM policies, separated between accounts & projects (important especially when a corporation has various subsidiaries), visible and automated via sophisticated APIs, built with ZTNA & compliance in mind, protected using a combination between ACLs, security groups and policies with pre-configured compute engines ... is a godsend! That's a lot of variables for any company to overcome by itself alone. Why take on all the responsibility of getting all of this correct from the start when you can leverage a company that specializes it? It's not worth the risk of saving a buck by rolling out your own DC, only to the lose fortunes in hacks, PR disasters, lawsuit, failed audits, over or under-provisioned systems, installation & deployment delays, etc.
If cloud environments are not designed with mom&pop shops in mind, I wonder why the AWS Academy courses (had to take one for university course credit, but did not pay for the certificate) use a small cafe as the example application. I see no need for a coffee shop - or ANY small, or even medium business - to use most of the technology covered in that course. None of those usecases need to set up massive infrastructure across multiple availability zones, complex VPC setups, RDS, IAM, CloudFront, Lambdas, or even S3 buckets (Yes! You almost certainly don't actually need those!). Some business usecases might 'need' one or two of those services, but you will probably get results as good or better by just renting a single Hetzner box, or maybe two if you want redundancy, and maybe putting it behind Cloudflare.
@@animowany111 I guess the main reason a "mom&pop shop" would want something like AWS is because it's supposedly easier than setting up the servers yourself... Then again, I'm poking around AWS and it feels like certified confusopoly.
This is how I basically self host my own stuff at home. 3 machines running nixos, nix manages firewall, Kubernetes, and system dependencies . 1 machine running truenas which hosts all of my data and exposes shares to the cluster over nfs Best part of this setup is that when a “compute node” goes down or if I need more power, I just port the nix config over and run. My only real weak point is the data node (truenas) but this beauty has ran without a restart for almost 2 years. So :3
@@Parallaxxx28 Have you tried google? True NAS is his file storage NixOS is a linux distro as shown in the video you can setup entirely with a single config file.
Hey, if you want to remove your spof on truenas, check out longhorn. It stores data on the nodes and replicates them. The data is not replicated across all nodes, but across N nodes (3 by default) so you're not actually losing all your storage.
The cloud is over engineered, try this simple method instead: - Goes on to list a hundred different tools/services/scripting... I mean, I get your point, I think we all do, and you're right, but man that was a lot of tools in very little time! I loved the video though, thanks for your work ❤
I agree, I have a startup and the cost is too much for deploying my application, and I just moved from Cloud to hard metal, I love your point and this is the core.
Loved the video! I work as an azure devops engineer creating automated workflows for testing and deployment. I love that the host machine is also the build agent. This is just the kind of project I'd love doing and I especially like the auto git fetch and rebuild
Proxmox would help with backing up , sync data between clusters and automatic failover with live migrations for vm. For simple usecases , its dead simple to use
Thanks for the lot of useful info, I'm keeping this video in my "must keep" playlist for future reference. I was always inclined to believe that setting my own server plus a static IP address via my ISP, are the only true costs compared to falling to the trap of a cloud vendor. I can buy a small yet capable mini PC for $400 and install Linux and the rest of the open source tools and get myself going. No need for subvscriptions, no hidden fees, no unpleasant surprises etc. Thanks for confirming my thoughts.
Between Cloud and keeping hardware in your home there is also 3th. option: VPS or Dedicated server. You can say: isn't EC2 a VPS? Yes, but it's verry expensive VPS. Other smaller companies can be much much cheaper (especially if you need lot's of network transfer) than big providers like Amazon/Microsoft.
Totally agree! The number you shown at the beginning of the video was mind-blowing 🤯. It's crazy how quickly things can add up if you're not careful. I did a whole video on my channel about other cloud pricing gotchas to look out for.
I'm looking to launch my first online product and I'm trying to keep it simple. However, a static IP address from Fios is $70/month and AWS is $14/month. It's like trying to eat healthier, but the overly processed food is cheaper than the raw food.
What timing that this video came up as I am fighting against cloud platforms to get my basic side project deployed! Super clear and to the point, makes me want to try moving off the cloud so I can learn actual transferrable skills instead of getting a degree in AWS and GCP 😂
As you see in the video, you have to know a lot of technologies to self host. And a lot isn't really explained in the video, like how to protect it from attackers, how to prevent DDOS, how do set up backups, etc. The internet can be a rough place. Having the hand of a cloud provider protecting you, can be a nice thing. It's not easier to self host. But it's good to have the knowledge. What is your side project about? There are a lot of different technology options. You definitely don't need certificates for AWS. There are certificates for Linux, docker, etc. as well. You don't need them, too. Both "worlds" have their advantages and disadvantages. The video definitely doesn't provide a neutral view on it. But it provides an interesting example of how one could set up a server themselves.
Big problem: reliability. I mean that's a deal killer for any profitable (AKA non-worthless) site. As soon as you expect reliability, cloud is CHEAPER.
@@doesntmatter6084 The average reliability rate for a cloud provider is 99.999%, meaning less than 6 minutes per year. Hosting it yourself means any time your network goes down, any time any part of your network needs to be updated/restarted, power outages, computer/server problems, etc., your service goes down. I don't know about you, but that would equate to many hours per year for me... Especially with power outages and network outages due to bad weather. I'd also point out that if you add up the cost of having, maintaining, and replacing those devices to avoid outages, you're very likely spending a decent amount already.
The best solution for me has always been to build my services like this, defaulting to as few dependencies and vendors as possible... but when I'm read to deploy, I put the whole thing on a $5/mo linode server. It has never failed me. Even the cheapest modern nodes can easily handle more requests per second than I will ever have to worry about - and if I ever do, that will be a good problem to have. I would go as far as you have to fully self-host, but I've always been willing to pay a few dollars to not have to worry about dumb things like the physical security of my device. Home internet service can also be super inconsistent.
This is the only video I've ever watched that got me interested in web development. It looks like low-level programming for how unbloated you made it look! I'm subscribing right now
Based video. subscribed right away! I also host my side project on a linux box with the cloned repo & docker (compose). However I stopped at manually doing the git pull + docker compose down & up for deploys (downtime every time). I'm definitely trying that cronjob approach for checking diffs and automating this last part + no downtime 🔥 thanks dude
Its also important to mention that from a separation of duties perspective you may want differeny people for all of these tasks. Or you transfer the risk to the cloud provider
As a retired SE and someone who grew up in the host it yourself and colocation age, i too beleive cloud is often used without giving due consideration to self hosting. Cloud seems to be the way everyone does it. So everyone does it that way without asking why or what other alternatives are available. So i agreed with most of what you have said. If not all of what youve said!
This is a really good take. Personally from my perspective having been an SWE > 20 years, cloud is a new and exotic tech that you don't "have to have". I really love the approach in this video! Simple and minimalist. However one thing to carefully consider when making the decision is that datacenters have chad level 9000 internet backbone access that your services will be connected to - your local home ISP can unilaterally block incoming traffic to your server anytime they like, and upload speeds will be abysmal. Those are important risks to take into consideration, even if you're running your setup from a proper office building those connections are still treated mostly the same way by ISPs as home internet connections with all the limitations and risks that implies for continuous production access (datacenters don't suffer with this issue).
Very well thouht out and actually pretty similar to ehat i have been doing myself too! Using hosters and making jy own git based workflow works great and makes debugging easier I wanted to learn NixOS for some time, this gave me the courage to do so
You only need one service from the cloud: VMs/compute instances/whatever you want to call it. "self-host" every other service you need on rented instances, that way you avoid vendor lockdown. Database can be self-hosted, CI/CD runners can be self-hosted, telemetry and logging services can be self-hosted; every cloud provider service has a self-hosted open source alternative, so you can jump from cloud to cloud anytime you want.
Simple > easy is a very nice point. There is more than one way to see simple though; elementary proofs tend to be much harder than ones that use other results - just a thought.
Well, it could be more simple without docker. But in this case, I think simple is a disadvantage, as it means more work for you with updating, securing, backups, keeping it working, etc. With clouds they do that for you. Clouds can also be much cheaper if you use serverless tools, as you don't have to pay for servers idling. But you are dependent on the cloud provider and can not change it easily.
Loved this video! I like the justifications around downtime being preferable. One thing I personally would do differently is to use a cheap VPS. I’ve managed too many physical servers in my time to not leap at the chance to let someone else deal with it for $5/month
If you're ready and willing to crash during a burst, why do you need the complexity around zero downtime deployments? Do a maintenance window or just full send?
agreed that if you’re fine with downtime during burst then zero downtime deployments aren’t prima facie required. however, i’d still want them for my own workflow (but I’d likely speed up the whole deploy loop a bit more)
I haven't watched the video with music so I'm not going to talk about this, I'd rather say that this video is really amazing, well explained and that your arguments are very precise. I'm glad YT recommended me your channel. Now I am going to explore NixOS because it looks very interesting :)
Excellent marketers are able to convince the majority to believe that dark is the new light. That aside, dashing cash to expensive cloud providers is good for accounting purposes in the short term which makes clueless investors happy. The accounting terms have quite escaped me.
Nice video. Personally since I fall in the Nix rabbit hole I would 100% manage all my services and containers with NixOS and arion and I would also build my containers with nix directly since it can easily ensure my app is reproducible and produce smaller containers. But your steps are still goods.
Hey there. For such deployment i find that rancher with cattle orchestrator worked best. However it's been abandoned 4 years ago. Right now my infrastructure is 3 nodes on different datacenters, and I'm migrating to rancher 2 (kubes). All on debian bare metal, and while the manager is a bit long to setup, adding a host is easy (scalable), we have kubernetes for managing container scalability, longhorn is basically builtin for storage, and so and so. It's not very simple but it could be a lot worse, you can tweak everything if that's yout thing (nothing is hidden), and everything runs on bare metal.
Great video! Got yourself a subscription :) About the music: I liked the music on the video (also great job!) but yes, you‘ll have to lower the volume quite a bit. I think that should already do it. Fireship does a good job with mixing in the background music, you could listen there to get an idea on how to set the leves. Some optional hints: - Use a compressor on the background track. - Keep close to the mic while speaking (I think you already do) - Use some EQ to separate the music from the voice. - Listen to the Audio on different devices/speakers to check.
All that, plus: 0. remove docker 1. install caddy locally 2. use Kotlin/Native to produce native binaries and run them using systemd 2a. you can still use Kotlin/JVM and install the JRE, all distros provide it in all architectures
Great video! Just some minor feedback: You're often using icons / logos of tools, technologies, etc. in your video without explicitly having a text representation of them on screen as well. For people who aren't familiar with every single one of those logos, it might be hard sometimes to understand exactly what you're saying or how to find it easily. At first when I saw that lock logo, I had no idea what you were exactly saying, when you said "caddy". I wouldn't have known how to spell it in order to search it on google to have a look at it. A little bit later it appears in one of the configuration files, so I made the connection - but that makes it slightly harder to follow IMHO. Maybe having the names of the technologies appear initially when showing the logos and then fading them out after a few seconds would be a good middle ground in order to keep your slides clean.
I actually really liked the music in this one, though I agree that it was probably too loud compared to your voice in this instance. Keep up the great videos!
I really like this, especially since i like to do everything on my own. But also, another argument would be that with the help of a cloud provider, you don't need to go through the hassle to setup and maintain all this. But as i said, i like to setup things myself and also take advantage of the multiple free tiers so good stuff! would be cool to get the scripts on a github repo or gists
I dig. My recommendation is use talos Linux as your OS as it's the easiest way to setup a highly available cluster using k8s. I use it for home and business. Easier than building your own tools to mimic k8s. But if you are actually going to make money off your services, make sure you have generators and multiple networks setup. This is why on premise is such a pain.
Docker Swarm is deprecated and has horrible network scaling issues at production level overlay networks. It works for small projects, but if you're going into devops type roles, it would be worth it to learn and use Kubernetes from the beginning. It is more time commitment once you start using multi-node setups though. Love the message of the overall video though.
one thing I don't understand, did you set up port forwarding on your router to accept connections outside your local network? I had to do that to get a network thermal printer to print from an azure app, and I'm just curious how that works if you didn't edit your router settings....
Agree with everything. One of the main reasons I use cloud hosting is for network reliability. Self-hosting means I'm at the mercy of my internet provider. They don't go down often, but sometimes there are issues and self hosting would mean my services are down during this time. Or are there solutions for this?
If you have a repeatable way to deploy (Kubernetes), then you can deploy to a different server (of a different provider) and switch you dns settings. This shouldn’t be a problem for static sites. When it’s a dynamic site (with a database) the data has to be synchronized as well, which can be more challenging.
Great video! Totally agree with your point. And I’m happy to find the channel that actually teaches you something, not just reports about done tasks. Keep it up! P.S. music is a bit loud, sometimes it’s hard to hear voice.
@@mdxggxek1909but then why install nix os on the server? the whole point of nix os is the have a declarative configuration so no matter what it will be configured the same. with flakes you're even sure you have the exact same version of the software since it uses the git hash to in worst case rebuild the package. nixos can do everything docker can and more. you could even startup new vms just by declaring it in the config and rebuilding the system. and if something breaks, every state is safed for rollback. sorry i daily drive nixos and i just love being able to rebuild my pc with a single command. you could even just boot into the live iso and have the partitions made for you, via nix config.
Hi Tom this is a nice setup. I have a doubt regarding how did you map the Domain to your local network system ? You did port forwarding on your local router to enable this ?
Dokku. I cannot recommend Dokku enough! We switch to dedicated hardware and Dokku (which is self-hosted Heroku that uses Docker) made it all possible. It's been an absolute pleasure to work with, and has been rock solid.
I thought this video is about all the problems with using clouds, but it turns out to be a tutorial of setting up your own server. Not what I expected, but informative. However, I don't have all the free time to learn all the tech tools, sometimes paying for your time may seem a better choices.
I think self hosting is going to the other extreme. You get a lot of problems having to manage the physical servers yourself. For instance, a startup i worked for that is now a unicorn started off in really crappy offices that kept getting burgled. They lost a number of macbooks. But if they had self hosted and the theives took the server, then it may be ge over for the startup at that point. Especially given customer data being lost (even if encrypted). Companies could save a lot of money by just sticking to basic cloud services like EC2. A lot of other than AWS provide those so quite a competitive market. Then you just run your own services on the box.
If you have static IP from your ISP, you can do it. Here they only give it if you are a business, not for regular people. I could use a DDNS service, but I need to play with my router settings... Maybe one day:D Until that, 5 USD linode server or 6 USD digitalocean server is the cheapest option
Here's a version with no background music: th-cam.com/video/jFrGhodqC08/w-d-xo.html
I tried the music and the feedback is clear enough that I think it's worth uploading a version of this with no music. I'm still learning!
I'm sorry :( I really liked the riff I wrote for the intro since it has a time signature of 7/4 but I clearly got carried away a bit...
7/4 is really cool .. but as our brains are so used to 4/4, we as an audience actually start to think about the beat instead of 100% on what you're trying to teach. Choose your moments for the "weird" beats.😊Putting the right sound to video isn't easy if you want it to make sense. Takes loads of learning and practice.
The riff is based, just like your video
@@zejwier5442 What does that mean, “it’s based”?
the music didn’t bother me (meter not volume) but kudos for taking feedback and iterating quickly. it’s almost like a metaphor for what the video is advocating
HUH! based on the other thread, i tried lowering my speed from 2x down to “normal” and now the riff *is* super distracting to me. interesting
The music is too loud
Is it too loud or should I not have put it in at all?
@@tom-delalande Its just too loud IMO. However it might be beneficial to mute it occasionally to highlight the most important parts of your monologue.
@@tom-delalande Music is nice, but your voice should be clear and stand apart from the music
@@tom-delalandekeep the music. Not the way it is of course, but it does add quite a bit of atmosphere for the video which I enjoy quite a bit.
I simply paid attention to the music a lot more than the voiceover and the voiceover sounded more like mumbling rather than trying to be very clear on how you communicate to the viewers. As far as I know, one of the WCAG standards state that the music needs to be 20dB below voiceover. In fact, I was paying attention to the sub-bass coming from my subwoofer.
NixOS truly feels like it's the new 'I use Arch BTW'
I used NixOs for about 4 days and when straight back to debian😂
@@xnegusxNot having to do any of that interface or hosts stuff looked interesting, why did you go back, seems like all can be done in one file.
@@w花b because its an abstraction and when things go tits up or you dont have out of the box compatibility for what you wanna do you need the linux skills that was considered too annoying along with an in-depth understanding of how to do things the nix way
I use guix btw
@@xnegusx I used NixOS for a week also, went straight back to Arch 🤣🤣 (But I feel like I should give it another try) 🙃
As a fellow Aussie app developer, my business can no longer get insurance if I use my own hosting. Call it a wrought, but if I don't host using a reputable supplier I simply can't provide app services legally. It sucks. So I do the very minimal. I host only the front end in digital ocean in Sydney and do my back end in my own data centre in Melbourne. Everything is docker based.
what the fuck, how did we end up like this....
@@Noah-zt3sf Australia....
I would like to mention that most ISP will change your public IP periodically, so it's always worth to have a dynamic DNS service running. There are plenty of free and self-hostable options, but you could also build your own one in a weekend.
my isp has optional and free dynamic dns. you name your subdomain and pick from a couple of domains. they manage it, you don't have to install anything.
@@fish1r1good for you
Or rely on solutions like cloudflare tunnel, ngrok
i am forced to use ipv6 cause my ipv4 is cgnat:-(
It’s amazing how this process is much easier to understand then the aws ui
he did all the work. If not for him youd say AWS is easier
@@JegErN0rsk i didn't have the tutorial for doing all of this and just using a cheap virtual private server running ubuntu with docker was still easier for me to figure out than trying to figure out which aws service to use lol
Docker doesn’t replace ECS. You’d want to setup a Kubernetes cluster across multiple physical machines and manage them with kubelet. That’s the hard part about it. Developers know how to setup their local developer environment with Docker but that is not suitable for production.
When "production" means you're Amazon. I have seen Transport System Operators (Sometimes state owned companies owning/controlling infrastructure to move natural gas for example) using 5$ VM to host auctions. IMO even docker is sometimes an example of prematured 'optimization' and unnecessary overhead. E.g. self contained dotnet + SQLite can often do good enough job but people and companies chose to pay for SQL Server, Amazon, Azure etc for enterprise something that has like 50 users, or 5000 hits or DB updates/inserts per day. And when the service fail, phone and mail still work well enough.
@@denissornI mean you just need high availability so it means are least 2 replicas of everything of two servers etc. Just running on one node doesn’t cut it, can’t even reboot it for updates at that point.
@@EraYaN Sometimes you do, but many companies and use cases can do reasonably well even without it. Also, old school way of achieving HA still exists. There are dedicated servers available for lease for like 5 bucks. 2 can be enough, plus reverse proxy, DB replication or similar.
@@denissorn Point being that it quickly become less simple, and often stuff it in contracts with customers so it’s not an option to not do it. In my experience colo is never really simpler it just might be cheaper in the long run.
@@EraYaN there are obviously different situations and use cases, but (IMO) people are too easily influenced and affected by hype, and trends (real or fake/advertised) created by multi billion corporations. Kinda related I think i have noticed how in 'developed' EU language can work as a barrier. MongoDB usually still comes in a package together with JS where I live (most of these could literally stick with sqlite and be fine.), because reasons and 'full stack' (someone in some HR dep probably confused MERN stack with full stack lol).
Great video
I'd personally recommend traefik as a reverse proxy since it reloads config automatically and auto detects services in docker network, and you also can run docker swarm on a single machine and it has rolling update built-in, so you end up with only 1 bash line to deploy a new version 'docker swarm deploy'
+1 for traefik. Can also do automagic letsencrypt certs for you.
I think a key reason people use cloud, is that when you need to handoff the project to other devs there is support and documentation to do so. Majority of people are building for a company which means they need that flexibility when staff leave. I know that all the services you listed are documented, but the level you’re working at is past 95% of developers. Most want to see a gui and do some clickops
Awesome video, love the detail.
Developers are using clickdrops?!! What are they getting paid for? More importantly, how much are they getting paid? Most importantly, how do I get that job?
that’s an interesting take, @mrdavidrees, but i think it reinforces the point of the video. being reductive, “we do it because bigger companies do it”.
You're right, but I wish you weren't. The majority of fellow engineers I've had the misfortune of working with don't deserve the title. Expecting people to have basic proficiency with commons tools is asking too much in the current industry.
This was my exact thought. A single rockstar can do this, but as you scale to bigger teams or use lower skill developers for cost, then you end up needing to do a lot of teaching to make it work, increasing the onboarding time drastically
@@tigerofdoom if basic sysadmin proficiency makes you a rockstar now, this industry is doomed
I understand where you're coming from. That said, cloud environments are not designed with mom & pop shops in mind. They're geared towards major IT corporations that require granular control and solutions to problems often unique to specific industries & companies. This is key to note. Large corporations don't need to penny pinch near as hard, and the benefits of performance, throughput, reliability, scalability, visibility, security, compliance, automation, compatibility, interoperability, financial & technical support and employment are simply not on the table for compromising, and are worth the extra cost associated. Ironically, it saves them money long-term.
IMO the sweet spot for cloud is when you've grown enough that managing dozens of machines with your web app, your DB replicas, your queues and background workers (and don't forget staging/QA environments) becomes legitimately a hassle, but not grown enough to justify hiring full-time DBA & Linux admin staff.
@@CodecrafterArtemis Well, like anything, it should be looked at on a case by case basis. Personally, I wouldn't define that as the sweet spot, as it gives the impression it's the only scenario in which one would want a cloud environment. It's not black and white. After all, a lot of companies are neither full cloud nor strictly on-prem, but a hybrid to suit their individual needs. No matter if you're a small business or a large IT organization, there's immense value in fast & quickly scalable systems with a strong internet backbone that can be deployed in seconds with no strings attached. It's easier to hire an AWS engineer than an engineer with specific skill sets across particular vendors, an issue particularly pervasive on both the infrastructure & networking sides. A problem that is exacerbated by the shortage of IT engineers in most Western nations. Hiring ill equipped employees that require months to transition can affect performance of the department, and cost a lot of money.
I could talk about this from so many angles. But take IT security as an example alone. Having an entire environment automatically indexed for IPAM, DCIM, SIEM, NMS and CM purposes, managed via IAM policies, separated between accounts & projects (important especially when a corporation has various subsidiaries), visible and automated via sophisticated APIs, built with ZTNA & compliance in mind, protected using a combination between ACLs, security groups and policies with pre-configured compute engines ... is a godsend! That's a lot of variables for any company to overcome by itself alone. Why take on all the responsibility of getting all of this correct from the start when you can leverage a company that specializes it? It's not worth the risk of saving a buck by rolling out your own DC, only to the lose fortunes in hacks, PR disasters, lawsuit, failed audits, over or under-provisioned systems, installation & deployment delays, etc.
If cloud environments are not designed with mom&pop shops in mind, I wonder why the AWS Academy courses (had to take one for university course credit, but did not pay for the certificate) use a small cafe as the example application.
I see no need for a coffee shop - or ANY small, or even medium business - to use most of the technology covered in that course. None of those usecases need to set up massive infrastructure across multiple availability zones, complex VPC setups, RDS, IAM, CloudFront, Lambdas, or even S3 buckets (Yes! You almost certainly don't actually need those!).
Some business usecases might 'need' one or two of those services, but you will probably get results as good or better by just renting a single Hetzner box, or maybe two if you want redundancy, and maybe putting it behind Cloudflare.
@@animowany111 I guess the main reason a "mom&pop shop" would want something like AWS is because it's supposedly easier than setting up the servers yourself...
Then again, I'm poking around AWS and it feels like certified confusopoly.
based and nix pilled
also, maybe you'd want to look into podman
Didn't expect NixOS and love the surprise
This is how I basically self host my own stuff at home.
3 machines running nixos, nix manages firewall, Kubernetes, and system dependencies .
1 machine running truenas which hosts all of my data and exposes shares to the cluster over nfs
Best part of this setup is that when a “compute node” goes down or if I need more power, I just port the nix config over and run. My only real weak point is the data node (truenas) but this beauty has ran without a restart for almost 2 years. So :3
Can you explain what is nixos and what you mean by tuernas?
@@Parallaxxx28 Have you tried google? True NAS is his file storage NixOS is a linux distro as shown in the video you can setup entirely with a single config file.
Hey, if you want to remove your spof on truenas, check out longhorn. It stores data on the nodes and replicates them. The data is not replicated across all nodes, but across N nodes (3 by default) so you're not actually losing all your storage.
Love your point about how NOT being scalable can be a benefit.
It reminds me of that one real-life horror story where a Netlify user got charged millions because some bot wanted to DoS it
This needs to be in every college curriculum BEFORE cloud services. Great summary dude!
The cloud is over engineered, try this simple method instead:
- Goes on to list a hundred different tools/services/scripting...
I mean, I get your point, I think we all do, and you're right, but man that was a lot of tools in very little time!
I loved the video though, thanks for your work ❤
I agree, I have a startup and the cost is too much for deploying my application, and I just moved from Cloud to hard metal, I love your point and this is the core.
Can you turn up the music a bit? It was distracting how I could almost make out someone speak.
reading that last sentence gave me an aneurysm
Loved the video! I work as an azure devops engineer creating automated workflows for testing and deployment. I love that the host machine is also the build agent. This is just the kind of project I'd love doing and I especially like the auto git fetch and rebuild
Proxmox would help with backing up , sync data between clusters and automatic failover with live migrations for vm. For simple usecases , its dead simple to use
Proxmox Mention Let's Go!
Client: "Okay, so why do we need a used macbook again?"
No, but seriously awesome video! I would've loved this when I started my dev journey
Thanks for the lot of useful info, I'm keeping this video in my "must keep" playlist for future reference.
I was always inclined to believe that setting my own server plus a static IP address via my ISP, are the only true costs compared to falling to the trap of a cloud vendor.
I can buy a small yet capable mini PC for $400 and install Linux and the rest of the open source tools and get myself going.
No need for subvscriptions, no hidden fees, no unpleasant surprises etc.
Thanks for confirming my thoughts.
Between Cloud and keeping hardware in your home there is also 3th. option: VPS or Dedicated server.
You can say: isn't EC2 a VPS? Yes, but it's verry expensive VPS. Other smaller companies can be much much cheaper (especially if you need lot's of network transfer) than big providers like Amazon/Microsoft.
Awesome video. A git repo containing these scripts and a README would be super useful- I intend to replicate this stack for my next project.
One of my favorite videos of 2024
Totally agree! The number you shown at the beginning of the video was mind-blowing 🤯. It's crazy how quickly things can add up if you're not careful. I did a whole video on my channel about other cloud pricing gotchas to look out for.
Your pacing and detail level are really nice, thanks for sharing this build
Yo this video is top notch for so many reasons and exciting from head to tail. Incredible inspiration. Thank you!!
i burst out in laughter when you explained your distro choice at 2:02 haha. Love to see NixOS getting more attention and real world use cases!
I'm looking to launch my first online product and I'm trying to keep it simple. However, a static IP address from Fios is $70/month and AWS is $14/month. It's like trying to eat healthier, but the overly processed food is cheaper than the raw food.
What a based man
Beautiful video, understood everything since it was explained so elegantly.
What timing that this video came up as I am fighting against cloud platforms to get my basic side project deployed!
Super clear and to the point, makes me want to try moving off the cloud so I can learn actual transferrable skills instead of getting a degree in AWS and GCP 😂
go back to self hosting!
As you see in the video, you have to know a lot of technologies to self host. And a lot isn't really explained in the video, like how to protect it from attackers, how to prevent DDOS, how do set up backups, etc. The internet can be a rough place. Having the hand of a cloud provider protecting you, can be a nice thing. It's not easier to self host. But it's good to have the knowledge. What is your side project about? There are a lot of different technology options. You definitely don't need certificates for AWS. There are certificates for Linux, docker, etc. as well. You don't need them, too. Both "worlds" have their advantages and disadvantages. The video definitely doesn't provide a neutral view on it. But it provides an interesting example of how one could set up a server themselves.
Big problem: reliability. I mean that's a deal killer for any profitable (AKA non-worthless) site. As soon as you expect reliability, cloud is CHEAPER.
Why would this be any less reliable?
@@doesntmatter6084 no backup power, automated backups, physical security, fire suppression, connection redundancy, hardware redundancy, etc, etc, etc...
@@doesntmatter6084 The average reliability rate for a cloud provider is 99.999%, meaning less than 6 minutes per year. Hosting it yourself means any time your network goes down, any time any part of your network needs to be updated/restarted, power outages, computer/server problems, etc., your service goes down. I don't know about you, but that would equate to many hours per year for me... Especially with power outages and network outages due to bad weather. I'd also point out that if you add up the cost of having, maintaining, and replacing those devices to avoid outages, you're very likely spending a decent amount already.
@@doesntmatter6084 Old Macbooks like to die.
@@Jonathan1234000 we’re they hosting this on an old MacBook?
Funny, I got an ad for an AWS certification course right after the video.
They are like Linux or Docker certificates, though. You don't need them. AWS is as easier as the technologies in this video.
@@Duconi I commented because I normally don't get ads that are the opposit of the video.
This is a fantastic take, and pragmatic example of an opensource maintainable stack
i personally like the music
I'm trying to focus on the video but the bgm is such a vibe.
This was really good - and I didn't find the music obtrusive despite having a literal earache at the moment. Might have to give NixOS a go!
Did not expect NixOS to come. Legend!
it came
The best solution for me has always been to build my services like this, defaulting to as few dependencies and vendors as possible... but when I'm read to deploy, I put the whole thing on a $5/mo linode server. It has never failed me. Even the cheapest modern nodes can easily handle more requests per second than I will ever have to worry about - and if I ever do, that will be a good problem to have.
I would go as far as you have to fully self-host, but I've always been willing to pay a few dollars to not have to worry about dumb things like the physical security of my device. Home internet service can also be super inconsistent.
I have seen this argument made so many times, but rarely this eloquently, and with a concise demonstration to boot.
This is the only video I've ever watched that got me interested in web development. It looks like low-level programming for how unbloated you made it look! I'm subscribing right now
Based video. subscribed right away!
I also host my side project on a linux box with the cloned repo & docker (compose). However I stopped at manually doing the git pull + docker compose down & up for deploys (downtime every time). I'm definitely trying that cronjob approach for checking diffs and automating this last part + no downtime 🔥 thanks dude
Its also important to mention that from a separation of duties perspective you may want differeny people for all of these tasks. Or you transfer the risk to the cloud provider
music is perfect, i like it more than the no music version.
As a retired SE and someone who grew up in the host it yourself and colocation age, i too beleive cloud is often used without giving due consideration to self hosting. Cloud seems to be the way everyone does it. So everyone does it that way without asking why or what other alternatives are available. So i agreed with most of what you have said. If not all of what youve said!
I love this video it is always nice to discover and explore new perspectives
chef's kiss level content. keep up the good work man
This is a really good take. Personally from my perspective having been an SWE > 20 years, cloud is a new and exotic tech that you don't "have to have". I really love the approach in this video! Simple and minimalist.
However one thing to carefully consider when making the decision is that datacenters have chad level 9000 internet backbone access that your services will be connected to - your local home ISP can unilaterally block incoming traffic to your server anytime they like, and upload speeds will be abysmal. Those are important risks to take into consideration, even if you're running your setup from a proper office building those connections are still treated mostly the same way by ISPs as home internet connections with all the limitations and risks that implies for continuous production access (datacenters don't suffer with this issue).
Very well thouht out and actually pretty similar to ehat i have been doing myself too! Using hosters and making jy own git based workflow works great and makes debugging easier
I wanted to learn NixOS for some time, this gave me the courage to do so
This video is awesome and exactly how I approach things
You only need one service from the cloud: VMs/compute instances/whatever you want to call it.
"self-host" every other service you need on rented instances, that way you avoid vendor lockdown. Database can be self-hosted, CI/CD runners can be self-hosted, telemetry and logging services can be self-hosted; every cloud provider service has a self-hosted open source alternative, so you can jump from cloud to cloud anytime you want.
Absolutely amazing. I'm close to running my own servers.
Simple > easy is a very nice point. There is more than one way to see simple though; elementary proofs tend to be much harder than ones that use other results - just a thought.
Well, it could be more simple without docker.
But in this case, I think simple is a disadvantage, as it means more work for you with updating, securing, backups, keeping it working, etc. With clouds they do that for you. Clouds can also be much cheaper if you use serverless tools, as you don't have to pay for servers idling. But you are dependent on the cloud provider and can not change it easily.
Loved this video! I like the justifications around downtime being preferable.
One thing I personally would do differently is to use a cheap VPS. I’ve managed too many physical servers in my time to not leap at the chance to let someone else deal with it for $5/month
You speak the truth. Thanks for your truthful assessment of the state of cloud computing
If you're ready and willing to crash during a burst, why do you need the complexity around zero downtime deployments?
Do a maintenance window or just full send?
agreed that if you’re fine with downtime during burst then zero downtime deployments aren’t prima facie required. however, i’d still want them for my own workflow (but I’d likely speed up the whole deploy loop a bit more)
I haven't watched the video with music so I'm not going to talk about this, I'd rather say that this video is really amazing, well explained and that your arguments are very precise. I'm glad YT recommended me your channel.
Now I am going to explore NixOS because it looks very interesting :)
Eye opener video for me. Thanks
Excellent marketers are able to convince the majority to believe that dark is the new light. That aside, dashing cash to expensive cloud providers is good for accounting purposes in the short term which makes clueless investors happy. The accounting terms have quite escaped me.
capex vs opex (capital / upfront expenses vs operating / ongoing expenses)
@@efkastner Thanks. I have copied into my notes so I don't forget again.
Nice video. Personally since I fall in the Nix rabbit hole I would 100% manage all my services and containers with NixOS and arion and I would also build my containers with nix directly since it can easily ensure my app is reproducible and produce smaller containers.
But your steps are still goods.
I love this type of content, you deserve more subs!
Hey there. For such deployment i find that rancher with cattle orchestrator worked best. However it's been abandoned 4 years ago.
Right now my infrastructure is 3 nodes on different datacenters, and I'm migrating to rancher 2 (kubes). All on debian bare metal, and while the manager is a bit long to setup, adding a host is easy (scalable), we have kubernetes for managing container scalability, longhorn is basically builtin for storage, and so and so. It's not very simple but it could be a lot worse, you can tweak everything if that's yout thing (nothing is hidden), and everything runs on bare metal.
Great video! Got yourself a subscription :)
About the music: I liked the music on the video (also great job!) but yes, you‘ll have to lower the volume quite a bit.
I think that should already do it.
Fireship does a good job with mixing in the background music, you could listen there to get an idea on how to set the leves.
Some optional hints:
- Use a compressor on the background track.
- Keep close to the mic while speaking (I think you already do)
- Use some EQ to separate the music from the voice.
- Listen to the Audio on different devices/speakers to check.
Really interesting and thorough perspective thanks
All that, plus:
0. remove docker
1. install caddy locally
2. use Kotlin/Native to produce native binaries and run them using systemd
2a. you can still use Kotlin/JVM and install the JRE, all distros provide it in all architectures
I actually really agree with removing this. Native > containers
Awesome video man, pilled with funny, informative and rich content. Well done!
Great video!
Just some minor feedback:
You're often using icons / logos of tools, technologies, etc. in your video without explicitly having a text representation of them on screen as well.
For people who aren't familiar with every single one of those logos, it might be hard sometimes to understand exactly what you're saying or how to find it easily.
At first when I saw that lock logo, I had no idea what you were exactly saying, when you said "caddy". I wouldn't have known how to spell it in order to search it on google to have a look at it. A little bit later it appears in one of the configuration files, so I made the connection - but that makes it slightly harder to follow IMHO.
Maybe having the names of the technologies appear initially when showing the logos and then fading them out after a few seconds would be a good middle ground in order to keep your slides clean.
Question: what can i use instead of api gateway for example? To prevent bad actors from scanning for vulnerabilities
Most useful tech video I’ve ever watched
I actually really liked the music in this one, though I agree that it was probably too loud compared to your voice in this instance. Keep up the great videos!
Much appreciated! Thx for sharing the knowledge 🫡
I really like this, especially since i like to do everything on my own. But also, another argument would be that with the help of a cloud provider, you don't need to go through the hassle to setup and maintain all this.
But as i said, i like to setup things myself and also take advantage of the multiple free tiers so good stuff! would be cool to get the scripts on a github repo or gists
I dig. My recommendation is use talos Linux as your OS as it's the easiest way to setup a highly available cluster using k8s.
I use it for home and business.
Easier than building your own tools to mimic k8s.
But if you are actually going to make money off your services, make sure you have generators and multiple networks setup. This is why on premise is such a pain.
Great video, For a startup or homelab it would be enough with that
Docker Swarm is deprecated and has horrible network scaling issues at production level overlay networks. It works for small projects, but if you're going into devops type roles, it would be worth it to learn and use Kubernetes from the beginning. It is more time commitment once you start using multi-node setups though. Love the message of the overall video though.
My outbound traffic is throttled in throughput and limited in maximum allowed size by my ISP.
For the music, use vocal ducking and reduce the volume to -10db and it will be sweet.
God some of these takes are spicy. I don't agree with all of it but much of it makes me happy to see (:
one thing I don't understand, did you set up port forwarding on your router to accept connections outside your local network? I had to do that to get a network thermal printer to print from an azure app, and I'm just curious how that works if you didn't edit your router settings....
awesome... remind the world to KISS and think about requirements
In both meanings of the phrase 😘
Agree with everything.
One of the main reasons I use cloud hosting is for network reliability.
Self-hosting means I'm at the mercy of my internet provider.
They don't go down often, but sometimes there are issues and self hosting would mean my services are down during this time.
Or are there solutions for this?
If you have a repeatable way to deploy (Kubernetes), then you can deploy to a different server (of a different provider) and switch you dns settings. This shouldn’t be a problem for static sites. When it’s a dynamic site (with a database) the data has to be synchronized as well, which can be more challenging.
i’d personally advocate for using a cheap VPS provider. do everything else the same, but don’t let yourself be at the mercy of your utility providers
This was great. So much learning.
What is this background music at 1:42? I m gonna add it to my focus playlist.
Great video! Totally agree with your point.
And I’m happy to find the channel that actually teaches you something, not just reports about done tasks. Keep it up!
P.S. music is a bit loud, sometimes it’s hard to hear voice.
«I refuse to use nano more than once per computer» spoken by a true gentleman.
Nice rant, even though a bit idealistic, thouroughly enjoyed!
This was great, could you do more videos like this showing CLI/Linux setup for hosting, services
Awesome presentation. Top notch content.
thats so cool, i usually write the thing and push it to github and click 3 buttons on the vercel admin page (y)
Fantastic tutorial. Thank you!
If you use NixOS, why not move docker compose YAML config into native NixOS config?
Docker is more flexible, you could move it to non nixos, or test it on your laptop, or deploy it in a swarm
@@mdxggxek1909but then why install nix os on the server? the whole point of nix os is the have a declarative configuration so no matter what it will be configured the same. with flakes you're even sure you have the exact same version of the software since it uses the git hash to in worst case rebuild the package. nixos can do everything docker can and more. you could even startup new vms just by declaring it in the config and rebuilding the system. and if something breaks, every state is safed for rollback. sorry i daily drive nixos and i just love being able to rebuild my pc with a single command. you could even just boot into the live iso and have the partitions made for you, via nix config.
ok this is interesting, gonna mark it until I have enough motivation back to watch and do it
Hi Tom this is a nice setup. I have a doubt regarding how did you map the Domain to your local network system ? You did port forwarding on your local router to enable this ?
Great video! do you have a website where I can read this back?
Dokku. I cannot recommend Dokku enough! We switch to dedicated hardware and Dokku (which is self-hosted Heroku that uses Docker) made it all possible. It's been an absolute pleasure to work with, and has been rock solid.
How would you handle payments using all self-hosted technologies?
I thought this video is about all the problems with using clouds, but it turns out to be a tutorial of setting up your own server. Not what I expected, but informative. However, I don't have all the free time to learn all the tech tools, sometimes paying for your time may seem a better choices.
I think self hosting is going to the other extreme. You get a lot of problems having to manage the physical servers yourself.
For instance, a startup i worked for that is now a unicorn started off in really crappy offices that kept getting burgled. They lost a number of macbooks. But if they had self hosted and the theives took the server, then it may be ge over for the startup at that point. Especially given customer data being lost (even if encrypted).
Companies could save a lot of money by just sticking to basic cloud services like EC2. A lot of other than AWS provide those so quite a competitive market. Then you just run your own services on the box.
Great video, thank you!
If you have static IP from your ISP, you can do it. Here they only give it if you are a business, not for regular people. I could use a DDNS service, but I need to play with my router settings... Maybe one day:D Until that, 5 USD linode server or 6 USD digitalocean server is the cheapest option
I can recommend Contabo for the same price. I'm not sponsored. But they have REALLY good specs
can you explain how you got a static IP to make it accesible from the internet