Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Code Motion - Databases On Kubernetes

7ecbf760b7129f85ec8c8ba3ddf72b96?s=47 deniswsrosa
November 03, 2020

Code Motion - Databases On Kubernetes

7ecbf760b7129f85ec8c8ba3ddf72b96?s=128

deniswsrosa

November 03, 2020
Tweet

Transcript

  1. 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
  2. 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 denis.rosa@couchbase.com
  3. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

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

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

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

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

    Couchbase 2017. All rights reserved. @deniswsrosa What have changed?
  8. 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
  9. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

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

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

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

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

    Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume MySQL Volume DEALING WITH FAILURES
  14. 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
  15. 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
  16. 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 ?
  17. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

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

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

    Couchbase 2017. All rights reserved. 19 CRDs + K8s Operators
  20. 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/
  21. 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)
  22. 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
  23. 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
  24. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

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

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

    Couchbase 2017. All rights reserved. 26 DBaaS
  27. 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
  28. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. 28 Local vs Remote Persistent Storage
  29. 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
  30. 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
  31. 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/
  32. 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/
  33. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

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

    Couchbase 2017. All rights reserved. THANKS! @DENISWSROSA