Apache Cassandra on Anthos: Scaling applications for a global market
Application Modernization Scale Solution Specialist, Google Cloud
Principal Architect at Datastax
Try Google Cloud
Start building on Google Cloud with $300 in free credits and 20+ always free products.Free trial
Your users are everywhere. Meeting them where they live and work requires scaling your experience, not just in data size and processing power, but also geographically. Scaling for a global market needs successful cloud-native delivery, cutting-edge management tools, and new approaches that can efficiently handle distributed, hybrid, and even multi-cloud environments.
Successful Hybrid/Multi/distributed applications provide their maintainers with observability, repeatability, and autonomy. These key attributes create an approach that can span geographies. Through our partnership with DataStax, we’re able to offer a hybrid stack where Anthos provides the enterprise ready cloud native framework upon which the DataStax team delivers a fully cloud native integration of Apache Cassandra. The result is a highly scalable global database with developer friendly APIs. Let’s break down what makes this application stack unique.
You can’t fix what you can’t find. “The squeaky wheel gets the grease” is not a way to track down issues with complicated systems. To manage global scale applications you need to be able to see how things impact one another to efficiently maintain and improve distributed systems. A holistic view of the entire app is the way to do that.
Repeatability reduces the time required to expand systems as well as the special expertise required to successfully operate them. UX designers have a rule called the Principle of Least Surprise, which requires that the way we interact with a system should be as consistent as possible, because surprises cause errors. Keeping operations consistent across a global network of clouds means more predictability, better security and, well, less work. “Shadow ops'' or one-off fixes can cause expensive and time consuming issues which limit the time and energy we have to improve and expand our applications.
Autonomy is tightly related to the idea of concurrency in programming. It reflects the ability of a system to perform work without needing to interact with other workers, processes or nodes in our application. The more autonomous our application is, the less it is impacted by external factors like network partitions or coordination with other processes. When we need to coordinate we become less responsive. While a truly share-nothing architecture isn’t usually possible, less coordination equals more scalability, durability, and responsiveness. We need autonomy between the processes of our app to make the most of our resources and ensure continued scalability.
In short, Observability and repeatability remove obstacles and issues that eat your time and hide problems. Autonomy enables maximum scale and responsiveness.
How do we maximize these three attributes, with limited trade offs? We need the following:
Parallelism in our application – to allow hundreds of processes running across regions hybrid cloud or multi cloud
Reduce the PLS in our ops with a consistent infrastructure interface
Increase Autonomy all the way to the heart (data layer) of the stack
The approach doesn’t take a strong position on what language/s are used to create these apps, but it does prefer an operational and data approach that promotes these three values. A great way to achieve this is a Anthos and Apache Cassandra team-up.
From Anthos we get observability. Anthos adds analytics and security for network connectivity to the existing set of Google Cloud reporting on observation tools.
For repeatability, Anthos tackles one of the biggest offenders to the Principle of Least Surprise by presenting a consistent environment to developers, operators, and security team no matter where the application is deployed. Anthos Config Management provides a central repository of configuration information, managed declaratively with gitops, and that can help your systems conform across multiple clusters and data centers.
Cassandra’s focus on availability (think CAP theorem) makes it a perfect match for the kind of geographically distributed applications that benefit from Anthos. Data layers that prefer immediate consistency over availability limit the autonomy of your application. Strict consistency can’t happen without locking, and that results in inevitable queuing of requests. This is even more difficult to handle when your app spans geographically distant areas, as true consistency requires shared clocks or lots of coordination. Consistency first works beautifully on a single machine or in a small datacenter but will become cumbersome to maintain when it grows beyond those bounds.
Avoid entanglements that bubble up into your app stack and lock up resources by designing for availability over immediate consistency.
Designing for autonomy first means that the data layer avoids blocking. With Apache Cassandra:
Write to any node, not just a shard leader
Execute many fast writes simultaneously, because writes are not trapped or synchronized behind other writes
Select how concurrent your reads and writes should be at query time when required
Let’s break down the approach:
Observability, repeatability, and autonomy come together in Apache Cassandra on Anthos. Apache Cassandra on Anthos enables cloud native applications that are truly hybrid – fostering responsive, distributed, and highly available apps while minimizing the time it takes to deploy and maintain distributed applications.
Leverage the power of data portability and scale today. Consult Matt(DataStax) and Rohit(Google) for an app health check and find out if your app is a fit for Hybrid. For a hands-on deep dive on configuring Cassandra on Google Anthos and leveraging it as a data fabric across clouds, register for this on-demand workshop where we demo how to run Apache Cassandra on Anthos across fleets of K8s clusters, and see why Anthos and Cassandra are a natural fit for distributed, highly available applications.