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

Banco de Dados & Kubernetes

Banco de Dados & Kubernetes

Banco de Dados & Kubernetes: Database as a Service aonde você quiser

TDC Sao Paulo 2020

7ecbf760b7129f85ec8c8ba3ddf72b96?s=128

deniswsrosa

August 25, 2020
Tweet

Transcript

  1. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. BANCO DE DADOS & K8S Denis Rosa | Developer Advocate @deniswsrosa @deniswsrosa DBAAS AONDE VOCÊ QUISER
  2. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. • +15 anos de experiência • Especialista NoSQL & Java • 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 foram projetados para serem stateless
  5. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. @deniswsrosa Avançando para 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 O que mudou?
  8. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. @deniswsrosa • Melhorias no Docker • Production-Grade Images • Fácil de configurar • Separar o storage do compute • Kubernetes
  9. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. 9 Deployment Padrão
  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 CENÁRIOS DE FALHA
  12. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume MySQL Volume CENÁRIOS DE FALHA
  13. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume MySQL Volume CENÁRIOS DE FALHA
  14. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume K8S Worker2 MySQL Volume CENÁRIOS DE FALHA
  15. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume K8S Worker2 MySQL Volume CENÁRIOS DE FALHA
  16. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume K8S Worker3 MySQL Volume (vazio) CENÁRIOS DE FALHA ?
  17. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. @deniswsrosa Parece que algo está faltando…
  18. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. 18 K8S Custom Resource Definitions (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 Operator – Exemplo em Java 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 Operators Operator Conhecimento do comportameto do produto Deployments Autoscaling StatefulSets Configs
  23. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. 23 K8s Database Operators Essa combinação é capaz de fornecer um Database-as-a-Service sem cloud-vendor lock-in
  24. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. DEMO – VAMOS BRINCAR COM UM BD NO KUBERNETES
  25. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. 25 Outras Possibilidades Backup Automático XDCR Prometheus
  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 Os dados são apagados quando o Pod morre A latência limita a performance em aplicações com alta quantidade de read/writes por segundo Possui a melhor performance mais deve ser usado para casos específicos
  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 possui uma série de workloads padrões para fazer o benchmark de banco de dados
  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 de 50/50 leituras e escritas Workload E Short ranges: Pequenas quantidades de registros são retornadas ao invés de registros específicos. ~0% Diferença não substancial <10%* Menor performance * Os testes foram feitos a mais de um ano, e nesse tempo o docker teve algumas melhorias que podem diminuir esse gap
  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 Outros Operators @deniswsrosa
  34. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. OBRIGADO! @DENISWSROSA SE REGISTRE NO COUCHBASE CONNECT: HTTPS://INFO.COUCHBASE.COM/CONNECT.ONLINE2020.HTML?UTM_SOURCE=DROSA