Apache® Ignite™ and Apache® Cassandra™ Benchmarks: The Power of In-Memory Computing

As a frequent attendee and speaker at developer conferences, meetups and other high-tech events, I'm always bombarded with the questions about the distinctions between Apache® Ignite™ and Apache® Cassandra™. It's not surprising to get them because both databases have many things in common such as horizontal scalability, high availability and durability. My previous four articles in this series outlined the main differences from architectural and development standpoints:   

Today it's time to reveal the answer to the final inevitable question one would ask when comparing Ignite and Cassandra. That question is pretty straightforward - "What's the performance difference between Ignite and Cassandra, and where can I get some benchmarks?"

Since Ignite supports full-fledged memory-centric storage, benchmarking it and Cassandra can't be viewed as an apple-to-apple comparison. Ignite's store can hold terabytes and petabytes of data merely in DRAM while Cassandra's in-memory options are limited. But, for the sake of curiosity, we decided to check the performance numbers and share it with you. 

Environment and Configuration

Let me quickly share the details about the benchmarking environment, along with Ignite and Cassandra configuration parameters. Nothing is exciting in this section; it's just a must-do for articles like this one.

Generic Parameters

  • Hardware: CPU:
    • 2x Xeon E5-2609 v4 1.7GHz 
    • RAM: 96Gb 
    • SSD: 3x800Gb SSD RAID0 2.4Tb
    • Network: 10Gb/s
  • Cluster size: 3 server nodes, 1 client node (application)
  • Benchmarking framework: Yahoo! Cloud Serving Benchmark
  • Data size: 80 million entries/records 

Apache Ignite Parameters

  • Version: Apache Ignite 2.4
  • Memory Configuration: whole data set was stored both in RAM and in Ignite persistence.
  • Caches mode: ATOMIC.
  • Replication factor: 1 primary and 1 backup.
  • Write synchronization mode: FULL_SYNC.
  • WAL flushing mode: LOG_ONLY

Apache Cassandra Parameters

  • Version: 3.11.1
  • keyspace: 2 replicas;
  • write consistency: ALL;
  • read consistency: ONE;
  • commitlog_sync: periodic (default) 10s
  • JVM_OPTS="-Xm48g -Xmx48g -Xmn1600M -XX:+UseG1GC"
  • key_cache_size_in_mb: 4096
  • row_cache_size_in_mb: 32768
  • caching = { 'rows_per_partition' : 'ALL' }
  • bloom_filter_fp_chance = 0.01
  • READ benchmark was run twice to warm up the row cache

Expected Results

Initially, the benchmark simulated small loads by accessing Ignite and Cassandra with 32 application threads. The picture below shows the final measurements:


The Y-axis represents operations per second, and the X-axis shows types of measured operations. Overall, this specific benchmark suggests that:

  • Ignite outperforms Cassandra significantly in READ workloads (3x faster) and mixed ones (READ+UPD, 2x faster). It was anticipated because Ignite keeps an entire copy of data in RAM.
  • It's fair to treat write-intensive workloads (INSERT and UPDATE) as comparable. Both databases have to persist changes to disk.

Next, we went ahead and added a tougher workload by accessing the clusters from 256 application threads in parallel: 


The overall result changed positively for both databases:

  • Ignite kept its lead with read-intensive and mixed workloads where it performed 6x faster on average.
  • Cassandra pulled ahead in UPDATE benchmarks. It sounds reasonable and we expected to reproduce it since Cassandra's columnar store is architected for those operations -- while Ignite persistence inherited most of its principles from relational databases that deal with consistency and indexed data. 

Ignite or Cassandra?

If performance requirements and brutal SLAs drive your final decision, then Apache Cassandra is a good candidate for write-intensive applications under a high load. Apache Ignite, on the other hand, can exceed expectations of mission-critical deployments with heavy read or mixed workloads.

Moreover, as a summary of the whole series, it's fair to say that though the performance influences our final decision a lot, there are other factors that we always take into consideration. For instance, those who prefer Cassandra for write-intensive workloads are ready to sacrifice strong consistency with distributed transactions, ready to work with denormalized architecture and forget about advanced querying capabilities of SQL. At the same time, if you need any benefit Ignite offers over Cassandra (simplified architecture, strong consistency, collocated processing and SQL, in-memory speed), then it's logical to consider Apache Ignite for the write-intensive workloads as well since, as benchmarks confirmed, both databases show comparable numbers for mid-size write workloads.

Finally, this article and benchmarks are dated by March 15, 2018 -- so who knows what to expect from both databases in terms of performance in the future.