News for hackers. Stuff that matters.
Re:My £4 a month server can handle 4.2M requests a day by polote on Tuesday September 07, 2021 @05:20PM (#28450099)
What's the point of this post? OP is serving a file at 50req/sec. There is not even mention of a dB query. How is that able to relate to any kind of normal app?

I guess that the post was written as an answer to the mangadex post [1]. Mangadex was handling 3k req/sec involving dB queries. It was not just a cached Html page.

50req/sec for a Html file is super low which shows that a $4 month server cant do much actually. So yes this is enough for a blog, but a lot of websites are not blogs

[1] https://news.ycombinator.com/item?id=28440742

Re:My £4 a month server can handle 4.2M requests a day by throwdecro on Tuesday September 07, 2021 @05:34PM (#28450247)
> How is that able to relate to any kind of normal app?

There's too much competition involved in writing normal apps, which often attract significant investment that bootstrapped startups struggle to compete with.

It's interesting to see what kind of performance is possible for next to no money, when you throw out basic assumptions like using a database, and then start thinking about what you could build out of it.

Re:My £4 a month server can handle 4.2M requests a day by quickthrower2 on Tuesday September 07, 2021 @05:56PM (#28450428)
My recent submission of HNBadges was made like this. It's just 3 files (html, css, JS) which I hosted for free on Netlify, but could have been hosted on a setup like OP. I used other services for XHR requests. I imagine it got a tonne of traffic from being on the first page, but I wasn't taking metrics.

Another example of clever use of resources is the https://haveibeenpwned.com/ website. Using a bloom filter (I think) to turn what could have been a back-end lookup into a "front end lookup" by requesting a small file from the server based on the password hash.

The only issue I have with the OP is his assumption that you'd get a nice smooth 60 request/second throughout the day! Most likely will be lumpy, and in the top of the lumpy periods (where most of your visitors visit) performance will be bad.

Re:My £4 a month server can handle 4.2M requests a day by wyager on Tuesday September 07, 2021 @07:36PM (#28451147)
My $5/mo server can handle several thousand requests per second. It’s mostly a question of what server software you use. If you use some node, python, ruby thing, it’s going to be slow as shit and need a reverse proxy in front of it. If you use a fast compiled language with a good framework, you can rip through requests no problem.

I tried a bunch of different stuff and ended up using Haskell - all of its popular web libraries are fast as hell. Go was fast but its standard library leaked sockets or I was not cleaning up connections properly or something, and it would tank whenever something went viral. All the popular interpreted language backend I tried were absurdly slow, like tens of RPS.

Source for my current thing is at http://yager.io/Server.hs. It also does all my RSS stuff, image processing for my photo gallery, etc.

Re:My £4 a month server can handle 4.2M requests a day by pdimitar on Tuesday September 07, 2021 @08:12PM (#28451385)
I'm curious if you evaluated Rust?
Re:My £4 a month server can handle 4.2M requests a day by wyager on Tuesday September 07, 2021 @09:47PM (#28452045)
At that point there were not any tried and true Rust web frameworks, although a priori I would expect any Rust web offerings to be pretty solid.
Re:My £4 a month server can handle 4.2M requests a day by vymague on Tuesday September 07, 2021 @06:36PM (#28450734)
> What's the point of this post? OP is serving a file at 50req/sec.

I'd guess a response to the mangadex thread? https://news.ycombinator.com/item?id=28440742

Re:My £4 a month server can handle 4.2M requests a day by SPBS on Wednesday September 08, 2021 @02:59AM (#28453969)
No way, OP is essentially serving a static webpage from a database. That's nothing to brag about if comparing with mangadex.
Re:My £4 a month server can handle 4.2M requests a day by Arch-TK on Tuesday September 07, 2021 @06:07PM (#28450531)
>There is not even mention of a dB query.

Did you read the post?

Re:My £4 a month server can handle 4.2M requests a day by wokwokwok on Tuesday September 07, 2021 @08:37PM (#28451562)
> These benchmarks show that a very cheap server can easily handle 50 requests a minute to a "full stack" website.

I did, and all I see is someone spinning some numbers idly, like, hey, if I can lay 1 brick every second, then with 20000 people we can build a house in one second! So good!

a) entirely and totally lacking in experience running a heavy load website.

b) 50 requests a minute is so atrociously bad, it’s not even worth talking about.

c) there isnt any db load going on here, this is a full page single table query. See https://docs.djangoproject.com/en/3.2/ref/contrib/flatpages/

Sure maybe a db exists, but it’s not relevant when you compare this to the complexity of doing write operations.

Ie. this is some hiiiigh level arm chair commentary right here.

Sure, they’re just talking about their website, but anyone going “oh yeah, look at this, those mangadex guys should learn a thing or two and run it on django”. …has no idea what they’re talking about.

Re:My £4 a month server can handle 4.2M requests a day by ac29 on Tuesday September 07, 2021 @10:04PM (#28452150)
> b) 50 requests a minute is so atrociously bad, it’s not even worth talking about.

That was a typo, the worst performance they tested was 54 reqs / second.

Re:My £4 a month server can handle 4.2M requests a day by Arch-TK on Tuesday September 07, 2021 @09:56PM (#28452099)
>there isnt any db load going on here

This is shifting the goal posts. Your initial comment claimed that there are no database queries being made.

In any case, you've amended your argument, I have no further comments.

Re:My £4 a month server can handle 4.2M requests a day by latexr on Wednesday September 08, 2021 @06:40AM (#28455303)
From the guidelines[1]:

> Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."

[1]: https://news.ycombinator.com/newsguidelines.html

Re:My £4 a month server can handle 4.2M requests a day by great-potential on Tuesday September 07, 2021 @05:43PM (#28450330)
Exactly, I dont see the point bragging about this nevertheless posting about it on HN ...
Re:My £4 a month server can handle 4.2M requests a day by vietvu on Monday September 13, 2021 @12:58AM (#28507999)
People just want to show their works, it's normal. What I found strange is that not many people seems to be surprised about this and upvote.
Re:My £4 a month server can handle 4.2M requests a day by gaptoothclan on Tuesday September 07, 2021 @05:59PM (#28450465)
Is this just an apache bench mark
Re:My £4 a month server can handle 4.2M requests a day by napworth on Tuesday September 07, 2021 @05:47PM (#28450370)
It's called boasting
Re:My £4 a month server can handle 4.2M requests a day by sillycube on Tuesday September 07, 2021 @11:40PM (#28452744)
Boasting of what? Serving static sites doesn't even need a server.

Use apache to serve Django + wsgi? Just use Django asgi and nginx and you will get a higher number.

Re:My £4 a month server can handle 4.2M requests a day by TruthWillHurt on Tuesday September 07, 2021 @05:46PM (#28450359)
+1. I remember modest VPS/Parrallels serving PHP at 350r/s
Re:My £4 a month server can handle 4.2M requests a day by quickthrower2 on Tuesday September 07, 2021 @05:57PM (#28450447)
Something like:

    <?php echo("this is a benchmark") ?>