This article is the first of the Cassandra Data Model design (all two), which contains some of the practices ebay uses to design the Cassandra data model. Some of the best practices we learned through our communities, some of which are new to us, and some that are still controversial, may benefit from further practice.
In this article, I will explain some basic practices as well as a detailed example. Even if you don't know Cassandra, you should be able to understand most of the following.
Tell me about the use of Cassandra on ebay.
We have been trying to use Cassandra for more than 1 years. Cassandra is now serving a number of use cases, involving business from a large number of write operations to logging and tracking, to some mixed work. One of these services is our "Social Signal" project, which supports the like/own/want features of ebay's pruduct pages. Some of the use cases we've developed have been run online, but more still in the development phase.
Our Cassandra cluster is not large, but it is growing steadily. Over the past few months, we have deployed dozens of of nodes, which are distributed across several small clusters of engine rooms. You might ask, why do you want multiple clusters? We are divided into clusters through functional departments and operations. Use cases for the same business in the same functional department share a cluster, but they exist in different keyspaces.
RedLaser, hunch and other ebay partners are also trying to Cassandra solve real-world problems. In addition to Cassandra, we are also using MongoDB and hbase, I will not discuss them in this article, but I believe they all have their own advantages.
I believe you must have a lot of problems at this time, in this article will not be explained in a moment. In the upcoming Cassandra Summit Conference, I will explain in more detail each of our use case scenarios, data models and multiple data center deployments, as well as lessons learned and other knowledge.
This article focuses on the best practices for Cassandra Data Model design we have applied to ebay. Let's take a look at some of the terms used in this series.
Terminology and conventions
The term "column Name" and "column Key" are considered to be the same. Similarly, "Super column Name" and "Super Column Key" are also considered to be the same.
The following figure represents a row in a Column Family (CF)
The following figure represents a row in a Super Column Family (SCF)