Live data from Hacker News

Majority of web apps could just run on a single server

old.reddit.com

211–220 of 251 posts

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

#211
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…

[deleted]

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

#212

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.

Banks have most people by the balls. Most SaaS don't and wish they did.

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

#213
post #201

Earlier quoted context omitted.

Realistically, they are required. I don't care how you do it, but you need 1. Seamless fail overs 2. Easy horizontal scaling 3. Location based load balancing 4. A way to deploy and rollback all of these automatically. As a result, things are gonna get complicated no matter what you do. But as it turns out, using something like Kubernetes, Elixir, or AppEngine can make all of that very manageable.

#3 is debatable for many, many businesses. The other three are (almost) trivial with a decent load balancer and blue/green deployments. This is something very achievable without an over-complicated architecture.

3 is incredibly important for global businesses. You ever try using a Japanese website?

As for how "easy" the others are, the truth is that the options I provided will be easier to make, easier to maintain, and work better than your home grown solution once you need to account for multiple machines.

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

#214
post #172

Earlier quoted context omitted.

But there's a middle ground somewhere. The current DevOps culture comes from the FAANG guys who really are getting a bazillion requests per second. In the last decade I worked for Amazon, Avalara and Audible Magic. None of these could build an app around a Digital Ocean droplet. But I think you're pointing out there are PLENTY of useful webapps that can run on a minimal system. I'm just curious where the middle groun…

Yeah most people don't like getting an invoice for thousands of € because their website was under a DDOS.

sure. but there's a middle ground there somewhere. it's not just service blackout after 5 requests per second or a $10k monthly aws bill. if your budget was $500, you could set off alarms or auto-shutoff after some threshold. and turn on syn cookies if you're worried about the kiddies.

the point is... there's a middleground there somewhere and I think different people put the cost/availability tradeoff at different places.

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

#215
post #152

I agree w/ the sentiment, but the author doesn't seem to understand why people tend to like touching the customer at the edge. Since everyone is doing TLS these days, you have to do a TCP connect round-trip and a TLS round-trip before you can start yammering over a connection securely. So that's at least three round-trips. If you're one-way latency is 200ms, that's about a second of delay before things start happenin…

If your database is a long ways off an edge connection could end up with a worse latency situation than TLS setup. Distributed database is usually painful.

if your answer to 1 RT of 200msec latency is to add 3 RT of 200msec latency, you're using a calculus I don't understand.

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

#216
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…

Oh man I absolutely love the work that you guys do. I'm actually in the process of learning Ebook production using the 'Step by Step' guide on your website. I'm essentially learning it all from scratch as I have little to no programming/SWE experience (I learned a bit of Lua because of KOReader[1]) but the technical side of ebook production has always fascinated me enough to keep learning. Also because I wanted to contribute more than just typos and grammatical errors (as important as they are).

[1] https://github.com/koreader/koreader

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

#217
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…

Since you seem to have multiple successful and scalable deployments under your belt, what is your goto tech stack?

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

#218
post #57
post #17

Earlier quoted context omitted.

That for sure is not "idealistic devops", but someone missing fixing RBAC to let devs have access to logs of their workload.

Maybe without details or knowing exactly what he means. But I've worked with people that decided you don't get to see any logs on a server except for a select few through some web ui or a log aggregator.

There are production systems handling PII (finance, healthcare etc), where logs are treated as radioactive and only people with trust, training and protective gears should be touching them. This is the case where these are legal/ compliance requirements. Non-prod of those systems can have wide open access to logs, unless someone decides to import prod data for "testing" in non-prod. While I agree access to logs may seem too restrictive, there are some very solid reasons for that... and then we have some cargo-cult and some lack of time/ understanding which causes too restrictive log access where it might not be required.

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

#219
post #191
post #31

The real reason for cloud micro service architecture is legacy code. Imagine you’ve inherited a 10 year old PHP monolith. The code is almost indecipherable and the business wants new features in a timely and predictable manner. The easiest way is to implement the new features in their own micro services. Sure it makes the complexity problem worse, but that’s a problem for someone else in five years time.

You could solve this other ways. Build a new better monolith and have a reverse proxy route between them and slowly update and move routes over. You will get through a rewrite slowly one bit at a time. If you keep the same database schema this should generally work pretty well. I migrated a terribly written web app this way, it worked pretty well.

The application was written by a team of 20 over 10 years. There are over 3000 database tables.

The job it does is big and complicated. It is used by teams all over the world.

The problem is the inherent complexity of the business domain. Not poor quality code from devs 10 years ago.

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

#220
post #183

Earlier quoted context omitted.

The root cause is the decade of zero interest rates which led to companies intentionally overcomplicating their stacks to justify neverending VC rounds. Early prospective employees took notice and adjusted their skills as a result. The dangerous part is that in the meantime we've got brand new and budding talent that actually took this charade seriously and effectively got high on their own supply, seeing this perfor…

Except zero interest rates stopped almost four years ago, but we're still seeing vcs ape into ai this last year. So clearly the underlying cause of this squandering of resources must come from somewhere else. I point the finger at the rising class of super rich who don't know what to do with their money. Why do they exist? Why is taxation seemingly not applying to them any longer?

> Why is taxation seemingly not applying to them any longer?

Investing returns was never taxed, as long as they don't use their wealth for consumption they wont get taxed. This is a good thing since it encourages investments over excessive consumption, building a startup is much better than buying another yacht.

Post reply on HN