126 points · by cyndunlop · 4y ago · 55 comments
> To meet our performance expectations, Kafka must work from memory, and we don’t have much memory to give it... ...Even the smallest customer required two or three Kafka instances
A) What performance expectations? Timeliness?
B) What's "not much" memory?
C) And why don't you have that much?
D) When you say instance, do you mean "broker", or actual clusters? Why did the smallest customer need 2 to 3 of them?
> Provision and manage a Scylla cluster in your environment.
If one of your datasource get lag behind, Flink would buffer a huge amount of data waiting for it to catch up due to how watermark work when joining 2 streams, and you would still encounter out-of-memory error even with RocksDB from time to time if your session window get too large. In addition, with our state size frequently reached hundred of GBs, recovering from failure was not exactly fast either.
So, instead of simplifying they would make the stack more complex.
I have a hard time recommending Flink over dumber consumers or a more micro-batch vs true streaming approach unless you're doing something that really needs the long-lived in-worker keyed state and the ability to do things like streaming joins and all. Otherwise the Flink gotchas and nasty surprises can outweigh the ease of which it lets you do what you want to do.
> Clock skew across different sensors: Sensors might be located across different datacenters, computers, and networks, so their clocks might not be synchronized to the millisecond.
And later on in their final solution
> Implementation4 cons: Producers and consumers must have synchronized clocks (up to a certain resolution)
How do they reconcile this skew in their final solution?
For implementations 4, I suppose it's done by reading only data point with `insert_time < NOW() - some_delays`.
I think the requirement `Producers and consumers must have synchronized clocks (up to a certain resolution)` is simply so that there's no unnecessary lag between producers and consumers.
We have to assume that although the sensors time are not synchronized to the milliseconds, but their time are still accurate to a certain degree (say ~1 seconds). Then factoring in the time for data to travel from sensors to the collector, if you wait for 5 secs, most events would have arrived and get stored in database. Events that arrive after that watermark would probably be safe to discard or become irrelevant. Waiting also solve the out-of-order problem, since you can sort the events again.
> Implementation4 cons: Producers and consumers must have synchronized clocks (up to a certain resolution)
So let's say the consumer's clock is slower than the producer's by 5 seconds, i.e when the producer thinks the time is 10, the consumer thinks the time is only 5. In this case, even if the producer has already written `insert_time = 10`, consumer will only read up to `insert_time = 5` and there's an extra 5 seconds worth of lag on top the of wait introduce by the algorithm.
We currently make heavy use of dynamo and are interested in something cheaper/faster. The marketing material is pretty compelling but I'm unsure of how hard scylla is to operate at scale.
Solid product, it's since reached parity with Cassandra and added even more features. Great team, very helpful. It's far easier to run than Cassandra because of its performance so you need less nodes overall (which is the single biggest issue in C* ops). The enterprise edition also has better compaction strategies and an automated system to schedule it all.
What scale are you looking at?
I know precisely nothing about Scylla, but somehow I still agree with this. Cassandra is far and away the most horrendous software I've ever had to work with (Kafka coming in a close second). This was true even when we hired a major core contributor to help manage it; even he wasn't 100% comfortable with it. The word 'anticompaction' is still enough to give me nightmares.
I very much welcome – not that it's Cassandra's only problem – this trend of rewriting '00s/early-'10s Java software in simpler languages. (And, languages aside, I think Cassandra - certainly inter alia - simply sits at a level of complexity which is beyond the comprehension of any one human being. And software which is beyond the comprehension of any one human being inevitably begets bugs, even as an operator rather than a developer.)
Cassandra had a lot of rough edges until very recently, and was only really suitable for sophisticated users, as most contributors would have attested. The project has matured a lot over the past couple of years in particular, as the broader community stepped up in the face of DataStax's (temporary) withdrawal. The investment by some large scale users has transformed it, and the next couple of years will do so even more.
None of the issues the project faced were really related to the language chosen, in my opinion, rather than the maturity of the project and how it grew at the time.
I think there are a handful of humans that actually get it. But it is a true handful, not more than 5.
Scylla using C++ helped in bringing the low-level planning and development experience that is common in that area (and harder to do in Java), but also the ability to use all the low-level libraries like DPDK and advanced threading/reactor systems (like the underlying Seastar framework that Scylla made).
The opensource Cassandra versions are now implementing the same model, although still using Java.
We are an adtech startup in the hundreds of millions per day right now, expecting billions per day by the end of the year. Management would be happy if I said I have a plan for tens of billions.
The main difference is that we would probably lean towards the cloud version instead of self hosted (do we still need to think about clusters then??)
I would migrate to cassandra first, and then prototype your workloads on scylladb. You'll want loadtest execution ability regardless so you can tune for your workloads.
I'd guess ScyllaDB and Cassandra are comparable for headaches. Our clusters never go down, but there's always SOMETHING to look at. But cassandra has more community and commercial support.
2. Features https://www.scylladb.com/2021/11/17/cassandra-and-scylladb-s...
ScyllaDB used to chase Cassandra's feature set. Now, in many ways [MV, compaction strategies, workload prioritization, LWT, CDC] we can either do things Cassandra cannot do, or we're a better implementation of Cassandra's same or similar functionality.
Cassandra c. 2018-2020 was a pretty moribund project, not shipping a major new release until last year [2021]. I am pretty excited to see the new work done on 4.0 and now 4.1. During the same interval ScyllaDB went from 2.0 to now 5.0 which is coming out Very Soon Now.
The CEP process Cassandra maintains shows some very interesting directions they are heading in. And we showed off some of our roadmap at Scylla Summit 2022 describing where we're taking our product next.
Whichever path users decide, the good news is that year-over-year users have increasingly better databases to choose from.
[Disclosure: I work at ScyllaDB.]
You make a point of mentioning your MVs (and presumably your global secondary indexes) may get out of sync with the base table, which is the reason the Cassandra community decided to mark them experimental. The Cassandra community has become very conservative since it began being driven by users of the software. I should not draw any conclusions around the relative merits of features from this conservatism.
The Cassandra community paused feature development for several years, due to this very conservatism, in order to focus on delivering safety and reliability at scale. Now that's done, you can expect a lot more visible activity.
High-availability is a core part of the Cassandra data model and node architecture. Scylla is designed to be highly available, and the enterprise version only adds features to make it easier to operate.
Otherwise, as you note, ScyllaDB Enterprise will be a superset of our Open Source offering.
Also to minimize lag between Open Source an feature availability, we just announced new Feature releases for Enterprise which will be coming later this year and into the future.
https://www.scylladb.com/2022/06/08/new-scylladb-enterprise-...
It's kind of like how standalone cameras became less and less desirable as phone cameras got better. Standalone could do better quality - but this matters less once both options are really good. There is some 'good enough' point where you hit vastly diminishing returns & simplifying into just phones became worthwhile.
Databases (certainly Scylla) may be hitting a point where specializing, actively optimizing, etc. are less desirable than just reusing one good system.
Looks like they went from polling an RDBMS to some triggered querying of scylla, and then on to polling scylla.
i.e. they went from polling an RDBMS to polling Scylla. They didnt replace kafka with anything so now their implementation isnt reactive.
This is effectively no different that implementing a message queue in a database, with all the negatives that brings.
They are sharding for each consumer to prevent multiple consumption due to lack of locks. What if a consumer goes down? How does it manage its own state? All things managed by kafka (or pretty much any MQ) out of the box, and now they have to implement ALL of that themselves - none of which is mentioned in the article.
I'll stick to FOSS solutions that don't require licenses to unlock closed-source components and can be patched by a community and/or yourself.
Edit: Previously, there are other commercialish OSS NoSQL solutions for large-scale apps that are less proprietary with better licenses like Couchbase (not Cassandra CQL).
Contributors can submit their own patches to ScyllaDB.
Contributing Guidelines: https://github.com/scylladb/scylla/blob/4bd4aa2e887278c4912f...
[Disclosure: I work at ScyllaDB.]
BSD-2 clause is a far more permissive license.
Please come back and speak when you understand how these things work.
is paying for support really such a raw deal if you are using their produce to generate your own revenue?
Come back when all of the features are available to everyone and it's a BSD-2 license with optional support.
What means data normalization in a NoSQL context? I think most normal forms make sense in a context where we have tables, rows and Relational algebra.
Anyone seeing Cassandra adoption for new use cases in the public cloud?