DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

adil9791_158471 avatar image
adil9791_158471 asked ·

Is it possible for Cassandra to have read latency below 40ms?

I have a requirement to perform some security checks during the request response cycle. these security checks are based on user profiles. Since these checks have to be done during the request-response cycle and the amount of time to do security checks also needs to be considered.

With all this into consideration, i have designed my schema accordingly, the tables designed are doing lookup based on partition_key all the time, but for some scenarios i may have to do multiple queries (again based on partition_key)

Note:

  • it's a read heavy application, and anyway writes are cheaper so that is working fine, getting < 20ms for writes
  • i don't have any clustering column for any of the table, so partitions are small in size
  • using Cassandra for this solution as the user base is global and Cassandra takes care of replication and syncing user profiles across clusters

Ques: Is 40ms with possibly 2-3 queries in single request-response possible at all?

Is there any better way to do this?

cassandraperformance
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

Yes, absolutely but you need to design your cluster to meet the requirements -- this is a very important point. Most make a mistake of building a cluster then think they can just tune it to meet the requirements.

To use an analogy, it's like building a one-bedroom house then expect to be able to "tune" it to fit enough beds for a family of 5 people. It just wouldn't work. You need to design a house to meet the family's requirements -- size, needs, budget, etc.

The same goes for Cassandra. You need to design your cluster based on the requirements. 40ms reads are super-doable in C*. I work with a lot of organisations that have an SLA of 3-6ms reads but again to achieve the performance, your cluster must be built to design. In most cases, this means:

  • start with the right hardware selection: minimum 8-core machines with at least 40GB of RAM (64GB preferred), separate SSDs for data and commitlog
  • sizing your cluster correctly - add nodes until it delivers the throughput requirements

Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.