Share
Embed
Banco de Dados & Kubernetes
Banco de Dados & Kubernetes: Database as a Service aonde você quiser
TDC Sao Paulo 2020
deniswsrosa
August 25, 2020
Transcript
34 slides
-
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 -
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] -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. 3 2016 -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. @deniswsrosa 2016 Containers foram projetados para serem stateless -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. @deniswsrosa Avançando para 2020… -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. 6 2020 -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. @deniswsrosa O que mudou? -
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 -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. 9 Deployment Padrão -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume MYSQL DEPLOYMENT -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. @deniswsrosa K8S Worker1 MySQL Volume CENÁRIOS DE FALHA -
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 -
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 -
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 -
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 -
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 ? -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. @deniswsrosa Parece que algo está faltando… -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. 18 K8S Custom Resource Definitions (CRDs) -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. 19 CRDs + K8s Operators -
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/ -
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) -
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 -
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 -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. DEMO – VAMOS BRINCAR COM UM BD NO KUBERNETES -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. 25 Outras Possibilidades Backup Automático XDCR Prometheus -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. 26 DBaaS -
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 -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. 28 Local vs Remote Persistent Storage -
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 -
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 -
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/ -
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/ -
Confidential and Proprietary. Do not distribute without Couchbase consent. ©
Couchbase 2017. All rights reserved. 33 Outros Operators @deniswsrosa -
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