Live data from Hacker News

Majority of web apps could just run on a single server

old.reddit.com

171–180 of 251 posts

Re: Majority of web apps could just run on a single server

#172
post #9

I can confirm. I've had quite a few projects that made it to the front page of HN and handled the traffic like cake. All of them ran on 5$ digital ocean droplets. I accept some projects are more resource expensive than others, but majority of the time you can get away with a bit of asynchronous responses + scheduler/queue to spread the load horizontally over time. Unpopular opinion: I blame the new age devops culture…

But there's a middle ground somewhere. The current DevOps culture comes from the FAANG guys who really are getting a bazillion requests per second. In the last decade I worked for Amazon, Avalara and Audible Magic. None of these could build an app around a Digital Ocean droplet. But I think you're pointing out there are PLENTY of useful webapps that can run on a minimal system. I'm just curious where the middle groun…

Yeah most people don't like getting an invoice for thousands of € because their website was under a DDOS.

Re: Majority of web apps could just run on a single server

#174
post #134

Gonna throw out an anti-cirlcenjerk take: We know. Absolutely no one has ever said that your super basic webapp that has the latency requirements of "make sure it works", an SLO of "it's fine most of the time", and a code base under 10k lines of code worked on by one guy, needs these super complicated systems. Even FAANG will run internal services and dashboards on a single binary, but when every second of downtime c…

Unfortunately many of these super-complicated systems run at odds to having a reliable and fast, system even when every second of downtime can be translated into lost money.

Realistically, they are required. I don't care how you do it, but you need 1. Seamless fail overs 2. Easy horizontal scaling 3. Location based load balancing 4. A way to deploy and rollback all of these automatically. As a result, things are gonna get complicated no matter what you do. But as it turns out, using something like Kubernetes, Elixir, or AppEngine can make all of that very manageable.

Re: Majority of web apps could just run on a single server

#175

Earlier quoted context omitted.

Most companies are too full of themselves to do an honest assessment of their uptime requirements though. Every company out there loudly claims they need 100% uptime, which grifters will be happy to sell them knowing nobody will actually put their solution to the test and if it does fail they'll have a myriad of moving parts to shift the blame to. If you look at the very few things that do actually need 100% uptime (…

You are aware bloomberg presents at CNCF?

Bloomberg is a large company with many different products, people/teams and priorities. But as far as I know Bloomberg doesn't actually provide order execution which is what I was referring to when I said "stock market".

Re: Majority of web apps could just run on a single server

#176
post #9

I can confirm. I've had quite a few projects that made it to the front page of HN and handled the traffic like cake. All of them ran on 5$ digital ocean droplets. I accept some projects are more resource expensive than others, but majority of the time you can get away with a bit of asynchronous responses + scheduler/queue to spread the load horizontally over time. Unpopular opinion: I blame the new age devops culture…

> unnecessarily complicated with k8s Kubernetes is/was a way to fight off walled gardens from cloud providers. The other path would have been to learn the bespoke implementation of each cloud provider depending on what that employer ended up using. Kubernetes was at the right place, at the right time just as AWS was trying to force feed people their own proprietary solution, as Azure was trying to wall off people int…

> This is in contrast to the experience of a Python developer who's mastered FastAPI/Flask/SQLAlchemy and feels absolutely lost in a Django project

If he has more than 6 months of experience he will figure it out.

Re: Majority of web apps could just run on a single server

#177
post #136

Earlier quoted context omitted.

It's really not that hard if you got proper users. But doing proper users on k8s is hard. I suspect they just run with admin credentials and no real way to generate users.

For small cluster you can just create service account for a user, create token for it and write it in the kubeconfig. Then assign role to this service account and that's about it. The main issue with this approach is that you can't organize those "users" into a groups. But for a small number of users you can just create all rolebindings and be done with it.

Yes. I was thinking of that for a moment as well. But it requires some understanding and is annoying in various ways.

I should look into how to provision users at some point. but OTOH GKE takes care of it for our prod, and other clusters can be run with just admin.

Re: Majority of web apps could just run on a single server

#178
post #77
post #56

At Standard Ebooks we serve a respectable number of page views and ebooks each month - and have been on the front page of HN three or four times - all of it done with a single 4GB VPS. And the only reason we upgraded to 4GB from 2GB is because we needed more RAM for the server to build the extremely large Decline and Fall of the Roman Empire ebook - if it weren't for that, our 2GB server would still have been just fi…

A lot of resources go to scaffolding for containers, runtimes, caching, etc. 4gb would make for a chugging experience if you run a Java spring boot backend for example. But an old school php + postgres stack would be fine, or modern dotnet, rust, etc. And honestly I'm not sure it matters since ram and compute is cheap for most small-medium sites (at worst maybe $30-50/mo vs $10-20/mo). VPS services are pretty cheap t…

Remember that rust doesn't catch all the memory leaks… So a long running rust process might degrade the performances in the machine, slowly.

Re: Majority of web apps could just run on a single server

#179
post #135
post #74

Earlier quoted context omitted.

I think that the $5 tier is a little tight for a web app as opposed to a crud app, but 2x $40 tiers is enough for a decent amount of traffic, with one as a failover. The problem is that containers are excellent, and IMO there's a gap in the market between "I want to run one container" and "I want a fully managed k8s cluster"

Why not use a single Fargate task?

All my teams infra runs on fargate + ECS so I'm pretty familiar (and happy) with it. Running in fargate requires knowlege of AWS: VPC's, public and private subnets, security groups, ECR, ALB's, Target Groups, IAM policies + roles. Then, when you want to add a databse, you're back into all of the above, plus the database specific ones like database subnet groups.

When it comes to health checks you have docker health checks, container health checks, load balancer health checks - all of which are configured separately.a Not to mention, doing it "properly" where your task doesn't have a public IP and is only accessible through your load balancer - [0] might be one of the most infuriating responses on stackoverflow.

Meanwhile, with DO droplets, it's pretty much "here's a registry URL, and some configuration in YAML, go for it".

[0] - https://stackoverflow.com/questions/61265108/aws-ecs-fargate...

Post reply on HN