Live data from Hacker News

Majority of web apps could just run on a single server

old.reddit.com

71–80 of 251 posts

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

#71
I have been running multiple web apps with decent traffic (each ~10K requests per day) at no cost at all. Oracle Free Tier [1] for backends with Cloudflare tunneling [2] and pages [3] for frontend integration. Works fully seamless.

[1] https://www.oracle.com/cloud/free/ (4 cores, 24 GB ram for free; switch to PAYG to avoid idleness shut down, but you still pay nothing)

[2] https://www.cloudflare.com/products/tunnel/ (protects from attack and automatically connects your backend IP into your domain, e.g. https://domain.com/api will redirect to your backend)

[3] https://pages.cloudflare.com/ (easy static page hosting, very fast deploys)

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

#72
post #49

Earlier quoted context omitted.

You can deploy k8s on a single machine though. This way you get the benefit of a standardized, documented API without the burden of multiple machines.

Your still setting up K8's... I have scp'd my go binary and set it up in system d. Nothing about K8 or containers are light... they are buckets where bad devs hide the bodies in most cases.

kubernetes is also a static go binary (kubelet) deployed with systemd!

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

#73

Can the majority of webapps run on a single machine? Probably. Do most of your customers expect close to 100% uptime? Yes. Does one machine provide the uptime required by your customers? Most definitely not.

>Do most of your customers expect close to 100% uptime? Yes.

I think this is mostly a self imposed requirement. Banks regularly have overnight technical breaks. My country national rail has 30 minutes of downtime every night (!).

Unless your product is already global, most people won't have a problem with occasional overnight scheduled downtime.

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

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

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

#75
No one's gonna promote you for proposing to build a monolithic app with the DB and queue on the same machine. Gotta have microservices built in Rust talking to micro-frontends built with the latest and greatest JS framework, all orchestrated by K8S running on a fleet of machines to seem hip!

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

#76
post #61
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've never come across a devops person who'd say "Hey, that sofware is too simple to prematurely scale for sudden spikes of irrational amounts of traffic, so why not just deploy it on a cheap vps?" Was a devops engineer at my previous job. We already had k8s clusters setup, pre-made CI templates and pre-tailored helm charts (along with monitoring and much more). All those things you (a developer) could mostly clone…

You're not wrong.

K8s, containers in general, aren't solving the problem.

Developers write apps, engineers write software.

One is installable, it respects the system it lives on, It can be tuned to use the hardware it has or share.

The other, the other is a bucket of shit in a bag. The bag protects you and everyone else from it contaminating everything it touches.

Containers dont solve the problem they just enable it.

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

#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 these days. Hetzner, digital ocean, genesis, etc. Or you spend a couple grand to build a dedicated machine in raid6 and only pay utilities.

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

#78

If your app doesn't server more requests than sqlite.org daily, you shouldn't pay more than it. > sqlite.org answers more than 500,000 HTTP requests per day (about 5 or 6 per second) delivering about 200GB of content per day (about 18 megabits/second) on a $40/month Linode. The load average on this machine normally stays around 0.5. [0]: https://sqlite.org/althttpd/doc/trunk/althttpd.md

I mean it really depends on what your doing. If you’re just serving static content then of course you can get away with one small box. If you have user content that’s being constantly updated and inserted you need a lot more. You need databases, caches, and in our case elastic search (with ~10 billion documents). The data needs to be indexed 16 ways to Sunday to make sure that a user hitting the page with this filter…

> dynamic pages on the SQLite website typically do about 200 SQL statements each.

[0]: https://www.sqlite.org/np1queryprob.html

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

#79
post #72

Earlier quoted context omitted.

Your still setting up K8's... I have scp'd my go binary and set it up in system d. Nothing about K8 or containers are light... they are buckets where bad devs hide the bodies in most cases.

kubernetes is also a static go binary (kubelet) deployed with systemd!

Why use k8s over just a docker container?

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

#80

In fact, a single five euro server can run: My personal website, Two multiplayer game servers for the games I built, frp for tunnelling; and I'm planning on squeezing more in until it gives up. All reverse-proxied by nginx under subdomains of my personal domain address, absolutely seamless. Similarly, other applications I built so far all also run under five euro VMs. There's no denying you might need more because yo…

> Similarly, other applications I built so far all also run under five euro VMs. There's no denying you might need more because you have serious peaks in traffic that you cannot handle with only one server, but do the accounting. A simple proportional-integral-derivative controller equipped onto your server resource can help you see if future traffic spikes are occurring. The question is, what kind of person is able…

I'm partial to forecasting volatility via GARCH models as well!
Post reply on HN