The trouble with Cassandra as an object storage metadata database
21–30 of 82 posts
Re: The trouble with Cassandra as an object storage metadata database
#22https://github.com/minio/minio/blob/master/pkg/bucket/object...
https://github.com/minio/minio/blob/master/pkg/dsync/drwmute...
And this is their test:
https://github.com/minio/minio/blob/master/pkg/dsync/dsync_t...
I just browsed quickly but it is littered with Amazon Simple Storage Service hardcoded bits like this:
https://github.com/minio/minio/blob/master/pkg/bucket/object...
There is not a single document that I can find that discusses the MinIO architecture. I guess "MinIO is a simple wrapper around S3 with a homegrown distributed state tech using NTP and it is 'fast!'" does not make for a sexy doc.
The column "trouble with OSS distributed DBs" without Jepsen tests has probably already been written. There should also be one about "competitor's mature product bashing blogs are HN clickbait".
Re: The trouble with Cassandra as an object storage metadata database
#23Re: The trouble with Cassandra as an object storage metadata database
#24The most basic and trivial way that you're going to get burned by cassandra is that you have to divide your primary key into two parts: partition key columns, and clustering key columns. Partition keys must be in every "where" clause; only clustering keys are optional. Okay, I'll just not bother with partition keys, right? Except partition keys determine which "partition" your data goes in. So if your only partition…
HashMap>
So you can lookup data by the ParititionKey, then perform range queries on the ClusterKey to filter data belonging to that partition.
If your access patterns look like that, Cassandra could be a great fit.
For anything else, you probably want to consider a different data store.
Re: The trouble with Cassandra as an object storage metadata database
#25What does "Bottom line. Write your metadata atomically with your object. Never separate them." mean from the perspective of picking a system?
An AP system may be a reasonable choice for an ODB if your added layer of transactionality is exploiting a domain specific characteristics that allows for fast-path, efficient, distributed transactions on top of a bare object level AP system (such as Cassandra). Since this is all very niche and technically demanding, it is almost always a better choice for the general team to choose a mature CP database as backing for metadata-rich objects and/or domains that demand transactional support for systems of record.
Re: The trouble with Cassandra as an object storage metadata database
#26The most basic and trivial way that you're going to get burned by cassandra is that you have to divide your primary key into two parts: partition key columns, and clustering key columns. Partition keys must be in every "where" clause; only clustering keys are optional. Okay, I'll just not bother with partition keys, right? Except partition keys determine which "partition" your data goes in. So if your only partition…
So for your "primary" data store for a type data, you might use the date for the partition key. Then if you do a lot of day-of-week queries, you'd store a second copy grouped by year-month-weekday, and query as many months as you need, and combine them. If you are collecting data for several sites, have a copy that's stored by year-month-weekday-site. And set up your software so it's easy to say "write in these 5 places, keyed off this combination of values." And because it's in all these denormalized places, you can forget updating anything atomically. So you go to append-only mode and if you have an "update" you record that as a separate entry after the first and your application's understanding of the data store includes coalescing the events and applying the update. (Maybe if you need it you have a separate process coalescing updates after the fact, but in the background, non-critical-like.)
And you're right. This is very much not SQL. It's also super obnoxious and support for it in extant frameworks is pretty minimal (they tend to be rather myopically SQL-oriented, ill suited to take advantage of this model). It also uses lots of storage, on the premise that disk is cheap. But what all this accomplishes is crazy horizontal scalability, and when you make any one query, then all the data is right there on disk lined up neatly, so it all gets streamed out in a predictable amount of time. For a few select applications, this consistent scalability is worth the pain.
Re: The trouble with Cassandra as an object storage metadata database
#27From an ops perspective, managing Cassandra is a bitch. Just use a managed service unless you have the money to hire a dedicated Cassandra expert. I’m so glad I’m done with ops
Chances are they absolutely don't have the headcount to properly manage it and were just filling out the portfolio they wanted to offer.
Re: The trouble with Cassandra as an object storage metadata database
#28The Minio team are manifestly excellent engineers, but insightless posts that contain subtle misunderstandings of CAP do nothing to showcase that competence.
Re: The trouble with Cassandra as an object storage metadata database
#29I would have hoped its obvious. Your metadata database needs to be the fastest and most reliable store out of everything. It can't be eventually consistent without partitioning your datastore. Even then you'll end up partitioning your data neatly into the same failure zone. Cassandra has basically one usecase: high volume writes, with a few batch reads. Cassandra is not really optimised for high reads. Most of the ti…
Re: The trouble with Cassandra as an object storage metadata database
#30If you really want to see and get hints on what you can do with Cassandra, head over to Netflix tech blogs. They use Casandra extensively.