Fireship · @fireship
Cassandra in 100 Seconds
Uploaded July 13, 2022 · Length 2:26
Summary
cassandra database explained in 100 seconds: a wide column store for big data with horizontal scaling and no single point of failure.
- cassandra database
- nosql database
- wide column store
- horizontal scaling
- database design
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
[Music]
- 0:00
cassandra a wide column store nosql
- 0:02
database famous for its ability to
- 0:04
distribute petabytes of data with
- 0:06
unmatched reliability and performance it
- 0:08
was created in 2008 by avinash lakshman
- 0:11
who was responsible for scaling
- 0:12
facebook's inbox search feature by 2010
- 0:15
it became a top-level apache project and
- 0:17
today is used at scale by big companies
- 0:19
like apple which manages a staggering
- 0:21
100 petabytes of data across hundreds of
- 0:23
thousands of server instances it's a
- 0:25
general purpose database with use cases
- 0:27
for e-commerce content management audit
- 0:29
logging and everything in between each
- 0:31
instance of cassandra is called a node
- 0:33
and typically stores about two terabytes
- 0:35
of data what makes it special though is
- 0:36
that nodes can be easily distributed to
- 0:38
scale horizontally every node has the
- 0:41
same read write capabilities of another
- 0:43
node but is responsible for its own
- 0:44
partition of data nodes are grouped
- 0:46
together in a cluster or ring and data
- 0:48
is typically replicated on multiple
- 0:50
nodes which means no single point of
- 0:52
failure and 100 uptime the data is
- 0:54
wrapped in a key space giving developers
- 0:56
control over how it replicates in the
- 0:58
cluster each key space contains one or
- 1:00
more tables which represent tabular data
- 1:02
like you might find in a relational
- 1:04
database however it's schema-less and
- 1:06
can handle unstructured data which
- 1:08
developers can manage with the cassandra
- 1:09
query language the easiest way to get
- 1:11
started is by creating a free serverless
- 1:13
database with astra it deploys to the
- 1:15
cloud of your choice then scales
- 1:17
automatically on demand first we'll need
- 1:19
to define a key space which acts as a
- 1:21
container for replication next we'll
- 1:23
need to connect to the database which
- 1:25
can be accomplished in a variety of ways
- 1:26
it has sdks for major languages and a
- 1:29
tool called stargate that makes data
- 1:31
accessible via ras graphql and grpc or
- 1:34
you can execute raw cql code which is a
- 1:36
subset of sql create a table and include
- 1:39
a primary key to uniquely identify every
- 1:42
row then each column will have its own
- 1:44
name and data type now add data to that
- 1:46
table with the insert into statement
- 1:48
then you select to read data from the
- 1:50
table it's also possible to use the
- 1:52
where clause to filter and query the
- 1:54
data but an index will be required on
- 1:56
the column on the surface this may look
- 1:58
a lot like a relational database but it


