Introduction

Let’s get to know each other!

  • Name
  • Where you are from
  • Where you work
  • Goals for using Cassandra
  • Prior experience
  • Personal trivia

What are we going to learn?

  • Explore KillrVideo domain
  • Using the KillrVideo domain as an example, we will explore the following topics:

    • How to manage a Cassandra cluster
    • How to maintain a Cassandra cluster
    • Implementing multiple data centers
    • Cassandra specific performance tuning
    • Environment specific performance tuning
    • Disk and Compaction tuning to optimize performance

KillrVideo, Inc.

KillrVideo is a video sharing website

killrvideo features

Features:

  • User accounts/user ratings/user comments
  • Movies and TV shows

    • Trailers available for preview
    • Movies and TV shows licensed from publishers
    • Parental restrictions based on video’s MPAA rating or parental guidelines

  • Encoding to accommodate playback on mobile devices as well as large TVs
  • Search videos per user or by title, year, actor, director, genre
  • Playback tracking allowing pausing and continuing videos at a later date

The KillrVideo domain has several features we see listed here. Most notably KillrVideo not only stores licensed content but also user-generated content as well. There are other typical video-sharing features such as parental controls, searching, and also tracking where users left off while watching a video.

Problems KillrVideo Faces

frustrated user

  • Scalability—​KillrVideo constantly adds users and videos
  • Reliability—​KillrVideo must always be available
  • Ease of use—​KillrVideo must be easy to manage and maintain

KillrVideo found too much success too early and is frantically trying to keep up with its growth. Users constantly push new content, consume content, etc. The KillrVideo team needs a simple mechanism to store/retrieve this content which continues coming at a fast pace.

Solutions Attempted

Relational Database Problems

relational problems
  • Single points of failure
  • Scaling complexity
  • Reliability issues
  • Difficult to serve users worldwide

Currently KillrVideo stores its data in a relational database. However, this master/slave architecture causes a single point of failure when the database crashes.

KillrVideo also found that scaling their relational database is doable but difficult. Users on the other side of the world experience lag on the site simply because of their geographical location. Ideally the KillrVideo team could store their data in both the eastern and western hemispheres so all users can enjoy a pleasant viewing experience.

KillrVideo and Cassandra

Why Cassandra

nodes

  • Peers instead of master/slave
  • Linear scale performance
  • Always on reliability
  • Data can be stored geographically close to clients

KillrVideo needs to migrate to Cassandra to solve all of these problems. Cassandra uses nodes in a peer-to-peer fashion rather than a single centralized master/slave database. Cassandra also scales linearly with the number of nodes KillrVideo adds to the system. Cassandra is always on because when some nodes fail, the others pick up the slack. Using Cassandra, KillrVideo can easily locate its nodes geographically to the users' physical location.