Most active commenters
  • diggan(3)
  • npsomaratna(3)

←back to thread

260 points scastiel | 39 comments | | HN request time: 0.842s | source | bottom
Show context
Dachande663 ◴[] No.41879983[source]
I love the idea of this but, given the traffic numbers, this could run on a $4 Digital Ocean droplet and have the same result. They've burnt over a grand just to use vercel. Maybe I'm just older but I don't understand the logic here. A basic VPS, setup once, would have the same result and would be neutral in cost (it's how I run my own little free apps). Maybe the author is lucky enough that $100/mo doesn't really affect them or they're happy for it to pay for the convenience (my assumption).
replies(2): >>41880001 #>>41880047 #
1. scastiel ◴[] No.41880001[source]
Running a database accessed that many times on a $4 Digital Ocean droplet? I'd be very curious to see that ;)

The web hosting costs basically nothing. Most of the cost comes from the database.

replies(12): >>41880056 #>>41880066 #>>41880076 #>>41880501 #>>41880784 #>>41881017 #>>41881172 #>>41881238 #>>41881868 #>>41882316 #>>41884008 #>>41887515 #
2. diggan ◴[] No.41880066[source]
> Running a database accessed that many times on a $4 Digital Ocean droplet?

How many times per second is the DB actually accessed? As far as I can tell my the metrics, they're doing ~1.7 requests/minute, you'll have a hard time finding a DB that couldn't handle that.

In fact, I'd bet you'd be able to host that website (the database) in a text file on disk without any performance issues whatsoever.

3. ndriscoll ◴[] No.41880076[source]
6k visits per week * 5 page views per visit is one view per 20 seconds on average. Even very modest hardware with naively written application code should have no problem handling thousands of CRUD database queries per second (assuming every query doesn't need a table scan or something).

Modern computers are mind-bogglingly powerful. An old laptop off eBay can probably handle the load for business needs for all but the very largest corporations.

replies(3): >>41880198 #>>41880307 #>>41880361 #
4. ◴[] No.41880184[source]
5. npsomaratna ◴[] No.41880198[source]
My understanding is that DO VPS’ are underpowered (as are VPS offerings from most other VPS vendors). Dollar for dollar, bare metal stuff from Hetzner, OVH, etc are far more powerful.

That said, I completely agree-a $4/month DO VPS can run MySQL, and should easily handle this load; in fact I’ve handled far bigger loads in practice.

On a tangent: any recommendations for good US-based bare metal providers (with a convenience factor comparable to OVH, etc)?

replies(2): >>41880219 #>>41880812 #
6. diggan ◴[] No.41880219{3}[source]
> good US-based bare metal providers

The times I've needed it, DataPacket (not based in US, but has servers in the US) and Vultr (based in the US) have both been good to me.

replies(2): >>41880275 #>>41882269 #
7. npsomaratna ◴[] No.41880275{4}[source]
Thank you so much. I’ll take a look at these.
8. horsawlarway ◴[] No.41880307[source]
So many people don't seem to understand how efficient modern machines are.

As someone who is literally using old laptops to host things from my basement on my consumer line (personal, non-commercial) and a business line (commercial)...

I can host this for under 50 bucks a year, including the domain and power costs, and accounting for offsite backup of the data.

I wish people understood just how much the "cloud" is making in pure profit. If you're already a software dev... you can absolutely manage the complexity of hosting things yourself for FAR cheaper. You won't get five 9s of reliability (not that you're getting that from any major cloud vendor anyways without paying through the nose and a real SLA) but a small UPS will easily get you to 99% uptime - which is absolutely fine for something like this.

replies(2): >>41880455 #>>41882454 #
9. tmpz22 ◴[] No.41880361[source]
You're right but I'll play devil's advocate for teaching purposes:

* Usage won't be uniformly distributed and you may need to deal with burst traffic for example when a new version is released and all your users are pulling new config data.

* Your application data may be very important to your users and keeping it on a single server is a significant risk.

* You're users may be geographically distributed such that a user on the other side of the world may have a severely degraded experience.

* Not all traffic is created equal and, especially paired with burst traffic, could have one expensive operation like heavy analytical query from one user cause timeouts for another user.

Vercel does not solve all of these problems, but they are problems that may be exasperated by a $4 droplet.

All said I still highly encourage developers to not sell their soul to a SaaS product that could care less about them and their use case and consider minimal infrastructure and complexity in order to have more success with their projects.

replies(3): >>41880899 #>>41883976 #>>41886671 #
10. beeboobaa3 ◴[] No.41880455{3}[source]
The problem is that my coworkers are morons who seem incapable of remembering to run a simple `explain analyze` on their queries. They'd rather just write monstrosities that kindasorta work without giving a single damn about performance.

It seems like computers are getting more capable, but developers are becoming less capable at roughly the same pace.

replies(2): >>41880752 #>>41881767 #
11. fs0c13ty00 ◴[] No.41880501[source]
My open source service, lrclib.net, handles approximately 200 requests per second at peak (yes you read that right, it's approximately 12000 requests per minute) on a simple €13 Hetzner cloud server (4 AMD based VCPU, 8GB RAM). I'd love to write a blog post about how I made it possible sometime in the future, but basically, I cheated by using Rust together with SQLite3 and some caching.

I was surprised by the cost of Vercel in that blog post too, which is why I dislike all kinds of serverless/lambda/managed services. For me, having a dozen people subscribing to $1-$2/month sponsorship on GitHub Sponsors is enough to cover all the costs. Even if no one donates, I’d still have no trouble keeping the project running on my own.

12. 9dev ◴[] No.41880752{4}[source]
> It seems like computers are getting more capable, but developers are becoming less capable at roughly the same pace.

And that makes perfect sense. Why should humans inconvenience themselves to please the machine? If anyone’s at fault, it’s the database for not being smart enough to optimize the query on its own.

replies(2): >>41880814 #>>41880958 #
13. Dachande663 ◴[] No.41880784[source]
I didn't mean it quite so insultingly, but yes, even a very modest server would handle that kind of load easily. You're not particularly high throughput (a few requests per second?) and I imagine the database is fairly efficient (you're not storing pages of text or binary blobs). I think you'd be pleasently surprised by what a little VPS can do.
14. mxuribe ◴[] No.41880812{3}[source]
Hetzner is of course not U.S. based, but has expanded to have 2 U.S. sites (Oregon i think, and Virginia)....so that could be an option maybe. Caveat: i have not leveraged Hetzner in the U.s.....so can not speak to their quality.
replies(1): >>41880925 #
15. ffsm8 ◴[] No.41880899{3}[source]
* that's just static files. Even a $4 droplets will hardly ever get into issues serving that, even with hundreds of simultaneous requests.

* Okay, I guess that means we should use 2? So that's $8 now.

* Vercel really doesn't help you there beyond serving static files from cdn. That hardly matters at this scale, you should keep in mind that you "only" add about 100ms of latency by serving from the other side of the globe. While that has an impact, it's not really that much. And you can always use another cdn too. They're very often free for html/js/css

* Burst traffic is an issue, especially trolls that just randomly DOS your public servers for shits and giggles. That's pretty much the only one vercel actually helps you against. But so would others, they're not the only ones providing that service, and most do it for free.

Frankly, the only real and valid reason is the previously mentioned: they've likely got the money and don't mind spending it for the ecosystem. And if they like it... Who are we to interfere? Aside from pointing out how massively they're overpaying, but they've gotta be able to handle that if they're willing to publish an article like this

replies(1): >>41885607 #
16. npsomaratna ◴[] No.41880925{4}[source]
That’s news thank you. I’ll check this out.
replies(1): >>41880967 #
17. ndriscoll ◴[] No.41880958{5}[source]
At my last job, we had architects pushing to make everything into microservices despite how absolutely horrible that idea is for performance and scalability (and understanding and maintainability and operations and ability for developers to actually run/test the code). The database can't do anything to help you when you split your queries onto different db instances on different VMs for no reason.

I heard we had a 7 figure annual compute spend, and IIRC we only had a few hundred requests per second peak plus some batch jobs for a few million accounts. A single $160 N100 minipc could probably handle the workload with better reliability than we had if we hadn't gone down that particular road to insanity.

replies(1): >>41881676 #
18. mxuribe ◴[] No.41880967{5}[source]
Uh, actually at a quick glance, seems the U.s. sites are more for their cloud offering and maybe not bare metal servers.....i think (sadly): https://www.hetzner.com/cloud
19. explain ◴[] No.41881017[source]
Running the 800th most popular website in the world (25-50M pageviews per day) on a 1GB VPS (Spring Boot, MariaDB, Redis)

Very possible.

20. avree ◴[] No.41881172[source]
It’s surprising that you ask for advice on this topic in your blog, but then are very dismissive (complete with sarcastic wink) to the advice?
21. codazoda ◴[] No.41881238[source]
I think it would be fine. I run a little private analytics service for my own websites. That service isn't as busy but handles ~11k requests per month. It logs to a SQLite database. It does this on a little Raspberry Pi 400 in my home office and it's not too busy. The CPU sits at 1% to 3% on average. Obviously there are a lot of differences in my setup but I would think you could handle 10x the traffic with a small VPS without any trouble at all.

You can read a little bit more about my analytics setup here:

https://joeldare.com/private-analtyics-and-my-raspberry-pi-4...

22. ffsm8 ◴[] No.41881676{6}[source]
> ... microservices despite how absolutely horrible that idea is for performance and scalability

Heh, remind me of a discussion I had with a coworker roughly 6 month ago. I tried to explain to them that the ability to scale each microservices separately almost never improves the actual performance of the platform as a whole - after all, you still need to have network calls between each service and could've also just started the monolith twice. And that would've most likely even needed less RAM too, even if each instance will likely consume more - after all, you now need less applications running to serve the same request.

This discussion took place in the context of a b2e saas platform with very moderate usage, almost everything being plain CRUD. Like 10-15k simultaneous users making data entries etc.

I'm always unsure how I should feel after such discussions. On the one hand, I'm pretty sure he probably thinks that I'm dumb for not getting microservices. On the other hand... Well... ( ꈍ ᴗ ꈍ )

23. tbrownaw ◴[] No.41881767{4}[source]
> It seems like computers are getting more capable, but developers are becoming less capable at roughly the same pace.

"Andy giveth, and Bill taketh away."

Computers keep getting faster (personified as Andy Grove, from Intel), and software keeps getting slower (Bill Gates, from Microsoft).

24. klabb3 ◴[] No.41881868[source]
You could run it on Cloudflare workers for free with plenty to spare. You get 5M reads/100k writes per day on D1.

OTOH If you want managed Postgres it seems like you always have to pay a fairy high minimum.

25. mminer237 ◴[] No.41882269{4}[source]
In a trademark travesty, I must ask DataPacket.com or DataPacket.net?
replies(1): >>41883925 #
26. bdlowery ◴[] No.41882316[source]
https://f5bot.com/ was free for like 8 years and it processed hundreds of thousands of db records a day, and it barely cost anything.
27. immibis ◴[] No.41882454{3}[source]
As DHH said somewhere, it's incredible that the modern cloud stack has managed to get PROGRAMMERS to be scared of COMPUTERS. Seriously, what's with that? That shouldn't even be possible?

If you can understand programming, you can understand Linux. Might take a while to be really confident, but do you need incredible confidence when you have backups? :)

replies(2): >>41883107 #>>41884313 #
28. GreenWatermelon ◴[] No.41883107{4}[source]
Not just somewhere, but in Rails World 2024 Opening keynote, and it was absolutely hilarious!

Especially with that meme he showed about vercel is laws +500% markup lmaoo

Don't be afraid of computers, don't be the pink elephant!

29. diggan ◴[] No.41883925{5}[source]
Sorry, I was referring to datapacket.com
30. Quothling ◴[] No.41883976{3}[source]
Is this really playing the devil's advocate though? I know this is a simplification but Stack Overflow launched on a couple of IIS servers and rode their exponential growth rather well. Sure they added more than "a couple" of web servers and improved their SQL server quite a bit, but as far as I recall they didn't even shift to CDN until five or six years after they grew. Eventually they moved into the cloud, but Spliit doesn't even have a fraction of the traffic SO did in its early days. As such I don't think any of the challenges you mention are all that relevant in the context aside from having backup. Perhaps also some redundancy by having two $4 droplets?

Is the author even getting paid for their services though? If they aren't then why would they care? I don't mean that as rude as it sounds, but why would they pay that much money so people can use their product for free?

31. trollied ◴[] No.41884008[source]
"that many times". It's nearly zero traffic.
32. GreenWatermelon ◴[] No.41884313{4}[source]
Far too late for the edit window, but the keynote[1] is an absolute must-watch for anyone who does anything related to web development

[1] https://www.youtube.com/watch?v=-cEn_83zRFw

33. jasonm23 ◴[] No.41885607{4}[source]
People use Vercel ... because...

...haven't worked it out yet, all I can come up with is "they don't know any better".

Surely that can't be true?

34. 9dev ◴[] No.41886112{6}[source]
That’s besides the point I’m making. Technology should develop towards simplifying humanity’s life, not making it more complicated. It’s a good thing we don’t have to use clever loop constructs anymore, because compilers do it for us. It’s a good thing we don’t have to obsess about the right varchar size anymore, because Postgres‘ text does the right thing anyway.

It’s a systemic problem. You’re going to loose the battle against human nature: Ever noticed how, after moving from a college dorm into a house, people suddenly manage to fill all the space with things? It’s not like the dorm was enough to fit everything they ever needed, but they had to accommodate themselves to it. This constraint is artificial, exhausting to keep up, and, if gone, will no longer be adhered to.

If a computer suddenly becomes more powerful, developers aren’t going to keep up their good habits performance optimisation, because they had those only out of necessity in the first place.

replies(1): >>41888158 #
35. hypeatei ◴[] No.41886671{3}[source]
> may be geographically distributed such that a user on the other side of the world may have a severely degraded experience.

Okay, am I crazy or can you not really solve this without going full on multi-region setup of everything? Maybe your web server is closer to them but database requests are still going back to the "main" region which will have latency.

replies(2): >>41888592 #>>41895696 #
36. Saris ◴[] No.41887515[source]
They have under 1k visits per day, unless it's a really heavy app for some reason just about any basic VPS should handle a Webserver + DB for that just fine.

It does feel like the tech community as a whole has forgotten how simple and low resource usage hosting most things is, maybe due to the proliferation of stuff like AWS trying to convince us that we need all this crazy stuff to do it?

37. beeboobaa3 ◴[] No.41888158{7}[source]
> Technology should develop towards simplifying humanity’s life, not making it more complicated

I agree with this statement for normal people. Not for software developers. You're just begging for stagnation. Your job is literally dealing with computers and making them do neat stuff. When you refuse to do that because "computers should be making my life easier" you should really find another line of employment where you're a consumer of software, not a producer.

38. sdenton4 ◴[] No.41888592{4}[source]
Personally I'm digging a hole through the center of the earth to send data via pulsing laser to the far side. But other people can choose to waste their money on multi region relocation, sure.
39. fulafel ◴[] No.41895696{4}[source]
Some serverless DB services claim to offer transparent geo replication (eg AWS DynamoDB, and MS Cosmos which known for being expensive though).

But also most apps don't need low latency.