←back to thread

260 points scastiel | 7 comments | | HN request time: 0s | 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 #
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 #
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 #
horsawlarway ◴[] No.41880307{3}[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 #
1. beeboobaa3 ◴[] No.41880455{4}[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 #
2. 9dev ◴[] No.41880752[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 #
3. ndriscoll ◴[] No.41880958[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 #
4. ffsm8 ◴[] No.41881676{3}[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... ( ꈍ ᴗ ꈍ )

5. tbrownaw ◴[] No.41881767[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).

6. 9dev ◴[] No.41886112{3}[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 #
7. beeboobaa3 ◴[] No.41888158{4}[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.