Scylla – Real-Time Big Data Database
scylladb.com
scylladb.com
Sigh...
I know this sounds like a nitpick, and I know it sounds like a broken record, and I know you probably work in a different team and there's "nothing" you can do about it...
But.
I went to your website, interested in your product. I'm your target market! This site needs to impress me, and people like me.
What's the first thing that I see? The website oh-so-slowly animates, sliding down to show some TechCrunch ad.
I don't care about TechCrunch. I care about high-performance databases.
But okay, I move to close it, but "No!" says your website, helpfully overlapping it with another animated slider asking me to accept your cookie policy so that I can be tracked by your marketing group.
Fine. I close both popups, and try to read the content of your site despite the animations every paragraph or so trying to distract me from the content. As soon as I scroll too far past the animations, a stupid chat bot pops up to overlay the bottom of the content as well.
I figure I'll just go to the meat of it, some whitepaper or technical documentation. Despite their miriad flaws, PDFs are thankfully not commonly animated.
The download link for your benchmarks asks for my contact details. It's not a link. It's a sign-up form for spam. I'm not an idiot. I don't want spam. I want to read about your database.
Your marketing team actively stops your target market from looking at your products. Perhaps that's an issue you should look into, because right now there are potential customers that simply never get to find out just how amazing your technology is, because their first experience of your products makes used car salesmen look upstanding and trustworthy.
The good news is that we just provided a new benchmark today and it is 100% ungated.
Scylla 4.4 vs Cassandra 4.0: https://www.scylladb.com/2021/08/24/apache-cassandra-4-0-vs-...
Also, here are a few other free and open blogs where we have benchmarked vs. competitors:
Scylla vs. DynamoDB: https://www.scylladb.com/2018/12/13/scylla-vs-amazon-dynamod...
Scylla vs. Google Cloud Bigtable: https://www.scylladb.com/2019/05/02/going-head-to-head-scyll...
A good point of comparison is this website: https://www.jetbrains.com/idea/
It's also a product targetted at technical people, including people working at startups and also large enterprise.
No popups.
When you click the community edition download link -- bam -- it is immediately downloading! No form to fill in.
I don't even use their tools much any more, except for the Rust plugin. Nonetheless, I read through their "what's new" release notes, even for Java, because it is so well presented: https://www.jetbrains.com/idea/whatsnew/
I don't have to sit through an hour-long YouTube video watching some guy introducing some other guy I don't care about for five minutes. https://knowyourmeme.com/memes/the-wadsworth-constant
Instead they have GIFs showing short, to-the-point snippets of exactly what each feature does. Note that these don't animate by default! You have to click them to play the clip. I love that. They're helpful without being distracting while I'm reading nearby text.
It also gives you an idea of what the product looks like in actual use.
You have no idea how much crap people wade through to find this! I often spend hours googling terms like "Product X Screenshot", "Product X real-world", "Product X tutorial" in the futile attempt to just find out what the heck to expect. Is it a green-screen terminal app kept alive like some sort of crime against nature? Is it a web application? Does it come with a Windows-only GUI? If so, is it at least a usable one? Does it have command-line tools? PowerShell? Tab-complete?
You go to a site like JetBrains, and you see exactly that! Real-world code being manipulated, showing you the product in all its glory.
So show this! Show ScyllaDB doing something. Don't just talk about how it's 47% more snazzy than a competing product I haven't used.
Show it doing a schema change nearly instantly on a terabyte of data, or whatever. But show me the product, or I walk away until I find a website that isn't afraid of letting me see what they're selling...
Also: For Scylla Open Source downloads aren't gated -- no name or email address neeeded. We do need to ask what platform you're running on, because the way you deploy to each is different. e.g.,
Hopefully this was a poorly thought out gate and not a signal that they’ve gone full enterprise tactics.
I think the one criticism is that it seems the company has some intentional rough edges on it, in favor of their SaaS over the open source release. It used to be around backing up and managing updates long term ect. They have gotten better but their helm chart for example is very opinionated and uses custom resources in place of say a statefulset. I think their SaaS is overpriced especially compared to reserved instances but that's just me.
Also from my calls with support, they lack direction internally. One time our sales rep and customer success director argued on the phone in front of us if they could bill us for some migration work. We silently let them finish and then said we expect it to be included in our support package based on their argument.
> Scylla vs DynamoDB – Database Benchmark
> 20x better throughput in the hot-partition test
> Scylla Cloud is 1/7 the expense of DynamoDB when running equivalent workloads
> Scylla Cloud: Average replication latency of 82ms. DynamoDB: Average latency of 370ms.
> Scylla vs Bigtable – Database Benchmark
> Scylla Cloud performs 26X better than Google Cloud Bigtable when applied with real-world, unoptimized data distribution
> Google BigTable requires 10X as many nodes to accept the same workload as Scylla Cloud
> Scylla Cloud was able to sustain 26x the throughput, and with read latencies 1/800th and write latencies less than 1/100th of Cloud Bigtable
> Scylla vs CockroachDB – Database Benchmark
> Loading 10x the data into Scylla took less than half the time it took for CockroachDB to load the much lesser dataset.
> Scylla handled 10x the amount of data.
> Scylla achieved 9.3x the throughput of CockroachDB at 1/4th the latency.
That said I’ve seen the value Scylla brings in its core value prop, replacing Cassandra. It’s real good at that.
CockroachDB is focused on consistency with full SQL support while ScyllaDB focuses on availability with high-performance.
https://www.scylladb.com/2021/08/24/apache-cassandra-4-0-vs-...
The adtech industry also uses Aerospike heavily but that (at the time) had many replication data model issues compared to Scylla/Cassandra.
I note it's written in C++ which is a bit of a surprise - I'd expected Rust or Golang.
Interesting as well is is AGPL - licensing is always contentious:
> Q: Would you implement Scylla in Go, Rust or Javascript if you could?
> Avi: Good question. I wouldn’t implement Scylla in Javascript. It’s not really a high-performance language, but I will note that Node.js and Seastar share many characteristics. Both are using a reactor pattern and designed for high concurrency. Of course the performance is going to be very different between the two, but writing code for Node.js and writing code for Seastar is quite similar.
> Go also has an interesting take on concurrency. I still wouldn’t use it for something like Scylla. It is a garbage-collected language so you lose a lot of predictability, and you lose some performance. The concurrency model is great. The language lacks generics. I like generics a lot and I think they are required for complex software. I also hear that Go is getting generics in the next iteration. Go is actually quite close to being useful for writing a high-performance database. It still has the downside of having a garbage collector, so from that point-of-view I wouldn’t pick it.
> If you are familiar with how Scylla uses the direct I/O and asynchronous I/O, this is not something that Go is great at right now. I imagine that it will evolve. So I wouldn’t pick Javascript or Go.
> However, the other language you mentioned, Rust, does have all of the correct characteristics that Scylla requires. Precise control over what happens. It doesn’t have a garbage collector so it means that you have predictability over how much time your things take, like allocation. You don’t have pause times. And it is a well-designed language. I think it is better than C++ which we are currently using. So if we were starting at this point in time, I would take a hard look at Rust, and I imagine that we would pick it instead of C++. Of course, when we started Rust didn’t have the maturity that it has now, but it has progressed a long time since then and I’m following it with great interest. I think it’s a well-done language.
Garbage collected languages like Golang and high-performance database kernels are incompatible because the GC interferes with core design elements of high-performance database kernels. In addition to a significant loss of performance, it introduces operational edge cases you don't have to deal with in non-GC languages.
Rust has an issue unique to Rust in the specific case of high-performance database kernels. The internals of high-performance databases are full of structures, behaviors, and safety semantics that Rust's safety checking infrastructure is not designed to reason about. Consequently, to use Rust in a way that produces equivalent performance requires marking most of the address space as "unsafe". And while you could do this, Rust is currently less expressive than modern C++ for this type of code anyway, so it isn't ergonomic either.
C++ is just exceptionally ergonomic for writing high-performance database kernels compared to the alternatives at the moment.
None of that sounds right to me.
More likely the developers already know C++, there's already a lot of KV stores built in C++, and Rust is a relatively new player. Scylla was released in 2015, Rust hit 1.0 in 2015, seems obvious why Scylla didn't go with Rust.
edit: Yep, from further down
> So if we were starting at this point in time, I would take a hard look at Rust, and I imagine that we would pick it instead of C++. Of course, when we started Rust didn’t have the maturity that it has now, but it has progressed a long time since then and I’m following it with great interest. I think it’s a well-done language.
https://www.scylladb.com/2020/03/26/avi-kivity-at-core-c-201...
But I think you are wrong about Rust not having the right machinery for making high performance dbs. Two examples are Noria and Materialize
https://github.com/mit-pdos/noria
and it its 50k lines, in the immediate codebase, there are 40 uses of unsafe.
In Materialize's 125k of Rust, there are 76 direct uses of unsafe.
It is common in recent database kernel architectures to implement an entire virtual memory system in user space. This enables some great throughput optimizations. Almost all of your runtime objects are instantiated on top of this and, importantly, entities outside your process/code can write into your address space -- an invisible implicit reference. As a side effect, there are few memory references in the way Rust understands it, those outside entities don't understand or respect the object model, and some aspects of ownership, mutability, and lifetime can only be resolved at runtime and with some interesting edge cases. The model is elegant and safe, it just doesn't provide a coherent graph of classic memory references that Rust can latch onto at compile-time for safety analysis.
All good wholesome fun.
Two things that I saw in the last couple weeks that might start to sway you.
https://github.com/sslab-gatech/Rudra#readme
GhostCell: Separating Permissions from Data in Rust https://www.youtube.com/watch?v=jIbubw86p0M
Even unsafe Rust can be as ergonomic as C++. But that unsafety can be mediated, moderated and controlled.
Based on my (admittedly limited) experience with Rust, this isn't true. Yes, you'd likely have to use "unsafe" a few times in order to implement a database system in Rust, but you would only need to do this for certain types of low-level data structures. The uses of those data structures—which would represent the majority of your code—would almost certainly be written in safe Rust. Don't throw the baby out with the bathwater.
I also contest the assertion that Rust is "less expressive" than C++; I have found Rust to be very expressive and concise for such a safe language. But I also don't have a ton of experience with either one, so don't take my word for that.
The real answer as to why Scylla does not use Rust is that the language simply wasn't very mature when they started. It also helps that there are significantly more engineers that know C++ than those that know Rust.
- uninitialized memory: it is tricky to get the semantics of uninitialized memory right. the ergonomics of the `MaybeUninit` api are frankly terrible.
- memory alignment: for O_DIRECT and other cases where memory alignment is important, it is difficult to ensure that the backing memory of Vec and other datatypes is correctly aligned, which ends up pushing you towards raw pointers.
- mmap: after considerable research, it is unclear to me whether there is a safe rust api to mmap.
- hostility to unsafe: in general, rust is easy to learn (relative to C++). however, the hostility in the community to unsafe (there are some good reasons for this, not criticizing it in general), makes it more difficult for someone without a background in C/C++ to learn how to use unsafe correctly. feels like if you ask a question about how to do unsafe you get 100 people telling you what a terrible idea that is, but for database code there is very significant performance at stake.
Agreed. There's some unstable APIs that will help, but it's not great today.
> mmap
There is no possible way to expose raw mmap safely because the data under the hood can change out from under you. Whatever it is you're doing you'd want to wrap that. For example, a &[u8] could be safe, but not if you then did `str::from_utf8`. So you just have to make sure that mmap'd data is treated very carefully and doesn't get exposed across a safe boundary.
> - hostility to unsafe:
Same feeling here and I know many others feel the same way. The community can overreact to things, it is what it is.
This architecture even makes C++ compilers a bit squeamish, so it is understandable why Rust looks at these things with abject horror. If you are leaning heavily on the OS facilities to do all those things for you automagically, which many open source databases do, then Rust works fine with only modest amounts of "unsafe" code. It just produces a database that is much slower.
As for the expressiveness, Rust is adding more metaprogramming facilities but it isn't there yet. C++ template metaprogramming is incredibly powerful for writing concise, correct database internals. I used to write databases in C99; it required like 5x the code to do the same thing and without the extensive compile-time correctness verification and type-safe code generation.
https://github.com/scylladb/charybdefs
More modern is Project Circe, our efforts to make Scylla into an even more monstrous database:
https://www.scylladb.com/2021/01/12/making-scylla-a-monstrou...