News for hackers. Stuff that matters.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by kreetx on Monday September 27, 2021 @12:23PM (#28672670)
To a someone not versed in NoSQL: what are Cassandra and Scylla like to use? Would you use it instead of say, Mongo, when you have much more data?
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by orthecreedence on Monday September 27, 2021 @12:59PM (#28673199)
I didn't understand Cassandra/Scylla until I realized that it's basically a k/v store that lets you append data to existing keys. If your storage needs fit that domain, then I can vouch for Scylla being amazing to work with.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by fennecfoxen on Monday September 27, 2021 @01:33PM (#28673623)
To put it in slightly more detail, it's a two-level data structure with two keys, a Dict[SortedList[Any]], to use Python type syntax. The top level key is also the sharding key.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by jjirsa on Tuesday September 28, 2021 @02:17AM (#28679834)
Modern Cassandra is more like Dict[SortedList[Row]], where the row is basically a SQL row just like you’d expect in any SQL database
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by jjirsa on Monday September 27, 2021 @02:48PM (#28674474)
SQL-like query pattern on top of bigtable-like distribution.

e.g. you're willing to model your reads such that you dont need joins, and your sorting/scanning is based on the idea that you cluster data together, sorted in order you'll read it, into something called a "partition", which is how data is found within very large clusters.

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by jandrewrogers on Monday September 27, 2021 @12:53PM (#28673104)
Cassandra, and by extension Scylla, are commonly used for workloads you probably wouldn't use MongoDB for at any scale. The primary strength is the ability to reliably scale-out the landing of live data. It supports writing more complex data models than logging systems but is slower and more limited for querying complex data models than e.g. an RDBMS.

Cassandra is commonly used as a sink for complex service telemetry e.g. mobile data from the carrier perspective.

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by dreyfan on Monday September 27, 2021 @12:35PM (#28672832)
They’re for teams that still refuse a proper RDBMS but desire an Apache-level of infrastructure complexity.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by zinclozenge on Monday September 27, 2021 @12:44PM (#28672956)
I love this comment, but presumably there's a need for databases that are well suited for write heavy workloads. Also there's no great story for starting out with an RDBMS and then scaling out. Right now if you're with MySQL you have some options to scale out with read replicas, and then eventually replicate to a TiDB cluster. PostgreSQL I guess there's cockroachdb, but it's kind of meh.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by skyde on Monday September 27, 2021 @12:55PM (#28673127)
I believe Cloudflare usage of PostgreSQL is "write heavy" and is a RDBMS that scaled out very well for them.

They are using CitusDB but it's still RDBMS and support most PostgreSQL SQL query without the need to rewrite your query or change your schema.

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by doliveira on Monday September 27, 2021 @01:07PM (#28673307)
They moved to Clickhouse recently, though: https://blog.cloudflare.com/http-analytics-for-6m-requests-p...
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by skyde on Monday September 27, 2021 @12:59PM (#28673202)
In fact Youtube for a long time was running on MySQL with a tiny service called "vitess" on top of it to handle (Sharding/partitioning) automatically.

I dont know if they are still using Vitess or migrated to Google other relational Database "Spanner"

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by jeffbee on Monday September 27, 2021 @01:18PM (#28673443)
YouTube switched some Vitess workloads over to Procella. http://www.vldb.org/pvldb/vol12/p2022-chattopadhyay.pdf

In general I've noticed that people outside Google assume that Spanner is much more popular than it really is.

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by skyde on Monday September 27, 2021 @09:58PM (#28678459)
To be honest I am surprised its not more popular.

if you work at google and its one of the option to choose from! Is there any reason to "not" choose spanner for new project and instead use something else?

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by jeffbee on Monday September 27, 2021 @10:28PM (#28678631)
It's expensive.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by jjirsa on Monday September 27, 2021 @09:20PM (#28678201)
Something something bigtable
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by zinclozenge on Monday September 27, 2021 @12:58PM (#28673171)
That's true, I forgot about Citus.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by VirusNewbie on Monday September 27, 2021 @04:57PM (#28675900)
You remind me of some ex coworkers who thought everything could be done on RDBMS systems and then when they had to export large amounts of data topped out at 3500 tps.

Meanwhile I'm over here using Scylla and 3 nodes can give me roughly 3.5M TPS for data extraction.

RDBMS are great for certain use cases but they do not scale and if you think they do you don't really know what scale means.

Sure you can cite things like Github using MySql, but i'll also point out they've invested thousands upon thousands of man hours customizing layers on top of MySql to support their sharding which also, oops, had a bug that gave them almost half a day of downtime at one point. This is not a good use of someone's time, GH definitely made the wrong decision. Don't steer other people into making similar mistakes especially given it seems you have a lack of experience on designing systems at scale.

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by dreyfan on Monday September 27, 2021 @07:55PM (#28677629)
Exactly where did I suggest using a single mysql instance or bandaiding a fleet of them together?

Clickhouse vastly outperforms and outscales Scylla with a fraction of the hardware and cost.

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by PeterCorless on Tuesday September 28, 2021 @01:19PM (#28685154)
Different purposes — OLAP vs. OLTP. Reminder of this thread:

https://news.ycombinator.com/item?id=22478407

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by VirusNewbie on Tuesday September 28, 2021 @01:32PM (#28685302)
Clickhouse is in no way an RDBMS.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by dreyfan on Tuesday September 28, 2021 @03:32PM (#28686505)
R doesn't stand for row-store. The access patterns of Clickhouse are comparable with any RDBMS. The fact that it happens to be a column-store doesn't make it not an RDBMS. It doesn't mean "row-oriented databases designed for OLTP workloads" as it appears you think is the case.

Should I have simply said "SQL databases where data is represented in tables with a defined schema" to simplify the discussion and prevent your ignorant diatribe?

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by VirusNewbie on Tuesday September 28, 2021 @05:55PM (#28687990)
It stands for "relational", you know that CLickhouse is not a relational database right?

Have you used any of these technologies? Cassandra/Scylla have a defined schema. Did you really not know that?

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by doliveira on Monday September 27, 2021 @12:47PM (#28673009)
There are other requirements other than low-volume transactional data and CRUDs...
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by dreyfan on Monday September 27, 2021 @01:04PM (#28673262)
I’m guessing your usage of a RDBMS hasn’t extended beyond an ORM library.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by doliveira on Monday September 27, 2021 @01:09PM (#28673336)
I'm obviously being hyperbolic, not sure about you. Point remains that scaling RDBMSs is not exactly trivial and it does look like most companies eventually give up.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by dreyfan on Monday September 27, 2021 @01:14PM (#28673397)
Eh, there are numerous options today (vitess, citus, clickhouse, aurora, redshift, bigquery, snowflake). Clickhouse outperforms Scylla by a wide margin at a fraction of the cost and complexity.

Any of the above makes your data accessible via standard SQL. You can hire and utilize proficient data analysts, not people writing esoteric queries in whatever flavor of NoSQL, while actually solving business needs.

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by doliveira on Monday September 27, 2021 @02:51PM (#28674511)
Not sure what you're talking about then? It seems you're just talking about the syntax used to query (which I agree SQL is a no-brainer) and not really about the "R" in "RDBMS"
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by dreyfan on Monday September 27, 2021 @03:28PM (#28674987)
You haven't made a point yourself, so honestly, I don't fucking know what we're talking about either. You came in with a hyperbolic comment that echoes the stance from the NoSQL community I've seen for the past decade. The one that basically says "We have zero fucking clue how to model our data so we're just going to jam everything into bunch of loosely connected JSON documents and spend the next decade adding basic SQL features from the 70s".
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by doliveira on Monday September 27, 2021 @03:47PM (#28675178)
I'm not a native speaker but I dare say the point itself about RDBMS was pretty clear. I don't really feel like continuing this argument either.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by thekozmo on Tuesday September 28, 2021 @02:18PM (#28685795)
Clickhouse and other solutions you mentioned are for analytics while Scylla and Cassandra are for real-time. You can't compare the two types of tech
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by hodgesrm on Tuesday September 28, 2021 @03:01PM (#28686184)
I don't see how Scylla / Cassandra are real-time but ClickHouse is not. You can load event data into ClickHouse just as fast as Cassandra. The data are instantly queryable including pre-computed aggregates in materialized views. You can get answers in milliseconds on data that is only a few second old. Real-time marketing is now an important use case for ClickHouse, just to give one example. If the problem is analyzing and reacting to external events, ClickHouse is tough to beat.

How are Scylla / Cassandra better?

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by VirusNewbie on Tuesday September 28, 2021 @01:34PM (#28685315)
clickhouse, bigquery, snowflake are not even close to RDBMS so what are you going on about? Have you actually used any of those?
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by cocoonkid on Thursday September 30, 2021 @06:47AM (#28704911)
is there a way to have a short private chat? I am an AppSec Engineer. Really max 10 minutes of your precious time.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by seabrookmx on Monday September 27, 2021 @12:47PM (#28673011)
In a way, yes. Cassandra's clustering is more flexible. But the "price" you pay is that every table has a partition key. This requires more data modeling and thought upfront than your typical "JSON in, JSON out" document store like MongoDB or firebase.
Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by fennecfoxen on Monday September 27, 2021 @01:19PM (#28673454)
The important thing to understand from this is how it changes the way your application handles reads writes. In a normal SQL database, you'd try hard to normalize your data, write an update once, do joins, and add an index for things you frequently read by, so the query planner can come up with something reasonable. When that reaches its scalability limit, you'll grudgingly consider various denormalization strategies, copying some subset of your data somewhere so that it's faster to query.

If you're using Cassandra and you're also not a fool, it's probably because you actually need a lot of scale, so you'll generally do the denormalization up front and you will denormalize everything. If you're writing an event, you will write it several places. For example, suppose you're WalMart recording sales. You might write to: store transactions by store/year/day/hour (the "master" record insofar as you have one), user transactions by user/year/month, product purchases by manufacturer/year/day/hour... When you write the transaction, you write to all of these locations.

Each of these "by X" keys is a shard. Each can be located on a different set of ~3 machines (the number is configurable). Querying involves getting a copy of the ring topology, computing which integer shard-ID the key maps to, figuring out which machines in the ring own that integer, and then asking the machine for a whole bucketful of data, which should be a superset of what you're actually looking for. For something like a user's transactions you'll want to have basically everything there at once, so loading the "order history" page for the past month might be a single query that just returns a report: no joins at all, very fast, super scalable. Other lookup strategies might ask for a range within that bucket (the data within the bucket can be ordered by a single key; often this is a timestamp or time-based UUID). Anything that isn't a simple query of a few buckets like this has to be a map-reduce job and will be slow.

All of this is pain. You should generally not invite pain into your organization. However, if pain has already found you, something like this may be the least painful option.

Re:Benchmark results: Cassandra 4.0, 3.11, Scylla 4.4 [video] by jjirsa on Monday September 27, 2021 @02:41PM (#28674380)
> then asking the machine for a whole bucketful of data, which should be a superset of what you're actually looking for. For something like a user's transactions you'll want to have basically everything there at once, so loading the "order history" page for the past month might be a single query that just returns a report: no joins at all, very fast, super scalable.

Not really a superset, cassandra (and scylla, and bigtable, all of which are basically copying bigtable's model) each try very hard not to read any extra data at all, and can often return approximately the exact data requested, modulo serialization data which is usually fitting in ~compression chunk size (64k) + checksum.

> If you're using Cassandra and you're also not a fool, it's probably because you actually need a lot of scale

Cassandra also gives you very literally the most control over CAP tradeoffs of any database in the industry.

If you have 100 machines per DC in each of 10 dcs, what happens when one machine is offline? one rack? one dc? 2 dcs separated from 8? 6 dcs separated from 4? There's no single answer in cassandra (depends on replication factor, consistency of writes, consistency of reads, all of which are tunable, with 2 of those being tunable PER QUERY), the CAP tradeoffs are yours and yours alone. That flexibility is powerful for power users (it's also confusing for novices, which is unfortunate).

But to your first point, yes, the point is scale. The lack of opinions and deliberate functionality are designed to enable it to scale to thousands of hosts, potentially petabytes of data, trivially accessible in a single SQL-like CQL query, with realistic read latency < 1ms mean/avg and < 5ms p99 for a tuned workload where you know what you're doing. A lot of users will never need a database that can do a million reads per second across a thousand machines reaching p50 1ms on 2 petabytes of data, but Cassandra can do that, and you don't have to build a whole sharding layer on top of mysql/postgres/redis or even install Scylla to get there.