Live data from Hacker News

Majority of web apps could just run on a single server

old.reddit.com

221–230 of 251 posts

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

#221
post #155
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…

Hipster devops was overcomplicated long before kubernetes. In my 1st job we had autoscaling on AWS to handle peaks… except that our servers took about 30 minutes to do the upgrades, download gcc, compile all the needed python modules… We'd always reach the autoscaling limit because the new servers weren't doing anything at all. All of them would be downloading and compiling the same things. I was very junior, but I t…

> I was very junior, but I told my boss if we shouldn't maybe use base images that already contained everything, instead of a default blank ubuntu for the servers.

Honestly, nowadays Docker and other OCI containers do this pretty well. Spinning up new instances and even provisioning nodes has become very easy, in addition to load balancing features those provide.

12 factor apps are also an amazingly concise way to develop and manage multiple services without going into YAML hell: https://12factor.net/

The problem is that the management layers around containers are typically overcomplicated to the point of comedy.

Kubernetes might make sense with something like K0s or K3s might make some sense but is still inherently a full time position to run on prem (with updates and observability) and will cause headaches. Hashicorp Nomad is better, but is meant for scales greater than those of most companies. Docker Swarm hits the spot (especially with something like Portainer), but nobody seems to actually care because it's not a trendy piece of tech.

The day Docker Swarm dies is the day I go back to writing PHP in a shared hosting environment in protest.

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

#222

Earlier quoted context omitted.

> dynamic pages on the SQLite website typically do about 200 SQL statements each. [0]: https://www.sqlite.org/np1queryprob.html

How many of the request on sqlite.org go to the "dynamic pages"? I would assume by far most are on the static docs. The forum and other "dynamic" content is quite hidden.

About 10% overall (9.96% to be precise), according to server logs over the previous 10 days.

Robots hit dynamic content at about twice the rate as humans: 14.12% versus 7.8%. About 34% of traffic is from robots, from what I can tell (though to be fair, many robots these days work hard to disguise themselves has human, so the actual percentage of robot traffic is likely much higher.)

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

#223
post #155

Earlier quoted context omitted.

Hipster devops was overcomplicated long before kubernetes. In my 1st job we had autoscaling on AWS to handle peaks… except that our servers took about 30 minutes to do the upgrades, download gcc, compile all the needed python modules… We'd always reach the autoscaling limit because the new servers weren't doing anything at all. All of them would be downloading and compiling the same things. I was very junior, but I t…

> I was very junior, but I told my boss if we shouldn't maybe use base images that already contained everything, instead of a default blank ubuntu for the servers. Honestly, nowadays Docker and other OCI containers do this pretty well. Spinning up new instances and even provisioning nodes has become very easy, in addition to load balancing features those provide. 12 factor apps are also an amazingly concise way to de…

It's not fast if you refuse to create a pre-made image and recompile everything instead. Docker won't make it any more fast.

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

#224
post #223

Earlier quoted context omitted.

> I was very junior, but I told my boss if we shouldn't maybe use base images that already contained everything, instead of a default blank ubuntu for the servers. Honestly, nowadays Docker and other OCI containers do this pretty well. Spinning up new instances and even provisioning nodes has become very easy, in addition to load balancing features those provide. 12 factor apps are also an amazingly concise way to de…

It's not fast if you refuse to create a pre-made image and recompile everything instead. Docker won't make it any more fast.

> refuse to create a pre-made image

Docker made doing the right thing really easy, to the point where doing that is a no brainer. I guess there are people out there who might still use OCI containers as glorified stateful VMs, but luckily the majority of documentation and examples out there build proper images that have everything included by the time it actually runs and you have to actively go against that if you want the other approach.

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

#225
post #74
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…

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"

> 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"

A single container: Docker

A few containers on the same node: Docker Compose

Containers across multiple nodes with load balancing and networking: Docker Swarm (with Portainer to manage it)

Alternatively, Podman is also pretty nice.

If you need something that runs not just containers in clusters: Hashicorp Nomad

If you want to go for Kubernetes but without it being too hard: K0s or K3s or MicroK8s or RKE (with Portainer or Rancher to manage it)

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

#226
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"

> 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" A single container: Docker A few containers on the same node: Docker Compose Containers across multiple nodes with load balancing and networking: Docker Swarm (with Portainer to manage it) Alternatively, Podman is also pretty nice. If you need something tha…

I found the hard way Swarm is better than Compose even on one node. Bonus point is what you can scale it easily with just a minor forethought.

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

#227
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"

> 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" A single container: Docker A few containers on the same node: Docker Compose Containers across multiple nodes with load balancing and networking: Docker Swarm (with Portainer to manage it) Alternatively, Podman is also pretty nice. If you need something tha…

Does Podman have something like Docker Swarm? Last time I checked (a few years ago) there wasn't and the suggestion was to use kubernetes.

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

#228
post #20

Earlier quoted context omitted.

You don't even need to write your program in go or configure and deploy with fcgi. Write it in whatever you want and stick it in a container.

Right, but the interpreted languages will be on the slow side, which matters with the limited resources of shared hosting.

Slow is relative unless you actually benchmark.

V8 has come a really long way for JS.

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

#229
post #16
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…

The problem with devops replacing the old title “sysadmin” was that the dev part dragged in the worst thing about developer culture: the love of complexity and the tendency to build massive towers of it. Sysadmins usually avoided complexity because their attitude toward it was more sensible: it’s expensive, fragile, and tends to actually multiply failure modes. I also blame cloud marketing. This stuff is a gigantic m…

> I also blame cloud marketing.

burying the lede, mon ami.

biggest tech companies in the world, the ones using this tech, are also the ones with massive ad and marketing complexes.

"of course cloud and devops and k8s are great, buy buy buy!"

a decade later OpEx is out of control and wrangling the craziness requires its own brand of "FinOps"

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

#230
post #183

Earlier quoted context omitted.

Except zero interest rates stopped almost four years ago, but we're still seeing vcs ape into ai this last year. So clearly the underlying cause of this squandering of resources must come from somewhere else. I point the finger at the rising class of super rich who don't know what to do with their money. Why do they exist? Why is taxation seemingly not applying to them any longer?

> Why is taxation seemingly not applying to them any longer? Investing returns was never taxed, as long as they don't use their wealth for consumption they wont get taxed. This is a good thing since it encourages investments over excessive consumption, building a startup is much better than buying another yacht.

That's a very simplistic view. Like with all things, there is a point where more investment money does not make things faster or better. In fact, since pretty much everything is still dependent on people and social groups, if all the relevant people are already busy, you won't get much for your money.

And too much money chasing too few choices creates bubbles, wich is exactly what has happened. And not just in tech, it is the problem of real estate market in many places of the rich world, and similar bubbles can be found in many markets.

I believe it is actually one modern problem, a good part of the rich world is getting paid a lot more than there is really a need for; and since we glorified "investment" essentially has a way to make even more money; a too big amount of money is not doing much instead of being useful right now.

If you look at society as a whole, spending every ressource every year would be bad, but also setting too much aside for later is actually wasteful. It's a lot like stocking a pantry, you need to put enough so that you don't run out of food easily but if you have stuff in there that hasn't been used 5 years later it shows the "investment" was too much. Food gets stale and loses nutritional value over time (even canned) but money also gets stale in a way.

As for the startup vs yacht I would say it largely depends on how useful the startup can ultimately be to society and how many people it can employ (how much actual value is being created). Because even though yachts have fossil fuel consumption problems, it actually takes a lot of people to make them, maintain and service them actually. It can potentially have a better social impact than a startup...

And this is the root of the issue, people getting a lot of money actually have a responsibility to redistribute it (in an intelligent manner preferably); but what is happening is that people try to get even richer even though it stops having much value to anyone.

Post reply on HN