3 ms·
Personally I could never get into k8s. For most of my use-cases, simply getting a VPS, or having a Dockerfile is enough. Most apps can run fine for millions or
by XCSme 2y ago
Personally I could never get into k8s. For most of my use-cases, simply getting a VPS, or having a Dockerfile is enough.
Most apps can run fine for millions or hundreds of thousands of user sessions on a $5-$50 VPS. People prematurely optimize for scale, adding a lot of complexity that only makes development slower, and by having more moving parts, there are more things that can break. Start simple. Scaling is mostly a solved problem nowadays, if you quickly need to scale, there are always solutions to do so. In the worst case, you have to scale horizontally, and if you reach the limit of horizontal scaling, other your app is inefficient, or your business is already successful, so you are no longer in the "start" phase.
- pdimitar 2y agoYep, strong agree here, and indeed the modern hardware can achieve mind-blowing stuff. I have used a $250 laptop (i5 CPU that's now 8-9 years old, 16GB RAM, SATA SSD) to stress test some of my Rust apps and I could achieve ~250K requests per second. Sure that doesn't apply to all tech (f.ex. my favorite Elixir is much slower than this) but for most intents and purposes a plain old VPS with good backups is quite enough and always will be. Or if you are particularly paranoid like myself: have a load balancer and have 2-3 copies of your app servers, 1 DB server, and overzealous backup scripts.
- XCSme 2y agoA bit offtopic, but do you recommend any load balancer? I could have another VPS as a load balancer, but what if goes down? The load balancing services seem quite expensive, as they charge per request.
- XCSme 2y agoOne solution I was thinking of, is to load balance using DNS, or at least to have failure recovery using DNS (one server goes down, update the DNS to point to the other server). I am fine with a small downtime.
- pdimitar 2y agoAh, I meant use your hosting provider's load balancer + use their VPS-es. I think Digital Ocean allows this, AWS and GCP as well. That way you're outsourcing the problem of "but what if the load balancer itself falls down?".
- XCSme 2y agoI usually want to load-balance between different hosting providers (so if AWS goes down, I still have DO running). From what I've seen, most of them only provide load-balancing within their local networks.
- pdimitar 2y agoHmmmm... Cloudflare then?
- XCSme 2y agoThat's a good idea, I was considering it, looked at their pricing, but was too expensive. Also, I'm starting to dislike having everything go through Cloudflare (all my DNS). I don't dislike the company, I just don't like one entity controlling the entire internet. I don't want even more vendor-lock-in tbh. I'm gravitating towards the failover solution, to have a VPS do health-checks on my services, if one goes down, use the Cloudflare API to update the DNS entries to the backup servers.
- pdimitar 2y agoYeah, in that case I'd say you're best served by having a mini PC at home, connected to an UPS (or just an old laptop, their UPS is their battery) and have your control plane be on it. I sympathize with your reservations, it's just that at this stage of my life I am OK with having some loose ends in my infrastructure. To me CF is a good tradeoff (also I am pretty sure their free tier is quite generous? but maybe I am thinking different kinds of services) for the moment. But in light of the recent French court order to main providers (CF included) to poison DNS in order to fight the anti-piracy circumventing users... maybe we should just move the entire control plane to Tor, or use the regular internet but doubly/triply encrypted, or use stuff like Freenet / NNCP etc. I'll arrive at your conundrum soon enough though, I too want complete independence but I am slightly scared because the current internet infrastructure is constantly under attack to make it more malleable to censorship. Whatever people might think of piracy or any other scapegoat ("think of the children" seems to always be the adage) censorship is still not okay.