Getting the Most Out
of Scylla on Kubernetes
Moreno Garcia
Solutions Architect at ScyllaDB
Presenter bio
Moreno Garcia is a problem solver by talent and trade. He
has worked in IT for 15 years, the last five as a solution
architect. An open source software enthusiast, Moreno
joined Scylla 9 months ago, loves applying new technology to
solve old problems, and hates acronyms with a passion.
Agenda
▪ Learn how to drive
▪ Get acquainted with the roads
▪ Get used to higher speeds
▪ Start racing
Learn how to drive:
▪ Don't care about performance
▪ Functionality test
▪ Simulate simple Operations
▪ Have fun
Why docker on developer mode?
▪ Unsupported configurations
▪ Bypass checks and tuning
▪ Reproduce
• Simple Use cases
• Problems
▪ Prototyping
Why docker on developer mode?
Know your underlying infrastructure
▪ Storage
▪ CPU pinning
▪ Network
Losing the training wheels
Know your underlying infrastructure
▪ Storage
▪ CPU pinning
▪ Network
Losing the training wheels
The cost of containerization
Reasons for performance degradation
▪ Relaxation on resource isolation
▪ Increased context switches
▪ Extra layer of abstraction
https://www.scylladb.com/2018/08/09/cost-containerization-scylla/
--volume
running: (['/usr/lib/scylla/scylla_dev_mode_setup', '--developer-mode', '0'],)
running: (['/usr/lib/scylla/scylla_io_setup'],)
Measuring sequential write bandwidth: 329 MB/s
Measuring sequential read bandwidth: 523 MB/s
Measuring random write IOPS: 79849 IOPS
Measuring random read IOPS: 73513 IOPS
Recommended --num-io-queues: 8
Solid, not spinning (SSD vs. HDD)
CPU and Network - Throughput
CPU and Network - Latency
Kubernetes
Kubernetes
"Kubernetes is a portable, extensible open-source platform for
managing containerized workloads and services, that facilitates
both declarative configuration and automation."
Stateless vs Stateful
Stateful
▪ Persistent (storage)
▪ Identifiable (unique)
▪ Organized scaling
Stateless
▪ No persistence
▪ Perishable
▪ Parallel, unordered scaling
Kubernetes building blocks
▪ StorageClass
▪ StatefulSet
▪ ConfigMap
Storage Persistence
Persistent
Volume
Persistent
Volume Claim
volumeMounts:
- name: datadir
mountPath:
/var/lib/scylla
reclaimPolicy: Retain
mountPathStorageClass
Actual Disk
Attached to the
Pod
Internal Pod
Representation
Specification
Configuration through ConfigMap
Volume VolumeMount
volumeMounts:
- name: scylla-yaml-volume
mountPath:
/etc/scylla/scylla.yaml
subPath: scylla.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: scylla-config
data:
scylla.yaml: |
cluster_name: MyCluster
etc...
ConfigMap
volumes:
- name: scylla-yaml-
volume
configMap:
name: scylla-config
Configuration - Arguments
docker
entrypoint
args:
- --developer-mode
- “0”
args scylla setup
Past, Present and Future
Manifest Files
Helm Chart
Operator
Thank You
Any Questions ?
Please stay in touch
moreno@scylladb.com
https://www.linkedin.com/in/moreno-garcia/

Scylla Summit 2018: Getting the Most Out of Scylla on Kubernetes

  • 1.
    Getting the MostOut of Scylla on Kubernetes Moreno Garcia Solutions Architect at ScyllaDB
  • 2.
    Presenter bio Moreno Garciais a problem solver by talent and trade. He has worked in IT for 15 years, the last five as a solution architect. An open source software enthusiast, Moreno joined Scylla 9 months ago, loves applying new technology to solve old problems, and hates acronyms with a passion.
  • 3.
  • 4.
    ▪ Learn howto drive ▪ Get acquainted with the roads ▪ Get used to higher speeds ▪ Start racing
  • 6.
    Learn how todrive: ▪ Don't care about performance ▪ Functionality test ▪ Simulate simple Operations ▪ Have fun Why docker on developer mode?
  • 7.
    ▪ Unsupported configurations ▪Bypass checks and tuning ▪ Reproduce • Simple Use cases • Problems ▪ Prototyping Why docker on developer mode?
  • 8.
    Know your underlyinginfrastructure ▪ Storage ▪ CPU pinning ▪ Network Losing the training wheels
  • 9.
    Know your underlyinginfrastructure ▪ Storage ▪ CPU pinning ▪ Network Losing the training wheels
  • 10.
    The cost ofcontainerization Reasons for performance degradation ▪ Relaxation on resource isolation ▪ Increased context switches ▪ Extra layer of abstraction https://www.scylladb.com/2018/08/09/cost-containerization-scylla/
  • 11.
    --volume running: (['/usr/lib/scylla/scylla_dev_mode_setup', '--developer-mode','0'],) running: (['/usr/lib/scylla/scylla_io_setup'],) Measuring sequential write bandwidth: 329 MB/s Measuring sequential read bandwidth: 523 MB/s Measuring random write IOPS: 79849 IOPS Measuring random read IOPS: 73513 IOPS Recommended --num-io-queues: 8 Solid, not spinning (SSD vs. HDD)
  • 12.
    CPU and Network- Throughput
  • 13.
    CPU and Network- Latency
  • 14.
  • 15.
    Kubernetes "Kubernetes is aportable, extensible open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation."
  • 16.
    Stateless vs Stateful Stateful ▪Persistent (storage) ▪ Identifiable (unique) ▪ Organized scaling Stateless ▪ No persistence ▪ Perishable ▪ Parallel, unordered scaling
  • 17.
    Kubernetes building blocks ▪StorageClass ▪ StatefulSet ▪ ConfigMap
  • 18.
    Storage Persistence Persistent Volume Persistent Volume Claim volumeMounts: -name: datadir mountPath: /var/lib/scylla reclaimPolicy: Retain mountPathStorageClass Actual Disk Attached to the Pod Internal Pod Representation Specification
  • 19.
    Configuration through ConfigMap VolumeVolumeMount volumeMounts: - name: scylla-yaml-volume mountPath: /etc/scylla/scylla.yaml subPath: scylla.yaml apiVersion: v1 kind: ConfigMap metadata: name: scylla-config data: scylla.yaml: | cluster_name: MyCluster etc... ConfigMap volumes: - name: scylla-yaml- volume configMap: name: scylla-config
  • 20.
    Configuration - Arguments docker entrypoint args: ---developer-mode - “0” args scylla setup
  • 21.
    Past, Present andFuture Manifest Files Helm Chart Operator
  • 22.
    Thank You Any Questions? Please stay in touch moreno@scylladb.com https://www.linkedin.com/in/moreno-garcia/

Editor's Notes

  • #4 Where we were. What we did. Where we are going. Instead… my journey with Scylla, Docker and Kubernetes.
  • #5 I started with Scylla in March of this year. As any other guy I like to think I’m pretty smart. But in Scylla I walk among giants. These are the guys who created the KVM, we have people that worked on the self-driving car projects. I’m surrounded by geniuses. My first idea for this presentation and how did I landed on the current presentation. Importance of training, getting the underlying concepts right. The F1 metaphor and other possible metaphors (astronauts). Our community.
  • #7 Maybe you are new to NoSQL, maybe you are new to Scylla. Maybe yet there is an aspect or part of Scylla that you are not very familiar. You know how it goes: you read the documentation, you know how it SHOULD work and yet you still have that nagging feeling... Scylla docker with developer mode comes to the rescue.
  • #8 It is like using a car or flight simulator. None of the consequences but also, keep in mind the PERFORMANCE behavior will be very different. When you are in a Nascar simulator, you don’t feel the G-force. Compatibility: our promise as a drop-in C* replacement. My experience with POCs and working with R&D at Scylla.
  • #9 Why your first bottleneck will be disks (specially spinning disks). Playing with SSDs locally. Moving to the cloud or on premise environment.
  • #10 Why your first bottleneck will be disks (specially spinning disks). Playing with SSDs locally. Moving to the cloud or on premise environment.
  • #12 Remember what I said about discovery and self-tuning? Here’s one example from my laptop m2.ssd.
  • #16 I’m assuming that you are all familiar with Kubernetes and with the basic concepts like Master, Nodes, Pods, Volumes, etc. I will focus just on the details that are important to Scylla. If you need a good introduction to Kubernetes I will refer you to the Jesse’s presentation from out last summit or our joint webinar on Kubernetes and Helm. They are both available on our YouTube channel. https://youtu.be/Y-6qilMBr7A https://youtu.be/PMze5xeq_ZY
  • #17 While it can be tricky to define Stateless and Stateful applications, I will adopt a “common sense” definition. A stateless application is one which not depends on persistent storage. It is usually only responsible for its own code and, maybe, some static content being hosted on it. A stateful application persists information on storage and even if the app if offline or deleted, the information can still be retrieved from the storage.
  • #18 While it can be tricky to define Stateless and Stateful applications, I will adopt a “common sense” definition. A stateless application is one which not depends on persistent storage. It is usually only responsible for its own code and, maybe, some static content being hosted on it. A stateful application persists information on storage and even if the app if offline or deleted, the information can still be retrieved from the storage.
  • #19 GKE provides us a type: pd-ssd which we use to create a StorageClass. Our StatefulSet will have a VolumeClaimTemplate that requests that StorageClass which is dynamically provisions a PersistentVolume by GKE and attaches the PersistentVolumeClaim mounted to the selected mountPath for our VolumeMount.
  • #21 I’m calling “dynamic” configuration all the configurations and parameters that are unique to each Scylla nodes or depend on other scylla nodes. Things like seeds, internal node communication and client communication IPs, etc. These arguments are passed to the docker entrypoint and handled by Scylla (as opposed to being handled by kubernetes)