scylla db@cassandra meetup, tlv, 2015

24
Cloudius Systems presents:

Upload: dor-laor

Post on 22-Jan-2018

861 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Scylla db@cassandra meetup, tlv, 2015

Cloudius Systems presents:

Page 2: Scylla db@cassandra meetup, tlv, 2015

1,000,000 CQL operationsper server

Dor Laor @ ScyllaDB

Page 3: Scylla db@cassandra meetup, tlv, 2015

1,000,000 1,800,000 CQL operationsper server

Dor Laor @ ScyllaDB

Page 4: Scylla db@cassandra meetup, tlv, 2015

Capable of 1,000,000 operations per secondPER NODE

With predictable, low latenciesCompatible with Apache Cassandra

Scylla: A new NoSQL Database

Page 5: Scylla db@cassandra meetup, tlv, 2015

THE POWER OFCASSANDRA AT THE SPEED OF REDIS

SCYLLA DB

Page 6: Scylla db@cassandra meetup, tlv, 2015

THROUGHPUT

Page 7: Scylla db@cassandra meetup, tlv, 2015

LATENCY

Page 8: Scylla db@cassandra meetup, tlv, 2015
Page 9: Scylla db@cassandra meetup, tlv, 2015

FULLY COMPATIBLE❏ Uses Cassandra SSTables❏ Use your existing drivers❏ Use your existing CQL queries❏ Use your existing ❏ Manage with or other JMX console❏ Use your existing code with no change❏ Copy over a complete Cassandra database❏ Works with the Cassandra ecosystem (Spark etc.)

Page 10: Scylla db@cassandra meetup, tlv, 2015

FULLY COMPATIBLE

Page 11: Scylla db@cassandra meetup, tlv, 2015

WHAT WOULD YOU DO WITH 1 MILLION TPS?Shrink your cluster by a factor of 10XHandle 10X traffic spikes on Black FridayModel your data instead of using Cassandra as K/VGet the most out of your data - Run more queriesMaintain your clusters while servingStop using caches in front of the database

Page 12: Scylla db@cassandra meetup, tlv, 2015

TECHNOLOGY:HOW IT WORKS

Page 13: Scylla db@cassandra meetup, tlv, 2015

SCYLLA IS QUITE DIFFERENTShard-per-core, no locks, no threads, zero-copyBased on the Seastar C++ application frameworkEfficient, unified DB cache (not using Linux page cache)CQL-oriented storage engineExploit all hardware resources - NUMA, multiqueue NICs, etc

Page 14: Scylla db@cassandra meetup, tlv, 2015

SCYLLA DB: ARCHITECTURE COMPARISON

● KVM was invented by Avi in 2006, development was managed by Dor● It was a new hypervisor after VMW, Xen had dominated the market● By smart design choices and leveraging Linux and the hardware it became the most

performing hypervisor.○ KVM holds SPECvirt performance record○ KVM holds max IOPS record

● The Open Virtualization Alliance includes hundreds of companies, including HP, IBM, Intel, AMD, Red Hat, etc

● KVM is the engine behind many clouds such as OpenStack, IBM, NTT, Fujitsu, HP, Google, DigitalOcean, etc.

Kernel

Cassandra

TCP/IPScheduler

queuequeuequeuequeuequeuethreads

NICQueues

Kernel

Traditional stack Scylla sharded stack

Memory

Lock contentionCache contentionNUMA unfriendly

Application

TCP/IP

Task Schedulerqueuequeuequeuequeuequeuesmp queue

NICQueue

DPDK

Kernel (isn’t

involved)

Userspace

Application

TCP/IP

Task Schedulerqueuequeuequeuequeuequeuesmp queue

NICQueue

DPDK

Kernel (isn’t

involved)

Userspace

Application

TCP/IP

Task Schedulerqueuequeuequeuequeuequeuesmp queue

NICQueue

DPDK

Kernel (isn’t

involved)

Userspace

CoreDatabase

TCP/IP

Task Schedulerqueuequeuequeuequeuequeuesmp queue

NICQueue

DPDK

Kernel (isn’t

involved)

Userspace

No contentionLinear scalingNUMA friendly

Page 15: Scylla db@cassandra meetup, tlv, 2015

Scylla has its own task schedulerTraditional stack Scylla stack

Promise

Task

Promise

Task

Promise

Task

Promise

Task

CPU

Promise

Task

Promise

Task

Promise

Task

Promise

Task

CPU

Promise

Task

Promise

Task

Promise

Task

Promise

Task

CPU

Promise

Task

Promise

Task

Promise

Task

Promise

Task

CPU

Promise

Task

Promise

Task

Promise

Task

Promise

Task

CPU

Promise is a pointer to eventually computed value

Task is a pointer to a lambda function

Scheduler

CPU

Scheduler

CPU

Scheduler

CPU

Scheduler

CPU

Scheduler

CPU

Thread

Stack

Thread

Stack

Thread

Stack

Thread

Stack

Thread

Stack

Thread

Stack

Thread

Stack

Thread

Stack

Thread is a function pointer

Stack is a byte array from 64k to megabytes

Context switch cost is

high. Large stacks pollutes

the caches No sharing, millions of

parallel events

Page 16: Scylla db@cassandra meetup, tlv, 2015

Scylla Memory Management

Page 17: Scylla db@cassandra meetup, tlv, 2015

Unified cacheCassandra Scylla

Key cache

Row cache

On-heap /Off-heap

Linux page cache

SSTables

Unified cache

SSTables

TuningCaching unparsed dataParasitic rowsPage faults

Page 18: Scylla db@cassandra meetup, tlv, 2015

Blasting out I/O operations

Page 19: Scylla db@cassandra meetup, tlv, 2015

Scylla’s graphs

Page 20: Scylla db@cassandra meetup, tlv, 2015

Cassandra’s graphs

Page 21: Scylla db@cassandra meetup, tlv, 2015

❏ Implement missing CQL features❏ Complete support❏ Spark integration, other connectors❏ Thrift support ❏ Authentication and encryption

Work in progress

Page 22: Scylla db@cassandra meetup, tlv, 2015

SCYLLA as an INFRASTRUCTUREScale up with the number of coresKernel bypass for direct networking and block I/OGood match for upcoming Non Volatile Memory technologyHigh availability with gossip and flexible replicationRuns everywhere: Physical, virtual, containersCan be integrated with microservices with its own httpd

Page 23: Scylla db@cassandra meetup, tlv, 2015

❏ Multi-tenancy❏ New protocols❏ Vertical integration

FUTURE

Page 24: Scylla db@cassandra meetup, tlv, 2015

SCYLLA, NoSQL GOES NATIVEThank you.

http://scylladb.com