A bit too waffling for me to read all but I would like to make a small comment.
Why are more and more devs trying to use s3 as a general purpose DB?
Working on a system right now where the architects have made this mistake it has insanely poor performance (High latency) and lack any proper ACID compliance. I've now been asked to "make it faster" and the answer is to switch back to an actual DBMS.
> Top tier SaaS services like S3 are able to deliver amazing simplicity, reliability, durability, scalability, and low price because their technologies are structurally oriented to deliver those things. Serving customers over large resource pools provides unparalleled efficiency and reliability at scale
In terms of simplicity using s3 is anything but simple. Sure the CRUD api is simple but there are a bunch of gotchas. What about transactionality, partial updates, running multi document queries, consistency of the whole set of documents. You have to rewrite a whole DBMS on top of s3 itself or use redshift to get these things.
In terms of scalability there are, limits 3500rps per key prefix.
It's actually not lower price than a DBMS when you have a lot of data.
The serverless pitch is extremely appealing to many companies. Also, many serverless offerings seem like a great choice at the beginning. But at some point, you will want SQL features like joins, groups, secondary indexes, foreign keys etc.
The missing link is really a serverless postgres (which many are working on but nothing has impressed me so far.
Sorry if this is ignorant, but I never understand what serverless Postgres means. What's different from a hosted Postgres instance? Some scaling characteristics or the fact you interact with it via an API instead of some library, ORM, or plain SQL?
Serverless in that context essentially means “somebody else's server(farm)”. It frees you from some of the infrastructure/admin involved in server sizing & upgrades, backups, availability management, and so on.
It can be very attractive to teams who don't want to have an internal expert for all that, or to buy huge hardware to deal with spikes in activity that only happen occasionally⁰. Just being able to spin up a large DB for some tests without worrying about available space, how much it will compete for this like CPU/IO with your other DBs¹, etc, can be very convenient.
It can work out quite expensive in terms of price/performance ratio, if those factors are not a benefit to you.
----
[0] or happen regularly but usually for only a short time
[1] usually these things are capped, or have a burstable cap, so “noisy neighbours”² are not the huge problem they can often be on cheap shared hosting
[2] unless you have explicitly pooled resources (like Elastic Pools for Azure SQL) without per-object limits, in which case your own activity could be harmful noise
A lot of "serverless" things are really on-demand timesharing.
One example of "serverless postgres" in my opinion would mean data is on a blob store and you only pay when running queries and for the static storage.
We went this way with our Synapse/Azure Data Lake solution, and it has been nothing but pain since. I'd estimate than in the past year more than 60% of the dev time was spent fighting random edge cases that this kind of approach brings.
Sure, there is the benefit of being able to dump your cold data in cheaply and read flexibly, but... the dev ux is just PITA.
> No, you get a DBMS and only change the storage underneath
I think what you mean is what we have implemented a side channel DBMS which holds a copy which you use for the transactionality. It's a terrible approach I would not do this at all you don't get any benefit from using s3 here.
This is not to say you can't use s3 to pull large blob storage off the DB and reference it in the DB I'm talking about the entire DB as s3.
You haven't given specific of this to be blunt no idea what you mean.
I already said my points about the problems your follow-up comments have not addressed those.
Also there is no such thing in s3 as a cold GET there is a cold startup for a lambda. The latency from s3 on a get is orders of magnitude poorer that EBS or LSSD and should be used "infrequently".
Imagine using rocksdb backed by S3. You store only sstables in S3. You append the WAL in EBS and archive it in S3. You cache blocks in local SSD. If you want faster WAL, you append the WAL in local-ssd and use multi-az replication in your db and fsync WAL to EBS less frequently than locally.
> What about transactionality, partial updates, running multi document queries, consistency of the whole set of documents.
You do that in another layer on top. The filesystem doesn't provide transactions, yet you do them on a layer on top.
> In terms of scalability there are, limits 3500rps per key prefix.
The S3 metadata is (was?) sharded on key-prefix. You fix this by using more prefixes. By hashing the filenames or something.
> The latency from s3 on a get is orders of magnitude poorer that EBS or LSSD and should be used "infrequently".
Yes, it is. You should use a local SSD for most things.
This is basically how Fireproof works: files to S3, reads from any cache, encryption metadata in your session store. All of this becomes “easy” if you write a storage engine from scratch for immutable content addressed data.
The only downside we can spot so far is the presence of a 100mb/s throttle for txn log writes in order to satisfy replication requirements. Beyond this, it is indistinguishable from an express instance on a local dev machine. You lose some of the other on-prem features when you go managed, but most new applications don't need that stuff anymore. The message broker pieces are the only ones I miss, but there are a lot of other managed options for that, and you can still DIY with a simple Messages table and 3-4 stored procedures.
On the read & reporting side, I see no downsides. You mostly get OLAP+OLTP in the same abstraction without much headache. If someone really wanted to go absolutely bananas with reporting queries, data mining, AI crap, whatever, you could give them their own geo replica in a completely different region of the planet. Just make sure they aren't doing any non-queries and everything should be fine.
For large binary data, we rely on external blob storage and URLs. The txn log write limit shouldn't feel like much of a restriction if you are using the right tools for each part of the job. Think about how many blob URLs you could fit within 100 megabytes. If you make assumptions about URL structure, you can increase this by a factor of 2-3x.
serverless compute and storage are a great thing. the chronic silverbullitus that plagues industry since the dawn of time doesn’t change that. nonsensically bad systems will be built.
lambda is very reliable, more so than ec2. for serious systems, use it to manage servers.
s3 and dynamo are the same thing with different settings. yes dynamo also adds a kitchen sink, but the only feature you should use is CAS.
s3 is x10 cheaper for storage, x10 more expensive per request, x10 slower per request. dynamo is the opposite.
many great system designs can run properly serverless, ie without any ec2 or ec2-spot. they are simpler. serious systems require you to understand what lambda/s3/dynamo give you and what they do not.
more systems can be designed by adding ec2 and/or ec2-spot. the same understanding is required.
s3/dynamo are equidistant from every point within that region. there is no cross az bandwidth cost. there is no bottleneck. there is no contention. a lot of cool designs fall out of this.
lambda can burst to thousands of cpus in a second, for a second.
ec2-spot boots in 30s, and often has very large nvme physically attached.
there’s nothing fundamentally wrong with misusing all these tools and building inefficient systems. the builders will probably do better on their next system. if the owners wanted it done better initially, they could have hired more expensive builders.
- "serverless" is a really bad name for these systems. As is often commented, some variation of "somebody-elses-server" would be better.
- Cost wasn't mentioned in the article, but the cost of renting databases and search-indices is still really high, even though these technologies are no longer the new hotness.
Serverless means you have a network cable that ends somewhere abruptly. The open-end will cause reflections, so you can use this technology to store data for brief moments.
My opinion is that serverless means you don't have to deal with servers (physical or virtual). You deal with higher-level entities. You don't install Ubuntu, you just provision database from web UI or terraform script. Hardware, OS and some software is managed for you. This allows consumer to deal with less complexity and this allows provider to be more flexible with resource allocations.
> Top tier SaaS services like S3 are able to deliver amazing simplicity, reliability, durability, scalability, and low price because their technologies are structurally oriented to deliver those things
The whole point is to explore how to drive cost down (due to higher efficiencies in sharing resources) by having multi tenant approach from the get-go.
The point isn't to compare to running your own database on your own rack. It's to compare single tenant RDS with something like an S3-like multi tenant postgres for example.
All cloud hosting is "somebody-elses-server". Serverless is more like "pay-per-function-call" in which case Azure Functions has a pretty appropriate name.
Also, the cost of renting databases has nothing to do with newness. Databases have evolved a lot in the past two decades. They do all sorts of stuff under the hood, which is why they can now often consume massive amounts of RAM. That doesn't come for free.
Did you knownthode functions are executed on containers which, in the end, are tiny server. It’s all just some marketing and printing out you don’t have to deal with the management of the containers just the configuration if you like to have some hot loaded lambdas etc
it messes with googling "without servers" (when I mean peer to peer, non-scam systems),
or when I mean "without a public IPv4" (as in, without a server), like offline-first (which is still /eventually connected to a server/ smh)
FNaaS != "without servers" so much as "reducing the amount of the pizza shop you run yourself" like that diagram of homemade pizza at home, frozen pizza boxes, papa johns, pizza delivery, pizza shop owner...
It's kinda an overloaded term like how cryptography gets abused by web3 scams. There's an entire row of books on computer science at a college library, one book case is on security, one shelf in that case is on cryptography, most of those books are RSA, two are EC, and one is on essoteric cryptography like dining cryptographers, blind signing, ZKP, etc - and I worry the new books will be aaaaaaaaall blockchain and DAO instead of... Tor V3 papers, or Veilid, or Vuvuzella, or Cwtch/fuzzytokens,
Eh, you can get upset about the industry using inaccurate words but we'd be here for a while then. AI isn't AI but machine learning, cryptocurrency isn't a currency, cloud servers aren't actually floating water vapor, the Dutch political parties that have freedom and/or democracy in their names aren't actually for freedom or democracy, and serverless actually uses servers. Let it go, just use the accepted term so that everyone knows what you mean, but remain aware of what it really means and don't buy into the hype or the FUD.
EC2, k8s, etc all abstract the hardware away, but they still use the server as a core abstraction. Serverless does away with that abstraction entirely. It’s obviously nonsense from a low-level point of view (as you say: one of many classes of “somebody else’s server” products), but, as far as developer experience goes, it’s pretty accurate.
InfiniBand, and unless you're super high up on the food chain (aka: married to NVIDIA), you won't get access to it for at least 52+ weeks after you submit your purchase order.
I'm currently working on a server-less, no-code multi-tenant platform. I'm still unsure if I should aim for full no-code or go for low-code. So far it's possible to build complex apps with it using only HTML tags (web components). Although it also exposes a CRUD interface, I haven't promoted this aspect as I feel it detracts from the huge time-saving and maintenance benefits which come with building apps using only declarative HTML + CSS.
The other thing I've been careful about is to ensure that the backend is fully no-code. As soon as you allow the user to execute custom code on your backend, it opens up security risks with multi-tenancy. The risk doesn't fully go away when you containerize as vulnerabilities have been encountered in the past in Docker which allow escaping the sandbox.
In my case, although the user can customize back end behavior, they can only do so in a highly constrained way using well defined parameters, not custom code. It saves a lot of effort not having to write a VM or restrict each container to a single host.
> There is also V8 isolates where tenants can share the same V8 process but in separate lightweight contexts, though I haven’t yet seen this in data systems.
Why are more and more devs trying to use s3 as a general purpose DB?
Working on a system right now where the architects have made this mistake it has insanely poor performance (High latency) and lack any proper ACID compliance. I've now been asked to "make it faster" and the answer is to switch back to an actual DBMS.
> Top tier SaaS services like S3 are able to deliver amazing simplicity, reliability, durability, scalability, and low price because their technologies are structurally oriented to deliver those things. Serving customers over large resource pools provides unparalleled efficiency and reliability at scale
In terms of simplicity using s3 is anything but simple. Sure the CRUD api is simple but there are a bunch of gotchas. What about transactionality, partial updates, running multi document queries, consistency of the whole set of documents. You have to rewrite a whole DBMS on top of s3 itself or use redshift to get these things.
In terms of scalability there are, limits 3500rps per key prefix.
It's actually not lower price than a DBMS when you have a lot of data.