SlideShare a Scribd company logo
Democratizing MySQL:
Cloud Managed
to Kubernetes Managed
KubeCon 2019
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Sachin Manpathak
Technical Lead @Platform9
Flavius Mecea
Project Lead @Presslabs
Case study
Migrate from Cloud
Managed SQL to K8S
managed
The story of building
Presslabs Operator for
MySQL
00. Who we are
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Context
Needs
Solution
Challenges
Future plans
01.
02.
03.
04.
05.
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Context01.
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
WordPress
development
agency
Managed
WordPress
hosting
Record: 2,2 BN
pageviews in a
month
Top tier in
Enterprise
hosting
Open-Source
Stack
2007 2011 2013 2015 2018
Who is Presslabs01.1
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Democratizing WordPress
hosting infrastructure
Presslabs mission01.2
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Presslabs objectives01.3
MySQL Operator for
WordPress hosting
Open infrastructure
using Kubernetes to run
and operate WordPress
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
➔ Runs everywhere
➔ Open-source
➔ We had experience with containers
before they were cool
➔ Our core services already run on
Kubernetes since version 1.7
➔ Support for a lot of integrations
Why Kubernetes?01.4
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Needs02.
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Ease of
operations
Needs02.
1 2 3 4 5
Elasticity Service
availability
Data safety Observable
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Solution03.
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Existing solutions03.1
↑ Increased Costs
✓ Oracle MySQL Operator
✓ Percona XtraDB Operator
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
✓ Self-healing clusters
✓ Highly available reads
✓ Virtually highly available writes
✓ Replication lag detection and mitigation
✓ Resource abuse control
✓ Automated backups and restores
MySQL Operator03.2
A Kubernetes Operator for managing MySQL Clusters with
asynchronous or semi-synchronous replication:
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
➔ Control plane
◆ Operator
◆ Orchestrator
➔ Data plane
◆ MySQL deployment
➔ Monitoring
◆ Prometheus
Architecture overview03.3
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
➔ Statefulset
➔ Persistent volumes
➔ Services
◆ Master
◆ Healthy nodes
MySQL Cluster03.4
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
➔ Init:
◆ MySQL configuration
➔ Main:
◆ Percona Server for MySQL
➔ Sidecar:
◆ Lag Detection and Monitoring
◆ Resource abuse control
◆ Backups and Initializations
MySQL Node03.5
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Challenges04.
Orchestrator
integration
1 2 3 4
PVC clean-up Operator
upgrade/
deploy
MySQL Upgrade
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
➔ Orchestrator is a MySQL high
availability and replication
management tool
➔ State reconciliation between
Orchestrator and Kubernetes
Orchestrator integration04.1
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
➔ MySQL nodes keeps data into
Persistent Volumes
➔ Scale down does not delete PVCs
➔ Scale up may be an issue because
of obsolete data
➔ Delete PVC at scale down
➔ Special case for Node 0
PVC clean-up04.2
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
➔ Helm the standard for packaging apps in Kubernetes
➔ CRD management is painful
➔ No CRD validation
Operator upgrades / deployment04.3
helm.sh/crd-install
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
➔ Default policy:
MySQL Upgrade04.4
Rolling Updates
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
MySQL Upgrade04.4
Rolling Updates
➔ Default policy:
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
MySQL Upgrade04.4
➔ Default policy:
➔ Not gentle for MySQL
➔ Master should be the last one standing
Rolling Updates
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
MySQL Upgrade
✘ Pod finalizer
✘ Container lifecycle hooks
04.4
➔ Default policy:
➔ Not gentle for MySQL
➔ Master should be the last one standing
➔ Recommended policy:
Rolling Updates
On Delete
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Current status05.
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
➔ Integration with Google Cloud Marketplace,
OperatorHub.io, AWS Marketplace
➔ CRD validation and webhooks
➔ Multiple backup policies
➔ Proxy SQL integration
Future Plans05.1
Democratizing MySQL: Cloud Managed to K8S Managed @presslabs
Community
Contributors
Project status05.2
github.com/presslabs/mysql-operator
#mysql-operator
https://kubernetes.slack.com/
Presslabs HeurekaPlatform 9 KinvolkAgri Terra
Democratizing MySQL:
Cloud Managed
to Kubernetes Managed
KubeCon 2019
Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys
Who we are
Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys
● Customer base growth == Substantial increase in public cloud
costs
● At ~300 cloud regions, just RDS bill amounted to 10s of
thousands
Problem of Scale
Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys
Infra evolution
2014-2016 2017-2018 2019-2020
AWS for compute
+ RDS
Private cloud for
compute + RDS
Private cloud for
compute + DB
Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys
● Automation set up to use of public self service API
● Reliance on RDS snapshots, performance charts and alerting
● No MySQL expertise
● Required Comparable performance
● Needed drop-in replacement for MySQL to minimize impact
Hurdles to DBaaS
Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys
Requirement Mysql-Operator Featureset
Simple, self service, open API K8s CRD implementation
Drop in replacement: MySQL Percona: 100% compatible
Automated backups, API driven recovery Scheduled Backups to S3
High Availability & Failover
Replica support with automated failover with
Orchestrator
Open Source Yes
Built-in monitoring Yes: Prometheus metrics
Searching for DBaaS
Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys
On-prem Architecture
Openstack Cloud
AZ1 AZ2 AZ3
Storage
K8s-Master1 K8s-Master2 K8s-Master3
Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys
The Rollout
Current State
● ~10 accounts using MySQL managed on K8s by the operator
● 3 managed multi-master K8s clusters: Dev, Stage and Prod
● Automated failover with 3-AZ deployment
Plan:
● 100% deployments managed with MySQL operator
● Standardize on Operator Paradigm: Prometheus Monitoring, Log collection, etc.
Thank You!

More Related Content

What's hot

Operating Kubernetes at Scale (Australia Presentation)
Operating Kubernetes at Scale (Australia Presentation)Operating Kubernetes at Scale (Australia Presentation)
Operating Kubernetes at Scale (Australia Presentation)
Mesosphere Inc.
 
DevOps in Age of Kubernetes
DevOps in Age of KubernetesDevOps in Age of Kubernetes
DevOps in Age of Kubernetes
Mesosphere Inc.
 
ManageIQ Overview at Management and Orchestration Developer (MODM) Meet-up
ManageIQ Overview at Management and Orchestration Developer (MODM) Meet-upManageIQ Overview at Management and Orchestration Developer (MODM) Meet-up
ManageIQ Overview at Management and Orchestration Developer (MODM) Meet-up
Jerome Marc
 
Java EE Modernization with Mesosphere DCOS
Java EE Modernization with Mesosphere DCOSJava EE Modernization with Mesosphere DCOS
Java EE Modernization with Mesosphere DCOS
Mesosphere Inc.
 
A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...
A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...
A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...
HostedbyConfluent
 
Microservice Plumbing - Glynn Bird - Codemotion Rome 2017
Microservice Plumbing  - Glynn Bird - Codemotion Rome 2017Microservice Plumbing  - Glynn Bird - Codemotion Rome 2017
Microservice Plumbing - Glynn Bird - Codemotion Rome 2017
Codemotion
 
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
HostedbyConfluent
 
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
Mesosphere Inc.
 
Dok Talks #111 - Scheduled Scaling with Dask and Argo Workflows
Dok Talks #111 - Scheduled Scaling with Dask and Argo WorkflowsDok Talks #111 - Scheduled Scaling with Dask and Argo Workflows
Dok Talks #111 - Scheduled Scaling with Dask and Argo Workflows
DoKC
 
Experts Live CH Bern Docker & Kubernetes
Experts Live CH Bern Docker & KubernetesExperts Live CH Bern Docker & Kubernetes
Experts Live CH Bern Docker & Kubernetes
Brian Christner
 
Navigating the obdervability storm with Kafka | Jose Manuel Cristobal, Adidas
Navigating the obdervability storm with Kafka | Jose Manuel Cristobal, AdidasNavigating the obdervability storm with Kafka | Jose Manuel Cristobal, Adidas
Navigating the obdervability storm with Kafka | Jose Manuel Cristobal, Adidas
HostedbyConfluent
 
Complex Analytics with NoSQL Data Store in Real Time
Complex Analytics with NoSQL Data Store in Real TimeComplex Analytics with NoSQL Data Store in Real Time
Complex Analytics with NoSQL Data Store in Real Time
Nati Shalom
 
Episode 1: Building Kubernetes-as-a-Service
Episode 1: Building Kubernetes-as-a-ServiceEpisode 1: Building Kubernetes-as-a-Service
Episode 1: Building Kubernetes-as-a-Service
Mesosphere Inc.
 
An Introduction to Confluent Cloud: Apache Kafka as a Service
An Introduction to Confluent Cloud: Apache Kafka as a ServiceAn Introduction to Confluent Cloud: Apache Kafka as a Service
An Introduction to Confluent Cloud: Apache Kafka as a Service
confluent
 
Storage os kubernetes clusters need persistent data
Storage os   kubernetes clusters need persistent dataStorage os   kubernetes clusters need persistent data
Storage os kubernetes clusters need persistent data
LibbySchulze
 
The Future of Enterprise Applications is Serverless
The Future of Enterprise Applications is ServerlessThe Future of Enterprise Applications is Serverless
The Future of Enterprise Applications is Serverless
Eficode
 
Live Event Debugging With ksqlDB at Reddit | Hannah Hagen and Paul Kiernan, R...
Live Event Debugging With ksqlDB at Reddit | Hannah Hagen and Paul Kiernan, R...Live Event Debugging With ksqlDB at Reddit | Hannah Hagen and Paul Kiernan, R...
Live Event Debugging With ksqlDB at Reddit | Hannah Hagen and Paul Kiernan, R...
HostedbyConfluent
 
Leader in Cloud and Object Storage for Service Providers
Leader in Cloud and Object Storage for Service ProvidersLeader in Cloud and Object Storage for Service Providers
Leader in Cloud and Object Storage for Service Providers
Scality
 
Don't Cross the Streams! (or do, we got you)
Don't Cross the Streams! (or do, we got you)Don't Cross the Streams! (or do, we got you)
Don't Cross the Streams! (or do, we got you)
Caito Scherr
 
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, QlikKeeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
HostedbyConfluent
 

What's hot (20)

Operating Kubernetes at Scale (Australia Presentation)
Operating Kubernetes at Scale (Australia Presentation)Operating Kubernetes at Scale (Australia Presentation)
Operating Kubernetes at Scale (Australia Presentation)
 
DevOps in Age of Kubernetes
DevOps in Age of KubernetesDevOps in Age of Kubernetes
DevOps in Age of Kubernetes
 
ManageIQ Overview at Management and Orchestration Developer (MODM) Meet-up
ManageIQ Overview at Management and Orchestration Developer (MODM) Meet-upManageIQ Overview at Management and Orchestration Developer (MODM) Meet-up
ManageIQ Overview at Management and Orchestration Developer (MODM) Meet-up
 
Java EE Modernization with Mesosphere DCOS
Java EE Modernization with Mesosphere DCOSJava EE Modernization with Mesosphere DCOS
Java EE Modernization with Mesosphere DCOS
 
A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...
A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...
A Look into the Mirror: Patterns and Best Practices for MirrorMaker2 | Cliff ...
 
Microservice Plumbing - Glynn Bird - Codemotion Rome 2017
Microservice Plumbing  - Glynn Bird - Codemotion Rome 2017Microservice Plumbing  - Glynn Bird - Codemotion Rome 2017
Microservice Plumbing - Glynn Bird - Codemotion Rome 2017
 
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
 
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
 
Dok Talks #111 - Scheduled Scaling with Dask and Argo Workflows
Dok Talks #111 - Scheduled Scaling with Dask and Argo WorkflowsDok Talks #111 - Scheduled Scaling with Dask and Argo Workflows
Dok Talks #111 - Scheduled Scaling with Dask and Argo Workflows
 
Experts Live CH Bern Docker & Kubernetes
Experts Live CH Bern Docker & KubernetesExperts Live CH Bern Docker & Kubernetes
Experts Live CH Bern Docker & Kubernetes
 
Navigating the obdervability storm with Kafka | Jose Manuel Cristobal, Adidas
Navigating the obdervability storm with Kafka | Jose Manuel Cristobal, AdidasNavigating the obdervability storm with Kafka | Jose Manuel Cristobal, Adidas
Navigating the obdervability storm with Kafka | Jose Manuel Cristobal, Adidas
 
Complex Analytics with NoSQL Data Store in Real Time
Complex Analytics with NoSQL Data Store in Real TimeComplex Analytics with NoSQL Data Store in Real Time
Complex Analytics with NoSQL Data Store in Real Time
 
Episode 1: Building Kubernetes-as-a-Service
Episode 1: Building Kubernetes-as-a-ServiceEpisode 1: Building Kubernetes-as-a-Service
Episode 1: Building Kubernetes-as-a-Service
 
An Introduction to Confluent Cloud: Apache Kafka as a Service
An Introduction to Confluent Cloud: Apache Kafka as a ServiceAn Introduction to Confluent Cloud: Apache Kafka as a Service
An Introduction to Confluent Cloud: Apache Kafka as a Service
 
Storage os kubernetes clusters need persistent data
Storage os   kubernetes clusters need persistent dataStorage os   kubernetes clusters need persistent data
Storage os kubernetes clusters need persistent data
 
The Future of Enterprise Applications is Serverless
The Future of Enterprise Applications is ServerlessThe Future of Enterprise Applications is Serverless
The Future of Enterprise Applications is Serverless
 
Live Event Debugging With ksqlDB at Reddit | Hannah Hagen and Paul Kiernan, R...
Live Event Debugging With ksqlDB at Reddit | Hannah Hagen and Paul Kiernan, R...Live Event Debugging With ksqlDB at Reddit | Hannah Hagen and Paul Kiernan, R...
Live Event Debugging With ksqlDB at Reddit | Hannah Hagen and Paul Kiernan, R...
 
Leader in Cloud and Object Storage for Service Providers
Leader in Cloud and Object Storage for Service ProvidersLeader in Cloud and Object Storage for Service Providers
Leader in Cloud and Object Storage for Service Providers
 
Don't Cross the Streams! (or do, we got you)
Don't Cross the Streams! (or do, we got you)Don't Cross the Streams! (or do, we got you)
Don't Cross the Streams! (or do, we got you)
 
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, QlikKeeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
 

Similar to Kubecon - Democratizing my sql_ cloud managed to k8s managed (1)

Kubera Launch Webinar: Kubernetes native management of Kubernetes native data
Kubera Launch Webinar: Kubernetes native management of Kubernetes native dataKubera Launch Webinar: Kubernetes native management of Kubernetes native data
Kubera Launch Webinar: Kubernetes native management of Kubernetes native data
MayaData Inc
 
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSCloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
EDB
 
Containerized Storage for Containers
Containerized Storage for ContainersContainerized Storage for Containers
Containerized Storage for Containers
Murat Karslioglu
 
Containerized Storage for Containers
Containerized Storage for ContainersContainerized Storage for Containers
Containerized Storage for Containers
OpenEBS
 
Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018
OpenEBS
 
Multi-Cloud Orchestration for Kubernetes with Cloudify
Multi-Cloud Orchestration for Kubernetes with CloudifyMulti-Cloud Orchestration for Kubernetes with Cloudify
Multi-Cloud Orchestration for Kubernetes with Cloudify
Cloudify Community
 
Keeping Your Cloud Workloads Protected
Keeping Your Cloud Workloads ProtectedKeeping Your Cloud Workloads Protected
Keeping Your Cloud Workloads Protected
Veritas Technologies LLC
 
Pivotal Container Service : la nuova soluzione per gestire Kubernetes in azienda
Pivotal Container Service : la nuova soluzione per gestire Kubernetes in aziendaPivotal Container Service : la nuova soluzione per gestire Kubernetes in azienda
Pivotal Container Service : la nuova soluzione per gestire Kubernetes in azienda
VMware Tanzu
 
Containers and Kubernetes
Containers and KubernetesContainers and Kubernetes
Containers and Kubernetes
Altoros
 
One And Done Multi-Cloud Load Balancing Done Right.pptx
One And Done Multi-Cloud Load Balancing Done Right.pptxOne And Done Multi-Cloud Load Balancing Done Right.pptx
One And Done Multi-Cloud Load Balancing Done Right.pptx
Avi Networks
 
Key Database Criteria for Cloud Applications
Key Database Criteria for Cloud ApplicationsKey Database Criteria for Cloud Applications
Key Database Criteria for Cloud Applications
NuoDB
 
Cloud Native & Docker
Cloud Native & DockerCloud Native & Docker
Cloud Native & Docker
Brian Christner
 
How MariaDB is approaching DBaaS
How MariaDB is approaching DBaaSHow MariaDB is approaching DBaaS
How MariaDB is approaching DBaaS
MariaDB plc
 
Driving Digital Transformation With Containers And Kubernetes Complete Deck
Driving Digital Transformation With Containers And Kubernetes Complete DeckDriving Digital Transformation With Containers And Kubernetes Complete Deck
Driving Digital Transformation With Containers And Kubernetes Complete Deck
SlideTeam
 
Room 2 - 6 - Đinh Tuấn Phong - Migrate opensource database to Kubernetes easi...
Room 2 - 6 - Đinh Tuấn Phong - Migrate opensource database to Kubernetes easi...Room 2 - 6 - Đinh Tuấn Phong - Migrate opensource database to Kubernetes easi...
Room 2 - 6 - Đinh Tuấn Phong - Migrate opensource database to Kubernetes easi...
Vietnam Open Infrastructure User Group
 
Automating MySQL Deployments on Kubernetes
Automating MySQL Deployments on KubernetesAutomating MySQL Deployments on Kubernetes
Automating MySQL Deployments on Kubernetes
Presslabs
 
Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ...
 Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ... Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ...
Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ...
MayaData Inc
 
Webinar: Data Protection for Kubernetes
Webinar: Data Protection for KubernetesWebinar: Data Protection for Kubernetes
Webinar: Data Protection for Kubernetes
MayaData Inc
 
A deep dive into running data analytic workloads in the cloud
A deep dive into running data analytic workloads in the cloudA deep dive into running data analytic workloads in the cloud
A deep dive into running data analytic workloads in the cloud
Cloudera, Inc.
 
PartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC SolutionPartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC Solution
Timothy Spann
 

Similar to Kubecon - Democratizing my sql_ cloud managed to k8s managed (1) (20)

Kubera Launch Webinar: Kubernetes native management of Kubernetes native data
Kubera Launch Webinar: Kubernetes native management of Kubernetes native dataKubera Launch Webinar: Kubernetes native management of Kubernetes native data
Kubera Launch Webinar: Kubernetes native management of Kubernetes native data
 
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSCloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
 
Containerized Storage for Containers
Containerized Storage for ContainersContainerized Storage for Containers
Containerized Storage for Containers
 
Containerized Storage for Containers
Containerized Storage for ContainersContainerized Storage for Containers
Containerized Storage for Containers
 
Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018
 
Multi-Cloud Orchestration for Kubernetes with Cloudify
Multi-Cloud Orchestration for Kubernetes with CloudifyMulti-Cloud Orchestration for Kubernetes with Cloudify
Multi-Cloud Orchestration for Kubernetes with Cloudify
 
Keeping Your Cloud Workloads Protected
Keeping Your Cloud Workloads ProtectedKeeping Your Cloud Workloads Protected
Keeping Your Cloud Workloads Protected
 
Pivotal Container Service : la nuova soluzione per gestire Kubernetes in azienda
Pivotal Container Service : la nuova soluzione per gestire Kubernetes in aziendaPivotal Container Service : la nuova soluzione per gestire Kubernetes in azienda
Pivotal Container Service : la nuova soluzione per gestire Kubernetes in azienda
 
Containers and Kubernetes
Containers and KubernetesContainers and Kubernetes
Containers and Kubernetes
 
One And Done Multi-Cloud Load Balancing Done Right.pptx
One And Done Multi-Cloud Load Balancing Done Right.pptxOne And Done Multi-Cloud Load Balancing Done Right.pptx
One And Done Multi-Cloud Load Balancing Done Right.pptx
 
Key Database Criteria for Cloud Applications
Key Database Criteria for Cloud ApplicationsKey Database Criteria for Cloud Applications
Key Database Criteria for Cloud Applications
 
Cloud Native & Docker
Cloud Native & DockerCloud Native & Docker
Cloud Native & Docker
 
How MariaDB is approaching DBaaS
How MariaDB is approaching DBaaSHow MariaDB is approaching DBaaS
How MariaDB is approaching DBaaS
 
Driving Digital Transformation With Containers And Kubernetes Complete Deck
Driving Digital Transformation With Containers And Kubernetes Complete DeckDriving Digital Transformation With Containers And Kubernetes Complete Deck
Driving Digital Transformation With Containers And Kubernetes Complete Deck
 
Room 2 - 6 - Đinh Tuấn Phong - Migrate opensource database to Kubernetes easi...
Room 2 - 6 - Đinh Tuấn Phong - Migrate opensource database to Kubernetes easi...Room 2 - 6 - Đinh Tuấn Phong - Migrate opensource database to Kubernetes easi...
Room 2 - 6 - Đinh Tuấn Phong - Migrate opensource database to Kubernetes easi...
 
Automating MySQL Deployments on Kubernetes
Automating MySQL Deployments on KubernetesAutomating MySQL Deployments on Kubernetes
Automating MySQL Deployments on Kubernetes
 
Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ...
 Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ... Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ...
Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ...
 
Webinar: Data Protection for Kubernetes
Webinar: Data Protection for KubernetesWebinar: Data Protection for Kubernetes
Webinar: Data Protection for Kubernetes
 
A deep dive into running data analytic workloads in the cloud
A deep dive into running data analytic workloads in the cloudA deep dive into running data analytic workloads in the cloud
A deep dive into running data analytic workloads in the cloud
 
PartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC SolutionPartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC Solution
 

Recently uploaded

Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 

Recently uploaded (20)

Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 

Kubecon - Democratizing my sql_ cloud managed to k8s managed (1)

  • 1. Democratizing MySQL: Cloud Managed to Kubernetes Managed KubeCon 2019
  • 2. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Sachin Manpathak Technical Lead @Platform9 Flavius Mecea Project Lead @Presslabs Case study Migrate from Cloud Managed SQL to K8S managed The story of building Presslabs Operator for MySQL 00. Who we are
  • 3. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Context Needs Solution Challenges Future plans 01. 02. 03. 04. 05.
  • 4. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Context01.
  • 5. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs WordPress development agency Managed WordPress hosting Record: 2,2 BN pageviews in a month Top tier in Enterprise hosting Open-Source Stack 2007 2011 2013 2015 2018 Who is Presslabs01.1
  • 6. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Democratizing WordPress hosting infrastructure Presslabs mission01.2
  • 7. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Presslabs objectives01.3 MySQL Operator for WordPress hosting Open infrastructure using Kubernetes to run and operate WordPress
  • 8. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs ➔ Runs everywhere ➔ Open-source ➔ We had experience with containers before they were cool ➔ Our core services already run on Kubernetes since version 1.7 ➔ Support for a lot of integrations Why Kubernetes?01.4
  • 9. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Needs02.
  • 10. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Ease of operations Needs02. 1 2 3 4 5 Elasticity Service availability Data safety Observable
  • 11. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Solution03.
  • 12. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Existing solutions03.1 ↑ Increased Costs ✓ Oracle MySQL Operator ✓ Percona XtraDB Operator
  • 13. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs ✓ Self-healing clusters ✓ Highly available reads ✓ Virtually highly available writes ✓ Replication lag detection and mitigation ✓ Resource abuse control ✓ Automated backups and restores MySQL Operator03.2 A Kubernetes Operator for managing MySQL Clusters with asynchronous or semi-synchronous replication:
  • 14. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs ➔ Control plane ◆ Operator ◆ Orchestrator ➔ Data plane ◆ MySQL deployment ➔ Monitoring ◆ Prometheus Architecture overview03.3
  • 15. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs ➔ Statefulset ➔ Persistent volumes ➔ Services ◆ Master ◆ Healthy nodes MySQL Cluster03.4
  • 16. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs ➔ Init: ◆ MySQL configuration ➔ Main: ◆ Percona Server for MySQL ➔ Sidecar: ◆ Lag Detection and Monitoring ◆ Resource abuse control ◆ Backups and Initializations MySQL Node03.5
  • 17. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Challenges04. Orchestrator integration 1 2 3 4 PVC clean-up Operator upgrade/ deploy MySQL Upgrade
  • 18. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs ➔ Orchestrator is a MySQL high availability and replication management tool ➔ State reconciliation between Orchestrator and Kubernetes Orchestrator integration04.1
  • 19. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs ➔ MySQL nodes keeps data into Persistent Volumes ➔ Scale down does not delete PVCs ➔ Scale up may be an issue because of obsolete data ➔ Delete PVC at scale down ➔ Special case for Node 0 PVC clean-up04.2
  • 20. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs ➔ Helm the standard for packaging apps in Kubernetes ➔ CRD management is painful ➔ No CRD validation Operator upgrades / deployment04.3 helm.sh/crd-install
  • 21. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs ➔ Default policy: MySQL Upgrade04.4 Rolling Updates
  • 22. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs MySQL Upgrade04.4 Rolling Updates ➔ Default policy:
  • 23. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs MySQL Upgrade04.4 ➔ Default policy: ➔ Not gentle for MySQL ➔ Master should be the last one standing Rolling Updates
  • 24. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs MySQL Upgrade ✘ Pod finalizer ✘ Container lifecycle hooks 04.4 ➔ Default policy: ➔ Not gentle for MySQL ➔ Master should be the last one standing ➔ Recommended policy: Rolling Updates On Delete
  • 25. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Current status05.
  • 26. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs ➔ Integration with Google Cloud Marketplace, OperatorHub.io, AWS Marketplace ➔ CRD validation and webhooks ➔ Multiple backup policies ➔ Proxy SQL integration Future Plans05.1
  • 27. Democratizing MySQL: Cloud Managed to K8S Managed @presslabs Community Contributors Project status05.2 github.com/presslabs/mysql-operator #mysql-operator https://kubernetes.slack.com/ Presslabs HeurekaPlatform 9 KinvolkAgri Terra
  • 28. Democratizing MySQL: Cloud Managed to Kubernetes Managed KubeCon 2019
  • 29. Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys Who we are
  • 30. Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys ● Customer base growth == Substantial increase in public cloud costs ● At ~300 cloud regions, just RDS bill amounted to 10s of thousands Problem of Scale
  • 31. Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys Infra evolution 2014-2016 2017-2018 2019-2020 AWS for compute + RDS Private cloud for compute + RDS Private cloud for compute + DB
  • 32. Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys ● Automation set up to use of public self service API ● Reliance on RDS snapshots, performance charts and alerting ● No MySQL expertise ● Required Comparable performance ● Needed drop-in replacement for MySQL to minimize impact Hurdles to DBaaS
  • 33. Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys Requirement Mysql-Operator Featureset Simple, self service, open API K8s CRD implementation Drop in replacement: MySQL Percona: 100% compatible Automated backups, API driven recovery Scheduled Backups to S3 High Availability & Failover Replica support with automated failover with Orchestrator Open Source Yes Built-in monitoring Yes: Prometheus metrics Searching for DBaaS
  • 34. Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys On-prem Architecture Openstack Cloud AZ1 AZ2 AZ3 Storage K8s-Master1 K8s-Master2 K8s-Master3
  • 35. Democratizing MySQL: Cloud Managed to K8S Managed @Platform9Sys The Rollout Current State ● ~10 accounts using MySQL managed on K8s by the operator ● 3 managed multi-master K8s clusters: Dev, Stage and Prod ● Automated failover with 3-AZ deployment Plan: ● 100% deployments managed with MySQL operator ● Standardize on Operator Paradigm: Prometheus Monitoring, Log collection, etc.

Editor's Notes

  1. Hello everyone, I’m happy to be here with you. Thank you for joining our session on Democratizing MySQL Cloud Managed to K8S Managed.
  2. My name is Flavius Mecea and I will talk about... This is a joint session with Platform 9’s Sachin Manpathak. Unfortunately he is not present today here, because some visa issues. But he prepared a video for you and his colleague, Daniel, is here to answer your questions. He will talk about a case study on migrating from cloud managed to k8s managed Sa-chin Man-Pa-tak
  3. First of all, I want to start by presenting the MSQL operator, I will go through this 5 main topics: Context in which the operator was born The needs that we had in mind when we first started building With what needs we started in mind What we have achieved, the operator overview Also, some challenges that we encountered during development And the project status and future plans
  4. First, let me introduce the company that I work for, Presslabs and the context in which the operator was born.
  5. We are a managed WordPress hosting company, doing business for more than 10 years We started as a WP dev agency, then we pivoted towards the hosting business. After serving both publishers and Enterprise clients for several years, we came to realize that all the companies (including us) in the global top Enterprise tier were doing the same thing. That’s when we started thinking about the Stack; an open-source infrastructure that could become the standard in WP hosting.
  6. It’s not just about the stack. It’s our commitment to our mission to democratize WP hosting infrastructure, to share our accumulated knowledge.
  7. As part of our mission, we have 2 key objectives: We are currently building an open infrastructure using Kubernetes to run and operate WordPress, named: Presslabs Stack The other one is building the MySQL Operator; Because half of WordPress hosting is about MySQL
  8. Runs everywhere (dev’s laptop, public clouds, private data centers) Open-source We had experience with containers before they were cool Our core services already run on K8s since version 1.7 It already offers support for a lot of integrations: cert manager, nginx(Ingress), Prometheus(monitoring)
  9. As part of the Stack we needed a way to automate certain operations such as: deploying, scaling, maintaining and backing-up MySQL
  10. For that: We’ve identified some key requirements (for the infrastructure), to focus on: First we wanted something that is easy to operate, that doesn’t get in our way Second, we needed an elastic service, to help us scale with the demand. You all know that in hosting, service-uptime is paramount, so we had(have) to maximize the availability of our service Also, no one wants to lose data, especially when it comes to someone else’s data And in order to reliably operate the service(system) we need a method to observe what’s happening from top, down to the request level.
  11. With this in mind we checked some of the available solutions and concluded that they were not suitable for us.
  12. For example, both Oracle and Percona operators perform group replication — (which implies that ) they required more nodes to operate(at least 3), (which is not suitable for us because) it increases costs. As great engineers do, we’ve ended up building a solution ourselves.
  13. In the past 10 year, we’ve identified several must-have features, which have been integrated into the Operator,(to fulfill our basic needs) such as: Self-healing clusters - (w/o this feature the operator doesn’t make sense) - the operator has to continuously reconcile and solve replication issues Highly available reads - when more nodes are available Virtually highly available writes - that provides us minimum downtime due to fast failovers Replication lag detection and mitigation - takes lagging nodes out of rotation when lag is above a set threshold or in case of unhealthy nodes Resource abuse control - (which is useful) to limit noisy queries (that may slow down the cluster) Automated backups and restores - this one speaks for itself. All of these features have proven to be very helpful compared with our old setup.
  14. Now let’s move on to the practical aspects of building the operator. In this figure is presented the entire system overview. The architecture is split into 3 main parts: control plane, data plane and monitoring The control plane consists of the operator and its components, which are deployed using helm, usually in a dedicated namespace. Here we have: The controller itself The Orchestrator, a MySQL high availability and replication management tool (I will come back to it later) The data plane represents a MySQL deployment, made of basic k8s resources (like pods, services, etc) which can be spread across multiple namespaces. And last but not least we have monitoring which is performed by Prometheus, the standard k8s monitoring system.
  15. Going deeper into the dataplane, we can see that the MySQL cluster has multiple components: Statefulset - that represents the main resource, which provisions the pods and the PVs for each MySQL node. Also there are 2 services for each cluster: Master service - that always points to the master MySQL node Healthy nodes service - that points to all the pods that are considered healthy by the operator The selections are made based on K8S labels, which are set by the operator based on information gathered from Orchestrator Your application will interact with those two services for writes and for reads (and it’s the application’s responsibility to split them, by using app specific logic or by using some dedicated software like proxySQL)
  16. Internally, a node consists of several components: Init containers: for MySQL initialization and configuration A main container: which is the Percona Server for MySQL. We chose Percona because it’s battle tested in enterprise environments and a MySQL drop-in replacement. Sidecar containers: Some of them are based on Percona toolkit which are responsible for several actions: lag detection, MySQL monitoring and resource limit policy enforcement There is an extra container that provides an endpoint for node initialization or for backups.
  17. I want to mention some specific challenges we’ve had during the implementation of this operator such as: Orchestrator integration - how do we integrate Orchestrator, a third-party tool, so we don’t have to reinvent the wheel? PV clean-up -we have to manage PVs ourselves because the way K8S manages PVs is not suitable for MySQL (later we’ll see why) Operators upgrades - which is a common problem for operators because helm provides very modest CRDs support MySQL Upgrades - this is a specific problem, because usually it’s done by humans and it’s difficult to automate # is a difficult operation especially when it comes to k8s Let me start by presenting the Orchestrator integration.
  18. Orchestrator is a subcomponent of the entire operator and it’s the tool that handles MySQL topology and failovers ... but it’s not meant to be stateless, as operators usually are. K8s keeps a state, also Orchestrator keeps a state - the operator doesn’t know which one to listen to. ...I’m talking about an information flow conflict. To fix this, we chose to implement a reconciliation loop between Orchestrator and K8S which, at every few seconds reconciles the state between the 2. On one hand, the Orchestrator is responsible for updating replication topology(in emergency situations) and to observe the current status of the MySQL cluster. On the other hand, the Operator reconciles the desire replication topology into Orchestrator and provides service discovery. Even if the Orchestrator data is lost, the operator is able to restore all the data to Orchestrator. As a conclusion, the operator (has to) take decisions based only on the information found in k8s which is up-to-date, thanks to the reconciliation loop.
  19. Another challenge was how k8s manages PVs. The MySQL data is being stored in PVs, managed by the statefulset. But this implies that, when a cluster is scaled down, the volume is not deleted, so after a while the data might become obsolete, and when the statefulset is scaled up again the replication can fail. To fix this, we’ve implemented a cleaner that deletes the PVC when the cluster is scaled down, except for node 0 which is special case and the data should be kept as long as the cluster exists, to avoid losing cluster data.
  20. A common problem in the world of operators is CRD management. Currently the defacto standard for packaging application is Helm. If you are a helm user you probably know that CRD management is still very painful, because Helm does not provides an upgrade path for CRDs. What is more MySQL Operator is still in development and CRDs specifications are still subject to change. This made us to install CRDs without validation, to minimize user intervention at upgrades. However we hope that this is a temporary solution until Helm improves its support for managing CRDs.
  21. A specific challenge for this operator is how MySQL upgrades are performed. K8S already provides some upgrade policies, like: Rolling updates (update policy)- which is not exactly gentle with MySQL, as it can choose to upgrade the master first, which forces a failover to the replica. Then, when the replica is updated will triggers another failover, which is unnecessary and can be avoided if the master is the last one to be updated. That’s why the master should be the last one standing to avoid failover flip-flop, or downtime A contributor came up with an idea to use: On Delete policy, which fits better our needs because the operator can choose which pod to update. Therefore we can control the order in which the pods are upgraded. We tried to use other techniques, as well, like pod finalizers, to block pod deletion until the failover is done. But we hit a dead end because we misunderstood how k8s finalizers work. Using containers lifecycle hooks to trigger a failover was proven to be too complicated So we chose to implement ‘On Delete’ policy which is still work in progress
  22. A specific challenge for this operator is how MySQL upgrades are performed. K8S already provides some upgrade policies, like: Rolling updates (update policy)- which is not exactly gentle with MySQL, as it can choose to upgrade the master first, which forces a failover to the replica. Then, when the replica is updated will triggers another failover, which is unnecessary. That’s why the master should be the last one standing to avoid failover flip-flop, or downtime A contributor came up with an idea to use: On Delete policy, which fits better our needs because the operator can choose which pod to update. Therefore we can control the order in which the pods are upgraded. We tried to use other techniques, as well, like pod finalizers, to block pod deletion until the failover is done. But we hit a dead end because we misunderstood how k8s finalizers work. Using containers lifecycle hooks to trigger a failover was proven to be too complicated So we chose to implement ‘On Delete’ policy which is still work in progress
  23. A specific challenge for this operator is how MySQL upgrades are performed. K8S already provides some upgrade policies, like: Rolling updates (update policy)- which is not exactly gentle with MySQL, as it can choose to upgrade the master first, which forces a failover to the replica. Then, when the replica is updated will triggers another failover, which is unnecessary. ...and can be avoided if the master is the last one that is updated. A contributor came up with an idea to use: On Delete policy, which fits better our needs because the operator can choose which pod to update. Therefore we can control the order in which the pods are upgraded. We tried to use other techniques, as well, like pod finalizers, to block pod deletion until the failover is done. But we hit a dead end because we misunderstood how k8s finalizers work. Using containers lifecycle hooks to trigger a failover was proven to be too complicated So we chose to implement ‘On Delete’ policy which is still work in progress
  24. A specific challenge for this operator is how MySQL upgrades are performed. K8S already provides some upgrade policies, like: Rolling updates (update policy)- which is not exactly gentle with MySQL, as it can choose to upgrade the master first, which forces a failover to the replica. Then, when the replica is updated will triggers another failover, which is unnecessary. That’s why the master should be the last one standing to avoid failover flip-flop, or downtime A contributor came up with an idea to use: On Delete policy, which fits better our needs because the operator can choose which pod to update. Therefore we can control the order in which the pods are upgraded. We tried to use other techniques, as well, like pod finalizers, to block pod deletion until the failover is done. But we hit a dead end because we misunderstood how k8s finalizers work. Using containers lifecycle hooks to trigger a failover was proven to be too complicated So we chose to implement ‘On Delete’ policy which is still work in progress
  25. Now, I want to share with you the current status of the project and future plans.
  26. Integration with Marketplaces - like Google Cloud Marketplace, OperatorHub, AWS Marketplace - to make easier for end users to install it We would like to finish what we’ve started, so we would add CRD validation and webhooks Multiple backup policies - for granular control over backups To make it easy for your application to connect to the cluster we want to integrate ProxySQL, instead of using, that 2 services, the app can connect only to ProxySQL, which will do the routing for you.
  27. The Operator is still in alpha version and we’re really close to beta. We have a good feedback from the community, and some major platforms actively use and contribute to the Operator. I would like to invite you to visit the project page on Github and for any question to join the #mysql-operator slack channel. Coming up next, my co-presenter Daniel will continue with second part of the presentation. Let’s encourage him with a round of applause, thank you for your time.
  28. Customer base growth == Substantial increase in public cloud costs At ~300 cloud regions, just RDS bill amounted to 10s of thousands
  29. Prototype: MySQL as backend on managed on-prem Kubernetes & storage Lessons: Multi-master kubernetes is essential Storage story is still developing (as of v1.10), better (as of v1.13) MySQL backups save lives!