4 ms·
Host your website on Netlify and Cloudflare so you don't have to worry about bandwidth, power/network interruption
by hakube 6y ago
Host your website on Netlify and Cloudflare so you don't have to worry about bandwidth, power/network interruption
- ryanmjacobs 6y agoAs someone who just moved away from the exact Github->Netlify-Cloudflare stack... here's my two cents. Yes, it does make deploys easier. You don't "have to think" anymore. Well, that's the argument. I self-host by creating a git bare repo on a server, ala `git init --bare mysite.com.git` and cloning that repo again for the web server (`git clone mysite.com.git mysite.com`). Now add this git hook in the bare repo: #!/bin/bash cd /home/ryan/mysite.com unset GIT_DIR git restore . git pull exec ./build.sh >/dev/null Now my deploys take a second and become visible immediately. If you are intending on serving 1000s of requests per second, sure you might need CDNs and caching. But... if your hosting a portfolio/blog website, you might not need it. On top of that, demonstrating knowledge of backends is never a bad thing for a personal website.
- oefrha 6y ago1. Your deployment is not atomic. Probably should consider checking out to and building in a different directory, then atomically switch (symlink is an easy way to achieve atomicity). 2. Using a good CDN ensures your site is fairly responsive on (hopefully) all continents. Your server probably isn’t. Your closet server — even less.
- ryanmjacobs 6y agoOh shoot yeah symlinking sounds like a good idea. I should try that out. The thing is, for the amount of visitors I have, both of those points are kinda moot.
- oefrha 6y agoAtomic update is just good engineering practice regardless, and it’s pretty easy to work into your existing flow. As for responsiveness, it’s a good thing to proactively prepare for an HN hug of death ;) It also starts to matter when the traffic crosses into 100k a day, as is the case in TFA.
- Lammy 6y ago"Join a silo" is exactly the last thing somebody interested in selfhosting for selfhosting's sake is going to want to do =p
- gruez 6y agoThe article literally says to use a CDN.
- ulisesrmzroche 6y agoWhy don’t y’all ever read the article before commenting? As if no one is going to notice
- steveklabnik 6y agoNetlfiy is great, but we (Cloudflare) also have Workers Sites, which lets you do it 100% in Cloudflare: https://workers.cloudflare.com/sites https://workers.cloudflare.com/sites