Live data from Hacker News

The cloud is a prison. can the local-first software movement set us free?

wired.com

151–160 of 215 posts

Re: The cloud is a prison. can the local-first software movement set us free?

#151
post #143
post #133

I worked on a local first version of an app I sell. I use CouchDB to store user data so it was pretty easy to implement because CouchDB will sync a local CouchDB to the Cloud based CouchDB as soon as any changes are made. That app is now 20 years old and over those years I've had users who quit using it call me years later to ask if I could give them access to their expired account or a copy of all their data. CouchD…

Thanks for sharing your experience, what was the app? Personally, I don't think I would have gone through the trouble as well. For example, I used to have a ton of Evernote entries and don't think I would setup a personal CouchDB just to get access to it. A middle ground could be a file path to an sqlite file that can be copied, opened or backed up in the cloud.

The app is at ezInvoice.com. CouchDB is really a very good fit for that app.

In the early versions of the app I used CGI.pm to store and get user data and that was very fast and efficient, and the format for storing data was similar to CouchDB's (JSON), so it felt more familiar for me to work with.

I had never worked with SQL before making that app. I had a partner back then create a new version that used an SQL db. I did this mostly because I felt like the app wasn't keeping up with web trends and he had been pestering me to use SQL in the next version for about a year.

What he ended up with was buggy to the point of users calling and screaming at me and after a year he still couldn't get it right. Back then news of SQL dbs getting hacked were common and after buying several books on SQL I realized that to be proficient required years of study and experience.

CouchDB had just come out around then so I looked into it and for me that's been much easier to work with, and do so securely. It's practically designed for an app like ezInvoice. PouchDB.js has made it easy for me to work with.

If you're already proficient with SQL there's probably no compelling advantage to using CouchDB/PouchDB, but it's a really good tool set for building web apps.

Re: The cloud is a prison. can the local-first software movement set us free?

#152
post #137
post #43

Earlier quoted context omitted.

We have those numbers. We reduced our costs by over 70%. We got the project approved claiming we'd reduce costs by 30%. Obviously YMMV and the savings are going to be dependent on each project, but we've had enough solutions that we've had on-prem that we've shifted to AWS and show substantial cost savings that the business is comfortable with our taking new projects and just starting out in AWS.

I'm sorry, there's simply no world in which switching to the cloud, and serverless to boot, results in a 70% cost reduction unless you so grossly over-provisioned your on-prem infrastructure that whoever architected it should no longer be employed. Cloud infrastructure is more expensive across the board, full stop. Unless you're using hollywood math to claim millions in "efficiency gains" I don't buy it.

Millions, and 70% seems high to me, but let's look at some numbers.

what is the cheapest real actual server you can buy, new, with a support contract from a reputable vendor like HP/Dell/etc? (Assume we're running both the db and web-server on one server.) And what's the cost of sitting it in a reputable colo? And then multiply that by, let's say two, to get redundancy in a us-west and us-east region. Ideally, we'd want more regions to serve the entire world, but let's just go with two for now.

Let's say $10k for a server w/ support contract, x2, plus $400/mo for colo from Hurricane Electric (https://he.net/colocation.html) in us-west. It's a promo deal, and only in us-west, but let's just go with that price. $400*60 for 5 years (standard lifetime of computer equipment) = $24k. So $34k per server * 2 servers / 60 months ~= $1,130/month amortized. Thankfully, we're not in cloud, so that's the cost whether it's 1 request/second, or 1,000 requests/second.

A Raspberry Pi or old laptop in your basement with one consumer-grade ISP, and not factoring in the cost of electricity does not count here. Those are obviously going to be massively cheaper, but they're not remotely suitable for enterprise.

Meanwhile, Lambda gives you 1M requests and 3.2 million compute-seconds a month for free. This works out to be 0.4 rps (requests/second) or 22 requests / minute if spread out evenly. Which isn't, like, a lot, but you haven't paid a single cent to AWS for this yet. Let's say you want to get to 40 rps (to keep the math easy) or 100M requests over the month. According to the AWS calculator (https://calculator.aws/#/addService/Lambda), this'll run you $120/month, or $120*24 ~= $3k for 2 years.

But that doesn't count hosting for your static files with CloudFront, or does it count the RDS instance backing it, and we'd use AWS Cognito for user-auth since we've accepted AWS vendor lock-in. (Which isn't great, but that's the state of the industry.)

CloudFront: Free Tier 1TB, 10M requests/month. 10 TB/month will run you $1k/month https://calculator.aws/#/addService/CloudFront

RDS: This will vary greatly. A teeny tiny db.m6g.large instance w/ 2 CPUs and 8 GiB of RAM is going to run you $250/month, but a big one fat juicy db.r5d.24xlarge will run you closer to $20k/month. https://calculator.aws/#/addService/RDSMySQL

Cognito: With 1,000 active users, this'll be $50/month; 10,000 users is $500/mo, and 100,000 users is $5k/month.

Between Lambda, CloudFront, RDS, and Cognito you could easily blow past that $1,130/month estimate for a proper colo'd pair of servers, if your service gets at all popular. But if you stick within the free tier for Lambda and Cloudfront, then you're only looking at RDS and Cognito costs, which can vary greatly. Anywhere from $500/month to $26k/month, or more.

Except to get the same service in a colo as a $26k/month AWS bill, you'd need to spend way more and have much more than the single server in a rack that I started with. Thankfully, with something like Equinix Smart Hands, no one has to drive to the colo to futz with a server when it develops a bad hard drive.

Graph it out for your particular use case which one is better, but cloud infrastructure has the benefit of opex vs capex, as well as the opportunity cost of time. AWS Amplify will let you stand up a whole platform hacking on a Saturday before Dell can even quote you a price on a server or Equinix can answer the phone.

I also did reject a raspberry pi or old laptop server early on, but that's not to be underestimated. If I've already got some server running at home for my house, running a service on that, fronted by Cloudflare can take you quite far.

It really just depends on your use case.

Re: The cloud is a prison. can the local-first software movement set us free?

#154
post #135
post #29

Anyone who's worked inside a large organization knows the cloud is the solution to be able to get things done and deliver value to the business. Why? On-prem solutions require I work with the infrastructure group, who wants to cookie-cutter me into their limited stable of infrastructure options; I have to work with the systems group, who gives me very limited options and configurations for the operating systems; the…

Read this first: https://www.inkandswitch.com/local-first/ > Anyone who's worked inside a large organization knows the cloud is the solution to be able to get things done and deliver value to the business. Local first is focused on end consumer experiences and is orthogonal to the on-prem vs cloud argument; ideally there wouldn't even be a server. @pvh and i&s team have done a great job threading the needle in articu…

The only local first we do these days is iOS apps. We develop those for our users who work outside the office in locations having spotty cell coverage.

Re: The cloud is a prison. can the local-first software movement set us free?

#155
post #103

Earlier quoted context omitted.

I can literally right now, sitting here in my underwear, spin up 4 clustered servers in 3 different continents with a globally replicated object storage and a master + 2 slaves setup of SQL databases on each location. And all that for less than the price of _one_ competent sysadmin's monthly salary. How would you suggest a company would match that with local servers and sysadmins? One sysadmin per 8 hour shift = 3 pe…

> I can literally right now, sitting here in my underwear, spin up 4 clustered servers in 3 different continents with a globally replicated object storage and a master + 2 slaves setup of SQL databases on each location. Hey I can do that too in our on-prem environment because it's well managed. Hell, I can do that in my fricken homelab if you'll accept postgress. Cloud is neat and the major vendors know how to manage…

The premise was that one doesn’t already have a half a million dollar on-prem setup…

Like a bootstrapped one or two person startup. Or could I borrow your globally distributed home lab? =)

The difference here is that I can pay AWS by the hour (or even by the minute or second). I can’t hire a sysadmin like that.

I can try a few high GPU instances for 6 hours and shut them down. But if I need to buy 6 4090’s and the hardware to run them, I’m stuck with the choice and down a few tens of thousands.

Re: The cloud is a prison. can the local-first software movement set us free?

#156
post #92

Earlier quoted context omitted.

I can literally right now, sitting here in my underwear, spin up 4 clustered servers in 3 different continents with a globally replicated object storage and a master + 2 slaves setup of SQL databases on each location. And all that for less than the price of _one_ competent sysadmin's monthly salary. How would you suggest a company would match that with local servers and sysadmins? One sysadmin per 8 hour shift = 3 pe…

The alternative to the cloud isn't running a server in the broom closet. It's running (racks of) dedicated hardware in a datacenter. Even "on premise" is often in a datacenter somewhere, and thanks to virtualized networking it's just as if the hardware is in the same building.

The datacenter hardware still needs people to purchase and manage the physical stuff. And those people aren’t exactly cheap.

Re: The cloud is a prison. can the local-first software movement set us free?

#157
post #68
post #39

Earlier quoted context omitted.

Forgot to mention - if you were doing anything new , plan to spend months getting that in on-prem. They're going to run an RFP, deliberate ad nauseam, try to build a business case the tool, procure infrastructure to host it, do five year usage projections so you can measure how you're going to capitalize - it just goes on, and on. Our organization spent two years going through these gyrations for elastic search. They…

Sure. Come back to us in twelve months. Either the company will have lost control of their spending and be sending 6-7 figure paychecks towards AWS. Or the ops team will have clamped down on the accounts and now you have to go trough the same process to get EC2 instances and other cloud resources. Solving cultural problems with technology generally doesn't work.

Yes, it only pushes the inevitable lean battle further down the road and never solves anything. How do you eat an elephant? One bite at a time.

Re: The cloud is a prison. can the local-first software movement set us free?

#158
post #137

Earlier quoted context omitted.

I'm sorry, there's simply no world in which switching to the cloud, and serverless to boot, results in a 70% cost reduction unless you so grossly over-provisioned your on-prem infrastructure that whoever architected it should no longer be employed. Cloud infrastructure is more expensive across the board, full stop. Unless you're using hollywood math to claim millions in "efficiency gains" I don't buy it.

Millions , and 70 % seems high to me, but let's look at some numbers. what is the cheapest real actual server you can buy, new, with a support contract from a reputable vendor like HP/Dell/etc? (Assume we're running both the db and web-server on one server.) And what's the cost of sitting it in a reputable colo? And then multiply that by, let's say two, to get redundancy in a us-west and us-east region. Ideally, we'd…

Additionally, you need software to run on-prem. Rare is the application that is simply an executable running on a server and not having any dependencies on things such as databases. That software requires licensing, and there's always on ongoing annual tail that will be charged. On AWS all that licensing and support is rolled into their pricing. That turns out to be a substantial savings, along with all the other things you've mentioned.

Re: The cloud is a prison. can the local-first software movement set us free?

#159
post #137

Earlier quoted context omitted.

I'm sorry, there's simply no world in which switching to the cloud, and serverless to boot, results in a 70% cost reduction unless you so grossly over-provisioned your on-prem infrastructure that whoever architected it should no longer be employed. Cloud infrastructure is more expensive across the board, full stop. Unless you're using hollywood math to claim millions in "efficiency gains" I don't buy it.

Millions , and 70 % seems high to me, but let's look at some numbers. what is the cheapest real actual server you can buy, new, with a support contract from a reputable vendor like HP/Dell/etc? (Assume we're running both the db and web-server on one server.) And what's the cost of sitting it in a reputable colo? And then multiply that by, let's say two, to get redundancy in a us-west and us-east region. Ideally, we'd…

Your entire premise is based on a pair of servers - we're talking about fortune 500s. I'll ignore for a second the fact that $20k/month in server spend for a pair of servers to be database+web is grossly overpriced, even at LIST, which no fortune 500 ever comes close to paying.

All of the "and you don't get all these other services" is just a red herring because, again, we're talking about a fortune 500 that isn't building their services on a pair of servers. They buy racks at a time, at minimum, and unless they're grossly oversizing what they're buying, will have better performance per-dollar all-in, including the people cost and the surrounding infrastructure cost, to say nothing of the egress bandwidth because you know, their customers aren't just other AWS servers...

Re: The cloud is a prison. can the local-first software movement set us free?

#160
post #42

Before it was called "local first" it was known as "subsidiarity". Seeing the principle applied to food, politics, software is exciting to me. "Subsidiarity is an organizing principle that matters ought to be handled by the smallest, lowest or least centralized competent authority. Political decisions should be taken at a local level if possible, rather than by a central authority".[1] [1] https://en.wikipedia.org/wi…

Interesting that the word comes directly from the Catholic Church, because I don't think they ever allowed it to exist. When you see it happen in society, it's almost always learned from a military group or earned by some popular revolt.

It's interesting, I'm one of what I presume is a small number of people that have conversed extensively over my life about subsidiarity, mostly on the context of subsidiarity and sphere sovereignty a rather niche area of theology.

Most Catholics, even highly engaged western catholics are not aware of subsidiarity. It's ~commonly/known term and catholic juxtaposition cited by theological/historical non-conformists in church polity and discussions around separation of church and state.

Post reply on HN