Slide 1

Slide 1 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. DATABASES ON KUBERNETES Denis Rosa | Developer Advocate @deniswsrosa @deniswsrosa WHY YOU SHOULD CARE

Slide 2

Slide 2 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. • +15 years as a Developer • NoSQL & Java Specialist • OSS contributor Denis Rosa deniswsrosa @deniswsrosa [email protected]

Slide 3

Slide 3 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 3 2016

Slide 4

Slide 4 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa 2016 Containers are designed to be stateless

Slide 5

Slide 5 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa Fast forward to 2020…

Slide 6

Slide 6 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 6 2020

Slide 7

Slide 7 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa What have changed?

Slide 8

Slide 8 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa • Several performance improvements on Docker • Production-Grade Images • Easier to setup and configure • Separate storage from compute • Kubernetes

Slide 9

Slide 9 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 9 Default Deployment

Slide 10

Slide 10 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume MYSQL DEPLOYMENT

Slide 11

Slide 11 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume DEALING WITH FAILURES

Slide 12

Slide 12 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume MySQL Volume DEALING WITH FAILURES

Slide 13

Slide 13 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume MySQL Volume DEALING WITH FAILURES

Slide 14

Slide 14 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume K8S Worker2 MySQL Volume DEALING WITH FAILURES

Slide 15

Slide 15 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume K8S Worker2 MySQL Volume DEALING WITH FAILURES

Slide 16

Slide 16 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume K8S Worker3 MySQL Volume (empty) DEALING WITH FAILURES ?

Slide 17

Slide 17 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa Looks like something is missing…

Slide 18

Slide 18 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 18 K8 CRDs

Slide 19

Slide 19 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 19 CRDs + K8s Operators

Slide 20

Slide 20 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 20 Java Operator - Example Source: https://developers.redhat.com/blog/2019/10/07/write-a-simple-kubernetes-operator-in-java-using-the-fabric8-kubernetes-client/

Slide 21

Slide 21 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 Couchbase Volume K8S Worker2 Couchbase Volume OPERATORS + KUBERNETES Operator (stateless)

Slide 22

Slide 22 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 22 Quick Operator Revision Operator Knowledge from app experts Deployments Autoscaling StatefulSets Configs

Slide 23

Slide 23 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 23 K8s Database Operators Provide a cloud agnostic Database-as-a-Service solution

Slide 24

Slide 24 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. LET’S PLAY WITH A DATABASE ON KUBERNETES

Slide 25

Slide 25 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 25 Other Possibilities Automated Backup XDCR Prometheus Metrics

Slide 26

Slide 26 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 26 DBaaS

Slide 27

Slide 27 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 27 Kubernetes Storage https://github.com/brianfrankcooper/YCSB/wiki/Core-Workloads Ephemeral Remote Persistent Local Persistent Easiest one, but you lose all data if the pod gets killed. Latency limits the performance of applications with intensive read/write profiles or distributed datastores Not a general purpose storage solution

Slide 28

Slide 28 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 28 Local vs Remote Persistent Storage

Slide 29

Slide 29 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 29 Bare Metal Vs Containers https://github.com/brianfrankcooper/YCSB/wiki/Core-Workloads Yahoo! Cloud Serving Benchmark YCSB includes a set of core workloads that define a basic benchmark for cloud systems

Slide 30

Slide 30 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 30 Results https://blog.couchbase.com/performance-certification-of-couchbase-server-5-5-on-kubernetes-platform/ Workload A Update heavy workload: Mix of 50/50 reads and writes Workload E Short ranges: Short ranges of records are queried, instead of individual records. ~0% No substantial difference <10%* Performance penalty * This is more than one year old test, since then some improvements have been made to docker

Slide 31

Slide 31 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 31 Workload A https://blog.couchbase.com/performance-certification-of-couchbase-server-5-5-on-kubernetes-platform/

Slide 32

Slide 32 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 32 Workload E https://blog.couchbase.com/performance-certification-of-couchbase-server-5-5-on-kubernetes-platform/

Slide 33

Slide 33 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. 33 Other Operators @deniswsrosa

Slide 34

Slide 34 text

Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved. THANKS! @DENISWSROSA