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

deniswsrosa

August 25, 2020
Tweet

More Decks by deniswsrosa

Other Decks in Programming

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 [email protected]
  3. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. @deniswsrosa 2016 Containers foram projetados para serem stateless
  4. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

    Couchbase 2017. All rights reserved. @deniswsrosa Avançando para 2020…
  5. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

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

    Couchbase 2017. All rights reserved. 9 Deployment Padrão
  8. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

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

    Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume CENÁRIOS DE FALHA
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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 ?
  15. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

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

    Couchbase 2017. All rights reserved. 18 K8S Custom Resource Definitions (CRDs)
  17. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

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

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

    Couchbase 2017. All rights reserved. 25 Outras Possibilidades Backup Automático XDCR Prometheus
  24. 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
  25. Confidential and Proprietary. Do not distribute without Couchbase consent. ©

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

    Couchbase 2017. All rights reserved. 33 Outros Operators @deniswsrosa
  31. 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