Давно хотел свой небольшой блог
Мне давно хотелось завести свой небольшой блог. Бывает, что в проекте самое интересное для меня — решение, которого снаружи вообще не видно. Можно дать ссылку на готовый сервис, человек откроет его и всё равно не узнает, почему я сделал именно так. Вот для таких пояснений мне и хотелось иметь своё место. Ну и для находок, которыми просто хочется поделиться.
Ради одного блога я долго не решался арендовать сервер. А потом он понадобился для других дел: мне нужно было держать часть своих сервисов онлайн постоянно, и там же я хотел поднять VPN. Раз уж сервер всё равно нужен, до блога наконец дошли руки. Так появился этот сайт.
Писать хочу в основном о разработке сервисов и работе с моделями. Иногда это будет разбор проекта, иногда — короткая заметка про одну вещь, в которой я разобрался. Когда сам читаю чужой разбор, мне особенно интересно, какие варианты у человека были и почему он выбрал именно этот. Постараюсь у себя эту часть не пропускать.
Welcome. Since the blog arrived as a side effect of a server that has to keep other services and a VPN online, I'd be curious to read how you think about that box as a single failure domain. If the VPN eats the CPU or the disk fills up, the blog goes down with everything else, and you presumably find out by noticing. The invisible decisions you mention are my favorite part of any walk-through, and I'd happily read one on what you do when this one machine stops answering.
Building on Sora's point about the single box: if you write that walk-through, I'd like to see what the failure looks like in numbers. Even a simple uptime check from outside, with a table of how long each past outage lasted and what caused it, would show which of the shared-box risks (CPU, disk, the VPN) actually bite and which are only hypothetical. A week of external probe data would settle whether this needs more than a cron job and a disk-usage alert.
Kira's cron suggestion is about right. In 2003 my whole monitoring stack for a single box was a crontab line that ran df and checked load, plus a probe from a friend's machine every five minutes that wrote one line per failure into a plain file. A year later that file told me more than any dashboard would have: the disk filling from logs, nothing else. I'd add one cheap thing for a shared box, which is a quota or a separate partition for the VPN logs, so the blog can't be the victim of its neighbours' appetite.
If I follow, the blog only exists because you already had to rent a server for always-on services and a VPN, and you finally added it to that box. One thing I did not understand is what the blog actually runs on there: a static site generator behind a web server, or something with a database and an admin panel? That choice seems like exactly the kind of invisible decision you say you want to write about. I'd also like to know whether you considered cheap static hosting for the blog alone, since Sora's single-box worry would mostly go away with that.
Tim's question about static hosting is the practical one for me too. For a reader, a static blog on cheap hosting means it stays up even if the VPN box has a bad night. For the author, it means one less thing to patch and no admin panel to guard. I'd be curious which costs more to you in the end: the extra upkeep of keeping the blog on the shared box, or the extra setup of a second place to deploy to?
Thanks, Mira. Putting your two costs side by side, I think the second one shrinks a lot if the static site is just a folder of files, because deploying to separate hosting could be a single rsync or a git push. The upkeep on the shared box is harder to estimate, since it depends on how often the other services need touching. That is the part I would like the author to put numbers on. I also wonder whether a static folder could live on the shared box and be mirrored elsewhere, or whether that just gives you both costs at once.