DataStax gRPC API for Cassandra Boosts Multi-Cloud, Microservices App Performance

DataStax new gRPC API enables developers to create microservices apps that query Apache Cassandra without need for native drivers. The open source option also boosts performance.

Tags: Apache, API, Cassandra, cloud native, database. DataStax, gRPC, NoSQL,

DataStax has released an open source gRPC API for its Astra DB NoSQL serverless cloud database built on Apache Cassandra. It is designed to boost performance, resilience and scale with microservices, deployments across multiple cloud environments, and available on GitHub.


DataStax is the creator of an open, multi-cloud data stack built on Apache Cassandra, optimized for serverless and Kubernetes. The company's gRPC API leverages the open source Remote Procedure Call (gRPC) framework created by Google to boost performance and simplify support for multilingual microservices on AWS, Azure, and Google Cloud.


The new gRPC API provides an interface between RESTful applications and native gRPC APIs. It can connect applications running on various platforms – from mobile devices to global data centers. 


The gRPC API is part of Stargate, an open-source data gateway that sits between apps and the database – making it easier for developers to work with real-time data and data at scale with Cassandra. It includes schemaless JSON, REST, and GraphQL APIs, providing alternatives to traditional database drivers.


"With Stargate, it's never been easier to leverage the power of Apache Cassandra for microservices-based applications with ultimate scalability and performance," said Ed Anuff, chief product officer, DataStax. "Our gRPC API modernizes microservices communication to efficiently connect services across multiple clouds for increased application performance and agility. Through our open stack and Stargate APIs, DataStax is committed to helping developers and enterprises easily connect all their real-time data."

Benefits, Architecture, Use Cases for DataStax gRPC API

The DataStax gRPC API lets developers create microservices applications that query Apache Cassandra without native drivers. Under the covers, Client libraries send CQL [Cassandra Query Language] queries from the application to the gRPC API, which passes those queries to Cassandra.


In this context, the gRPC API the low-latency DataStax Cloud Native Java SDK communicates with Cassandra. The DataStax Java driver is open source and is available on GitHub.


The DataStax gRPC API offers these benefits to developers and IT Ops teams:   

  • Increase performance of microservices applications in cloud native environments
  • DataStax supported clients for Go, Rust, Node.js and Java
  • Leverage multilingual microservices while eliminating native drivers
  • Leverages advanced features of HTTP/2 across popular clouds, including Amazon Web Services, Azure, and Google Cloud

With the new gRPC API for Cassandra, users can "leverage a powerful database in combination with a microservices-oriented API for performant applications," wrote Bhavani Rao, DataStax director of product marketing in a recent blog.


Rao described the architecture behind the benefits of the gRPC API.

Native database drivers offer high performance but not all programming languages have commercially supported drivers. Writing and maintaining a native driver is complex and time-consuming because it involves significant configuration management (retries, load balancing, and pooling, for example). Community drivers alleviate development work but often lack enterprise functionality because active development is intermittent. 


One way to address these challenges is with gRPC, an open-source, high-performance, remote procedure call (RPC) framework developed by Google. DataStax has leveraged this technology to create a gRPC API to query Cassandra that's 100% open source and already includes client libraries for Go, Rust, Node.js, and Java.

By creating client libraries for a gRPC API, users also can avoid developmental tasks associated with creating drivers and operational tasks associated with maintenance and deployment. This both saves time and reduces complexity, Rao added. He also went on to detail the efficiencies gRPC offers.  

gRPC autogenerates a non-trivial amount of code used to manage operational tasks such as connection pooling, TLS, authentication, load balancing, retry policies, write coalescing, compression, and health checks. DataStax-maintained message-definition files allow for auto-generation of language-specific code that encodes and decodes protobuffers for communicating with Stargate. Abstracting away operational tasks to the underlying infrastructure is consistent with a cloud-native design pattern. 


Since gRPC allows for describing a service contract in a binary format, there's a standard way to specify those contracts, regardless of the programming language used, thus ensuring interoperability. If you're creating applications using polyglot microservices, gRPC is the best choice for exchanging data between these services and Cassandra.

gRPC offers a solid alternative to native Cassandra drivers for communicating between microservices for two main reasons: high-performance and multilingual support. DataStax execs further suggested several use cases well-suited to gRPC, including:  

  • To interconnect microservices written in different languages
  • To support Go or Rust drivers
  • To create a client library for framework/language that doesn't have a driver
  • To boost native driver-level performance without using a driver

The release of the open source gRPC API comes as a recent IDC research report suggests that by 2024 net-new production-grade cloud-native apps will increase to 70 percent of all apps. The report noted this increase would be driven by the rapid adoption of microservices, containers, dynamic orchestration, DevOps, and like technologies and methodologies.