In this blog, we will cover 3 ways you can utilize Cassandra as a service in the cloud. We will cover DataStax Astra, Amazon Keyspaces, and Microsoft Azure Cosmos DB. A video is embedded in the blog where you can watch a live demo where we spin up databases on each of these services and take a look at the cool features each service provides.
Instead of having to manually provision, configure, and push a Cassandra cluster to the cloud, there are services that have been coming out from big companies that allow users to directly create databases in the cloud and access them in multiple ways. The three services we will cover today are DataStax Astra, AWS Keyspaces, and Microsoft Azure Cosmos DB.
If you have been following us here at Anant, then you know that we have already worked with DataStax Astra and created an open source application that you can use to quickly try Astra out. The repo can be found here: https://github.com/Anant/cassandra.api. Also, you can check out some blogs and webinars that we have done in conjunction with this repo below.
But back to introducing DataStax Astra for those who are unfamiliar. Astra is DataStax’s cloud-native Cassandra-as-a-service built on Apache Cassandra versus the other two, which are based on proprietary technology and more Cassandra compatible. Astra is powered by DataStax’s open-source Kubernetes Operator for Cassandra.
A really cool option that Astra provides is a 10 Gig free tier with no credit card required, so you can get a Cassandra database up and running with no worry about getting charged in testing environments. Astra also eliminates the overhead to install, operate, and scale Cassandra. Another really cool feature that Astra provides is out-of-the-box REST and GraphQL endpoints that can be used instead of the DataStax drivers so you can directly build front-end components without needing a back-end service that provides your Cassandra data.
If you end up needing to utilize the paid version of Astra, you can deploy on AWS or GCP and keep compatibility with open-source Cassandra. Furthermore, users can put their data where they need it without compromising performance, availability, or accessibility.
In comparison to Amazon Keyspaces and Microsoft Azure Cosmos DB, which we talk about below, I think one of the biggest benefits of using DataStax Astra is the 10 Gig Free Tier with no credit card required. This allows users to test using Cassandra in the cloud without incurring charges. Also, it allows users with smaller apps and data requirements to use Cassandra in the cloud, free of charge if they are below the 10 Gig mark. In addition, since DataStax Astra is based on Apache Cassandra rather than proprietary technologies, it may have fewer limitations in functionality versus Amazon Keyspaces and Microsoft Azure Cosmos DB.
If you are ready to try out Astra and need help migrating your app to Astra, DataStax provides migration for your first application for free. More information on this can be found here.
In the video embedded below, we take a closer look at Astra by spinning up a free tier database and checking out some of the features they provide with the service.
Amazon Keyspaces is a scalable, highly available, and managed Apache Cassandra–compatible database service. With Amazon Keyspaces, users can run their Cassandra workloads on AWS using the same Cassandra application code and developer tools that they already use. Because it’s a cloud-native service, users can set up, secure, and scale Cassandra tables in the AWS Cloud without managing additional infrastructure.
Amazon Keyspaces enables users to use the Cassandra Query Language (CQL) API code, Cassandra drivers, and developer tools that they already use. Updating applications to use Amazon Keyspaces is as easy as changing the Cassandra hostname to the Amazon Keyspaces service endpoint.
Users do not have to provision, patch, or manage servers, so they can focus on building better applications. Tables can scale up and down automatically, and users can optimize the cost of reads and writes based on their applications’ traffic patterns by choosing either on-demand or provisioned capacity mode.
Amazon Keyspaces allows for consistent, single-digit-millisecond response times at any scale. Users can build applications with virtually unlimited throughput and storage that can serve thousands of requests per second without the need for capacity planning. Users can also monitor performance by using Amazon CloudWatch to help keep their applications running smoothly.
Amazon Keyspaces also offers a 99.99% availability SLA within an AWS Region. Tables are encrypted by default and replicated three times in multiple AWS Availability Zones for high availability. Users can create continuous table backups with hundreds of terabytes of data with no performance impact on their application, and recover to any point in time in the preceding 35 days.
Users can build applications on AWS by using open-source Cassandra APIs and drivers that are available for a wide range of programming languages such as Java, Python, Ruby, .NET, Node.js, PHP, C++, and Perl.
However, as mentioned above, since Amazon Keyspaces is based on proprietary technology rather than Apache Cassandra, there are some limitations and functional differences from Apache Cassandra. More on this can be read here:
- https://docs.aws.amazon.com/keyspaces/latest/devguide/functional-differences.html
- https://docs.aws.amazon.com/keyspaces/latest/devguide/cassandra-apis.html
So depending on those limitations, functional differences, and pricing, you may choose a different Cassandra as a service in the cloud option; however, Amazon Keyspaces does provide many benefits when using Cassandra in the cloud. In the video embedded below, we take a look at how easy it is to spin up a database on Amazon Keyspaces; as well as, look at some of the features they provide with the service in a live demo.
Microsoft Azure Cosmos DB
Azure Cosmos DB is a fully managed NoSQL database service for modern app development. Users can get guaranteed single-digit millisecond response times and 99.99% availability, backed by SLAs, automatic and instant scalability, and open source APIs for MongoDB and Cassandra. With Cosmos DB, users can enjoy fast writes and reads anywhere in the world with turnkey multi-master global distribution. Because Cosmos DB is fully-managed and serverless, users have the option of instant, automatic scaling that responds to application needs.
Cosmos DB offers guaranteed speed at any scale, even through bursts with instant, limitless elasticity, fast reads and multi-master writes, anywhere in the world.
It also allows for fast and flexible app development with SDKs for popular languages, APIs for SQL, MongoDB, Cassandra, and Gremlin, and no-ETL (extract, transform, load) analytics.
As mentioned above, and like Amazon Keyspaces, Microsoft Azure Cosmos DB offers 99.99% availability and enterprise-level security.
The benefits of using Apache Cassandra API for Azure Cosmos DB are highlighted here. A few key benefits outlined are no operations management, open source standard, performance management, ability to use existing code and tools, throughput and storage elasticity, global distribution and availability, choice of consistency, enterprise-grade, and event sourcing.
Again, because Microsoft Azure Cosmos DB is based on proprietary software, there may be some limitations and functional differences between Cosmos DB and Apache Cassandra. However, Cosmos DB is a strong alternative to using a service like DataStax Astra or Amazon Keyspaces, but pricing and limitations may play a factor in your choice.
I hope you were able to take something away from this, and I hope you have fun utilizing Cassandra as a service in the cloud!
As mentioned above, there is a live demo where we take a look at each of the services and see how easy it is to spin up a database on each. We also cover a few different features that each service provides in the video like CQL terminals, notebooks, and monitoring so be sure to check it out!
Cassandra.Link
Cassandra.Link is a knowledge base that we created for all things Apache Cassandra. Our goal with Cassandra.Link was to not only fill the gap of Planet Cassandra, but to bring the Cassandra community together. Feel free to reach out if you wish to collaborate with us on this project in any capacity.
We are a technology company that specializes in building business platforms. If you have any questions about the tools discussed in this post or about any of our services, feel free to send us an email!