Earlier quoted context omitted.
Looks fine over here, and he doesn't have to route through a fucking Internet gatekeeper like Cloudflare or Amazon... let's enjoy this golden era before Chrome starts flagging any site which isn't fronted by a "reputable" cache like Cloudflare, Amazon, or whatever Google decides to introduce.
Oh I hate Google as much as the next guy, but that's not something they've shown any interest in doing.
My £4 a month server can handle 4.2M requests a day
61–70 of 479 posts
Re: My £4 a month server can handle 4.2M requests a day
#62Re: My £4 a month server can handle 4.2M requests a day
#63Re: My £4 a month server can handle 4.2M requests a day
#64What'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…
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
#65Dont mean to be the negative Joe but you dont need a webserver if you're serving a static-able website.
You mean use someone else's web server instead?
Re: My £4 a month server can handle 4.2M requests a day
#66Re: My £4 a month server can handle 4.2M requests a day
#67People tend to severely underestimate how fast modern machines are and overestimate how much you need to spend on hardware. Back in my last startup, I was doing a crypto market intelligence website that subscribed to full trade & order book feeds from the top 10 exchanges. It handled about 3K incoming messages/second (~260M per day), including all of the message parsing, order book update, processing, streaming to we…
Re: My £4 a month server can handle 4.2M requests a day
#68How did this make it to the number two spot on HackerNews?
I was talking with an architect at a bank whose team was having trouble getting under a 2-second maximum for page views. They blamed it on having to make TCP requests to other services, and said something like "at a couple hundred milliseconds per request, it adds up quickly!" My head nearly exploded at that. I spun up some quick tests in AWS to show exactly how many requests one could make in 2000 ms. I don't have the numbers handy, but the number is very large.
This junky slice of a server handling full page requests in 20 ms is a fine example to counter thinking that's endemic in enterprise spaces.
Re: My £4 a month server can handle 4.2M requests a day
#69Earlier quoted context omitted.
In their defence the sites that fail to load or take too long are usually full webapps that do a lot of work rather than just static sites.
The important message there is that if you can change your problem from serving slow dynamic content to serving static content you can gain enormous performance benefits. Whether that means actually using static sites for stuff that can be static or just properly caching expensive things. Even dynamic content doesn't have to be slow, but many CMS are seriously inefficient without a cache. I'm not really blaming the C…
Next has a thing called Incremental Static Regeneration[0] which allows us to grab the top ~100 pages from the CMS at build time, generate the pages, then cache them for however long we want. The rest of the pages are grabbed when requested, then are cached for the same amount of time. After the time, they're re-grabbed from the DB, then re-cached. Overall I think we're down to around 5-10% of the way things were done before, which was -- you guessed it -- hit the DB on every page load _just in case_.
Sit the Next.js site behind CloudFlare, and then we also don't really pay data transfer costs. Our servers are just low-tier GKE nodes, and we run around 3k/visitors at any given time, sometimes spiking up to 8k concurrent.
[0] https://nextjs.org/docs/basic-features/data-fetching#increme...
Re: My £4 a month server can handle 4.2M requests a day
#70There is a difference between being able to handle 4.2M requests a day, and handling 4.2M requests per day. Visitors don't come neatly one after the other. You might only have 1M requests a day but get random spikes with 100 requests at the same time.
I really suspect the website would fall long before it hits anything close to 4.2 million requests (which the author also seems to except).
That all said - long live tiny web servers!