Building Cassandra as a Service with Cloud Foundry
During June 11–12, Cassandra Summit 2013 took place in San Francisco, CA. More than 1,000 experts gathered to discuss real-life use cases and share experience in Cassandra implementation. Renat Khasanshyn, CEO at Altoros, and Cornelia Davis, Senior Technologist at Pivotal, presented a joint session on integrating Cassandra with Cloud Foundry, an open Platform as a Service.
Why Cassandra as a Service?
Having no single point of failure makes Cassandra highly available. Despite all the benefits of this NoSQL database as a stand-alone solution, it may be largely improved when implemented together with the Cloud Foundry platform. In particular, Cassandra as a service (C*aaS) would guarantee consistent deployments among several environments (development, staging, and production) without misconfiguration risks that could explode in production.
According to Renat, the greatest advantage for developers is that they don’t have to bother about scalability and high availability. Development productivity is higher in this case, since developers don’t need to set up servers by themselves. They can add more instances of Cassandra by simply entering the
$ cf bind service command in the CLI.
“Instead of waiting, you can just deploy. The main point of why use Cloud Foundry for developers is to separate the notion of developing an application and deploying / scaling it.” —Renat Khasanshyn, Altoros
C*aaS is easy to scale both horizontally and vertically, as with the BOSH tool chain you can quickly add new nodes, while without this scalability is delivered on the app-by-app basis. C*aaS can manage different configurations (Service Plans) depending on your needs. If you’ve made bad sizing decision, you can reconfigure your app to use a bigger/smaller service plan.
As far as APIs are concerned, Cloud Foundry provides RESTful APIs, while Cassandra as a stand-alone scenario cannot boast of any APIs. In addition, a Cloud Foundry service is tested and stable, so it may be provisioned within minutes as opposed to days and weeks in case of a stand-alone database.
“Cloud Foundry is a collection of smaller projects, each responsible for a certain portion of this whole big picture. Put together, it delivers a middleware abstraction layer…By abstracting infrastructure and the developer console, we can achieve significant benefits.” —Renat Khasanshyn, Altoros
C*aaS can also help to avoid the vendor lock-in: when a developer has built and deployed an app on AWS using Cloud Foundry services, it still remains easy to shift it to another public or private cloud.
How it works
The service will be aware of provisioning capacity, status, availability, servers where Cassandra runs, etc. It is possible to create as many Cassandra nodes as needed.
When one deploys an app to Cloud Foundry, s/he simply binds to that Cassandra deployment via a service gateway. The requests are made to the service gateway, which communicates to the Cassandra installation via a layer called a Service node.
During the session, Cornelia demonstrated how easy it is to deploy a two- and three-node Cassandra cluster with BOSH. Cornelia updated the deployment manifest, and BOSH then took these new configurations, summarizing the differences made (the number of VMs / instances and IP addresses).
All the communication between Cassandra’s gateway and the nodes was done via the NATS asynchronous messaging system. An application was published to the existing cluster by simply using the
cf push command.
“What you do with a Platform as a Service is that you push applications, you bind to existing services. You’re not dealing with things at the IaaS layer, virtual machines, networks, and storage. You’re dealing with applications and services. That’s your unit of currency in the PaaS.” —Cornelia Davis, Pivotal
As Cassandra v2.0 is coming in September 2013, the C*aaS solution is being updated; a new version of the service expected to be released by that time.
Want details? Watch the video!
These are the slides presented by Cornelia and Renat.
- The Ecosystem of PCF Tiles: Easier Deployment and Upgrades
- Building a Mission-Critical Architecture for Healthcare with Cloud Foundry
About the experts
Renat Khasanshyn is the founder and CEO of Altoros, and Venture Partner at Runa Capital. He helps define Altoros’s strategic vision, and its role in Cloud Foundry PaaS ecosystem. In the past, he has been selected as finalist for the Emerging Executive of the Year award by the Massachusetts Technology Leadership Council and once won an IBM Business Mashup Challenge. Prior to founding Altoros, Renat was VP of Engineering for Tampa-based insurance company PriMed.
Cornelia Davis is Director of Platform Engineering on the Cloud Foundry Team at Pivotal. She is responsible for driving and executing customer and partner cloud platform strategies. Being a proficient platform engineer, Cornelia also willingly shares her knowledge at conferences, meetups, webinars, etc.