SlideShare a Scribd company logo
1 of 33
DBaaS on Kubernetes
Peanut Butter and Jelly, or Oil and Water
About ObjectRocket
ObjectRocket helps you build better sites and apps, faster. You can concentrate on your mission without
having to worry about managing data stores.
2
Support
It’s the best hands-on support,
hands-down.
All of our customers get 24x7x365
support from database experts with
financially-backed SLAs.
ObjectRocket provides a
customized, high-touch, human-
centered approach to support.
Technology
Our Database-as-a-Service
platform is purpose-built from
the ground up with high
performance gear and flexibility
to architect a solution that fits
your specific workload.
Hassle-free hosting for
MongoDB®, Elasticsearch® +
KIbana®, and Redis®
Expertise
Our team of experts with decades
of experience understand how to
operate and maintain data stores
in complex production
environments.
MONGO®, MongoDB® and MongoDB® Design are registered trademarks of MongoDB, Inc. Redis® and the Redis® logo are trademarks of Salvatore Sanfilippo in the US and other countries. Elasticsearch® and Kibana®
are trademarks of Elasticsearch BV, registered in the US and in other countries.
Why we chose
Kubernetes for
our next DBaaS
platform
What You’ll See Today
The specific
challenges that
we faced
Our solutions to
those challenges
What we’re
doing next
Choosing a new DBaaS Platform
Our Original Hosting Platform
Built circa 2012 Heavily based on openVZ containers
Custom orchestration, hardware and
infrastructure management
Assumes a bare metal environment
What’s Changed
Built circa 2012 Heavily based on openVZ containers
custom orchestration, hardware and
infrastructure management
Assumes a bare metal environment
Not available
yet
6 years is a long time in
technology
Docker has become the de-
facto container format
Custom orchestration is not a
differentiator and awesome
standard tools exist
Cloud usage has grown and
not all need bare metal
performance
• Well-built, open source, modern orchestration
• First-class citizen in the clouds we want support
• People want to develop for it
• Operators make it easy… There are open source
options everywhere
• It’s 🔥🔥🔥🔥
Kubernetes + ObjectRocket: Like Peanut Butter and Jelly
Our Response
Kubernetes + ObjectRocket: Like Oil and Water
• Kubernetes not built for stateful applications and
databases are pretty damn stateful
• Most databases don’t tolerate disappearing resources
very well
• All operators aren’t easy… aaS offerings need a whole
lot more functionality
The Reality: This PB&J is not gonna make itself
• Stateful sets are a start, but there is a
whole lot more available in Kubernetes
now that makes it suitable for certain
databases.
• The types of databases we offer are
surprisingly tolerant of shifting resources.
• We can develop around it.
• There’s no operator easy button, but
there (so far) have always been solutions
to our trickiest scenarios.
Operators: TLDR
Kubernetes Operators
An Operator is a method of packaging, deploying and managing a Kubernetes application. A Kubernetes
application is an application that is both deployed on Kubernetes and managed using the Kubernetes
APIs and kubectl tooling.
Operators are a way to wrap business logic and manual operations around kubernetes features and
components.
Requests
Standard Resource
Requests
Custom Resource
requests
Actions Applied
Actions
CRD(s) Controller
Intercept events
Perform custom logic
Translate to standard resources
Register custom resources.
What Our Operator Will Manage
Service Features04
● Safely scale up/out/in/down
● Orchestrate support utilities
● Add-on dashboards and tooling
Database
Administration
03
● Cluster configuration and plugins
● Perform regular backups
● Apply minor and patch updates
● Running database utilities
Security02
● Database User CRUD
● Database User roles
● IP whitelist CRUD
● Cluster Certificates
The Basics01
● Safely create a full cluster
● Make sure the cluster is healthy
● Delete all resources when asked
● Handle multiple tenants
DBaaS Challenges in a ‘Stateless’ Landscape
Biggest Challenges
There are lots of small challenges, but the most interesting things we encountered
were:
• Safe Updates
• K8s Queuing behaviors
• Remote Execution
• State Management
• Supportability
• Velocity of the Kubernetes ecosystem
Safe Updates
The #1 concern for databases
The Challenge
How can we ensure that Elasticsearch cluster updates are performed safely?
• Version upgrades and some configuration changes require that nodes are restarted
• This should be accomplished without impacting database uptime and performance
1
1. Node disappears
2. Replicas on other nodes are promoted / New
replicas created on live nodes
3. When node returns to cluster, data reshuffles
4. When green, repeat for every node restart
2
3
The Wrong Way
2
1. Cluster allocation disabled
2. Node disappears
3. Replicas on other nodes promoted to primary,
but no data movement
4. When node returns to cluster, enable allocation
5. Elasticsearch verifies shards on returned node
6. When green, repeat for every node restart
The Right Way
5
• Unique network identifiers
• Persistent storage
• Ordered, graceful deployment and
scaling.
• Ordered, automated rolling updates.
Stateful Sets
StatefulSets are intended to be used with stateful applications and distributed
systems.
StatefulSet Rolling Update Strategies
OnDelete Strategy
.spec.updateStrategy.type = OnDelete
• Implements legacy (1.6 and prior) behavior.
• Controller will not automatically update each
pod in a StatefulSet.
• User manually deletes pods to cause the
controller to create new pods
• Must manage workflow to maintain uptime
RollingUpdate
.spec.updateStrategy.type = RollingUpdate
• Automated, rolling update of pods
• Controller will delete and recreate each
pod in the StatefulSet.
• Proceeds in the same order as pod
termination
• Waits until an updated pod is running and
ready prior to updating its predecessor.
Our Approach: Partitioned RollingUpdate
• RollingUpdate applies changes to pods in reverse order, from {N-1..0}.
• Kubernetes offers a couple of ways to safely tear down each pod:
• A grace period (time) is given before the pod is violently shutdown.
• preHooks: command/script to execute before the pod is violently shutdown.
• Partitioned RollingUpdate enables control over when each pod has the changes
applied.
• Only pods with an ordinal >= the partition value will be updated when the StatefulSet’s
.spec.template is updated.
• Pods with an ordinal < the partition will not be updated, even if they are deleted
Example Update Flow
Enable ES
Cluster
Allocation
Wait For
Pod Ready
State
Apply New
Pod
Definition
Increase
Partition
Size
Update
Received
Disable ES
Cluster
Allocation
Wait for ES
Cluster
Healthy
State
Remote Execution
The Challenge
Controlling the auth plugin that runs on the Elasticsearch containers
• User and role CRUD will need to be managed by the operator
• Apache Licensed Elasticsearch does not include an RBAC implementation
Apache 2.0 licensed Elasticsearch plugin that secures Elasticsearch by
providing authentication and authorization.
• Pre-built management utility
• Community Edition
• Internal user database for authentication
• Role based permissions for authorization
• Cluster and Index level permissions
• Live reloads of user database
How to Automate Updates?
Centralized Service k8s Job Remote Execution
Standalone service running,
listening on a queue and
executing its own copy of
sgadmin
The operator starts up a k8s
job which executes its own
copy of sgadmin in instance
namespace
The operator remotely
executes the copy of
sgadmin already existing on
the cluster
Winner: Remote Execution
Pros
● Security: Uses the k8s API server port; minimizes open ports on
the cluster
● Security: Leverages unique local admin certs we generate for each
cluster
● Simplicity: Uses the version of sgadmin installed on each cluster,
simplifying the support of multiple versions of the plugin
● Efficiency: No extra pods/run on demand means less wasted
resources
Cons
● Temporary multi-process container: Introduces another process
running in the Elasticsearch container breaking docker paradigms.
● Risk: client-go’s remotecommand library isn’t widely used
Re-queueing
Operator
The Challenge
Managing multiple, possibly conflicting requests
At the core of the Kubernetes design philosophy is an easy-to-understand idea: Bring the actual state
of an object in line with the specified state of an object. Just do that...forever…
Add
Modify
Delete
Cluster
Re-queueing
Some
Change Next
Re-queueing - Custom Rate-Limited
Slow Re-Queue
● Mounting PVC (EBS Volumes)
● Expanding volumes
● Removing nodes
● Cluster upgrades
Fast Re-Queue
● Rolling restarts
● Adding nodes
● Configuration updates
What’s Next?
Get free database resources on our
new Kubernetes-based platform on AWS in the region of your choice.
MongoDB | Elasticsearch | Redis
Your experience and feedback during the program will play a critical role in
helping us build the database platform you need.
https://objectrocket.com/alphaprogram
Next Generation Platform
Evaluation Program
Check Out Our Code
https://github.com/objectrocket
We’re Hiring!
• Developers
• Engineers
• Analysts
Apply at ObjectRocket.com/Careers
Meet ObjectRocket at the Hiring Mixer
4:30-6:30pm tonight

More Related Content

What's hot

The Evolution of SQL Server as a Service - SQL Azure Managed Instance
The Evolution of SQL Server as a Service - SQL Azure Managed InstanceThe Evolution of SQL Server as a Service - SQL Azure Managed Instance
The Evolution of SQL Server as a Service - SQL Azure Managed InstanceJavier Villegas
 
Store Data in Azure SQL Database
Store Data in Azure SQL DatabaseStore Data in Azure SQL Database
Store Data in Azure SQL DatabaseSuhail Jamaldeen
 
Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019Jovan Popovic
 
SQL to Azure Migrations
SQL to Azure MigrationsSQL to Azure Migrations
SQL to Azure MigrationsDatavail
 
Cloud's Hidden Impact on IT Support Organizations
Cloud's Hidden Impact on IT Support OrganizationsCloud's Hidden Impact on IT Support Organizations
Cloud's Hidden Impact on IT Support OrganizationsChristopher Foot
 
Who Will Win the Database Wars?
Who Will Win the Database Wars?Who Will Win the Database Wars?
Who Will Win the Database Wars?Christopher Foot
 
Enteras io Introduction
Enteras io IntroductionEnteras io Introduction
Enteras io IntroductionSanjay Dhar
 
NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabasesAdi Challa
 
Aws architecture main ideas
Aws architecture main ideasAws architecture main ideas
Aws architecture main ideasCraig F.R Read
 
Cloud Design Patterns - PRESCRIPTIVE ARCHITECTURE GUIDANCE FOR CLOUD APPLICAT...
Cloud Design Patterns - PRESCRIPTIVE ARCHITECTURE GUIDANCE FOR CLOUD APPLICAT...Cloud Design Patterns - PRESCRIPTIVE ARCHITECTURE GUIDANCE FOR CLOUD APPLICAT...
Cloud Design Patterns - PRESCRIPTIVE ARCHITECTURE GUIDANCE FOR CLOUD APPLICAT...David J Rosenthal
 
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent OzarGeek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent OzarIDERA Software
 
Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...
Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...
Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...Morgan Simonsen
 
Overview of Microsoft Appliances: Scaling SQL Server to Hundreds of Terabytes
Overview of Microsoft Appliances: Scaling SQL Server to Hundreds of TerabytesOverview of Microsoft Appliances: Scaling SQL Server to Hundreds of Terabytes
Overview of Microsoft Appliances: Scaling SQL Server to Hundreds of TerabytesJames Serra
 
Transform DBMS to Drive Apps of Engagement Innovation
Transform DBMS to Drive Apps of Engagement InnovationTransform DBMS to Drive Apps of Engagement Innovation
Transform DBMS to Drive Apps of Engagement InnovationEDB
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql databasePARIKSHIT SAVJANI
 
Cloud's Hidden Impact on IT Shops
Cloud's Hidden Impact on IT ShopsCloud's Hidden Impact on IT Shops
Cloud's Hidden Impact on IT ShopsChristopher Foot
 
EDB Postgres Platform
EDB Postgres PlatformEDB Postgres Platform
EDB Postgres PlatformEDB
 

What's hot (20)

The Evolution of SQL Server as a Service - SQL Azure Managed Instance
The Evolution of SQL Server as a Service - SQL Azure Managed InstanceThe Evolution of SQL Server as a Service - SQL Azure Managed Instance
The Evolution of SQL Server as a Service - SQL Azure Managed Instance
 
Store Data in Azure SQL Database
Store Data in Azure SQL DatabaseStore Data in Azure SQL Database
Store Data in Azure SQL Database
 
Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019
 
SQL to Azure Migrations
SQL to Azure MigrationsSQL to Azure Migrations
SQL to Azure Migrations
 
Cloud's Hidden Impact on IT Support Organizations
Cloud's Hidden Impact on IT Support OrganizationsCloud's Hidden Impact on IT Support Organizations
Cloud's Hidden Impact on IT Support Organizations
 
Who Will Win the Database Wars?
Who Will Win the Database Wars?Who Will Win the Database Wars?
Who Will Win the Database Wars?
 
Enteras io Introduction
Enteras io IntroductionEnteras io Introduction
Enteras io Introduction
 
NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabases
 
Aws architecture main ideas
Aws architecture main ideasAws architecture main ideas
Aws architecture main ideas
 
Cloud Design Patterns - PRESCRIPTIVE ARCHITECTURE GUIDANCE FOR CLOUD APPLICAT...
Cloud Design Patterns - PRESCRIPTIVE ARCHITECTURE GUIDANCE FOR CLOUD APPLICAT...Cloud Design Patterns - PRESCRIPTIVE ARCHITECTURE GUIDANCE FOR CLOUD APPLICAT...
Cloud Design Patterns - PRESCRIPTIVE ARCHITECTURE GUIDANCE FOR CLOUD APPLICAT...
 
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent OzarGeek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
 
Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...
Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...
Massive Lift & Shift Migrations to Microsoft Azure with the Microsoft Migrati...
 
Paas
PaasPaas
Paas
 
Overview of Microsoft Appliances: Scaling SQL Server to Hundreds of Terabytes
Overview of Microsoft Appliances: Scaling SQL Server to Hundreds of TerabytesOverview of Microsoft Appliances: Scaling SQL Server to Hundreds of Terabytes
Overview of Microsoft Appliances: Scaling SQL Server to Hundreds of Terabytes
 
Transform DBMS to Drive Apps of Engagement Innovation
Transform DBMS to Drive Apps of Engagement InnovationTransform DBMS to Drive Apps of Engagement Innovation
Transform DBMS to Drive Apps of Engagement Innovation
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql database
 
Cloud's Hidden Impact on IT Shops
Cloud's Hidden Impact on IT ShopsCloud's Hidden Impact on IT Shops
Cloud's Hidden Impact on IT Shops
 
DQS & MDS in SQL Server 2016
DQS & MDS in SQL Server 2016DQS & MDS in SQL Server 2016
DQS & MDS in SQL Server 2016
 
EDB Postgres Platform
EDB Postgres PlatformEDB Postgres Platform
EDB Postgres Platform
 
Sql Server 2008 Server Consolidation
Sql Server 2008 Server ConsolidationSql Server 2008 Server Consolidation
Sql Server 2008 Server Consolidation
 

Similar to Database as a Service (DBaaS) on Kubernetes

To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…Sergey Dzyuban
 
How kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updatedHow kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updatedShikha Srivastava
 
10 tips for Cloud Native Security
10 tips for Cloud Native Security10 tips for Cloud Native Security
10 tips for Cloud Native SecurityKarthik Gaekwad
 
Disenchantment: Netflix Titus, Its Feisty Team, and Daemons
Disenchantment: Netflix Titus, Its Feisty Team, and DaemonsDisenchantment: Netflix Titus, Its Feisty Team, and Daemons
Disenchantment: Netflix Titus, Its Feisty Team, and DaemonsC4Media
 
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupKubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupMist.io
 
DevSecOps in a cloudnative world
DevSecOps in a cloudnative worldDevSecOps in a cloudnative world
DevSecOps in a cloudnative worldKarthik Gaekwad
 
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
Kubernetes at NU.nl   (Kubernetes meetup 2019-09-05)Kubernetes at NU.nl   (Kubernetes meetup 2019-09-05)
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)Tibo Beijen
 
Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23msohn
 
Kubernates : An Small introduction for Beginners by Rajiv Vishwkarma
Kubernates : An Small introduction for Beginners by Rajiv VishwkarmaKubernates : An Small introduction for Beginners by Rajiv Vishwkarma
Kubernates : An Small introduction for Beginners by Rajiv VishwkarmaRajiv Vishwkarma
 
Sergey Dzyuban "To Build My Own Cloud with Blackjack…"
Sergey Dzyuban "To Build My Own Cloud with Blackjack…"Sergey Dzyuban "To Build My Own Cloud with Blackjack…"
Sergey Dzyuban "To Build My Own Cloud with Blackjack…"Fwdays
 
Simplify Your Way To Expert Kubernetes Management
Simplify Your Way To Expert Kubernetes ManagementSimplify Your Way To Expert Kubernetes Management
Simplify Your Way To Expert Kubernetes ManagementDevOps.com
 
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事smalltown
 
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsAmbassador Labs
 
Kubernetes Clusters as a Service with Gardener
Kubernetes Clusters as a Service with GardenerKubernetes Clusters as a Service with Gardener
Kubernetes Clusters as a Service with GardenerQAware GmbH
 
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...Xiaoman DONG
 
Evolving for Kubernetes
Evolving for KubernetesEvolving for Kubernetes
Evolving for KubernetesChris McEniry
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101Vishwas N
 
Monitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloudMonitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloudDatadog
 

Similar to Database as a Service (DBaaS) on Kubernetes (20)

To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…
 
How kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updatedHow kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updated
 
10 tips for Cloud Native Security
10 tips for Cloud Native Security10 tips for Cloud Native Security
10 tips for Cloud Native Security
 
Disenchantment: Netflix Titus, Its Feisty Team, and Daemons
Disenchantment: Netflix Titus, Its Feisty Team, and DaemonsDisenchantment: Netflix Titus, Its Feisty Team, and Daemons
Disenchantment: Netflix Titus, Its Feisty Team, and Daemons
 
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupKubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetup
 
DevSecOps in a cloudnative world
DevSecOps in a cloudnative worldDevSecOps in a cloudnative world
DevSecOps in a cloudnative world
 
Kubernetes Security
Kubernetes SecurityKubernetes Security
Kubernetes Security
 
Kubernetes intro
Kubernetes introKubernetes intro
Kubernetes intro
 
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
Kubernetes at NU.nl   (Kubernetes meetup 2019-09-05)Kubernetes at NU.nl   (Kubernetes meetup 2019-09-05)
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
 
Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23
 
Kubernates : An Small introduction for Beginners by Rajiv Vishwkarma
Kubernates : An Small introduction for Beginners by Rajiv VishwkarmaKubernates : An Small introduction for Beginners by Rajiv Vishwkarma
Kubernates : An Small introduction for Beginners by Rajiv Vishwkarma
 
Sergey Dzyuban "To Build My Own Cloud with Blackjack…"
Sergey Dzyuban "To Build My Own Cloud with Blackjack…"Sergey Dzyuban "To Build My Own Cloud with Blackjack…"
Sergey Dzyuban "To Build My Own Cloud with Blackjack…"
 
Simplify Your Way To Expert Kubernetes Management
Simplify Your Way To Expert Kubernetes ManagementSimplify Your Way To Expert Kubernetes Management
Simplify Your Way To Expert Kubernetes Management
 
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
 
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
 
Kubernetes Clusters as a Service with Gardener
Kubernetes Clusters as a Service with GardenerKubernetes Clusters as a Service with Gardener
Kubernetes Clusters as a Service with Gardener
 
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...
Kubernetes Clusters At Scale: Managing Hundreds Apache Pinot Kubernetes Clust...
 
Evolving for Kubernetes
Evolving for KubernetesEvolving for Kubernetes
Evolving for Kubernetes
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Monitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloudMonitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloud
 

Recently uploaded

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 

Recently uploaded (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 

Database as a Service (DBaaS) on Kubernetes

  • 1. DBaaS on Kubernetes Peanut Butter and Jelly, or Oil and Water
  • 2. About ObjectRocket ObjectRocket helps you build better sites and apps, faster. You can concentrate on your mission without having to worry about managing data stores. 2 Support It’s the best hands-on support, hands-down. All of our customers get 24x7x365 support from database experts with financially-backed SLAs. ObjectRocket provides a customized, high-touch, human- centered approach to support. Technology Our Database-as-a-Service platform is purpose-built from the ground up with high performance gear and flexibility to architect a solution that fits your specific workload. Hassle-free hosting for MongoDB®, Elasticsearch® + KIbana®, and Redis® Expertise Our team of experts with decades of experience understand how to operate and maintain data stores in complex production environments. MONGO®, MongoDB® and MongoDB® Design are registered trademarks of MongoDB, Inc. Redis® and the Redis® logo are trademarks of Salvatore Sanfilippo in the US and other countries. Elasticsearch® and Kibana® are trademarks of Elasticsearch BV, registered in the US and in other countries.
  • 3. Why we chose Kubernetes for our next DBaaS platform What You’ll See Today The specific challenges that we faced Our solutions to those challenges What we’re doing next
  • 4. Choosing a new DBaaS Platform
  • 5. Our Original Hosting Platform Built circa 2012 Heavily based on openVZ containers Custom orchestration, hardware and infrastructure management Assumes a bare metal environment
  • 6. What’s Changed Built circa 2012 Heavily based on openVZ containers custom orchestration, hardware and infrastructure management Assumes a bare metal environment Not available yet 6 years is a long time in technology Docker has become the de- facto container format Custom orchestration is not a differentiator and awesome standard tools exist Cloud usage has grown and not all need bare metal performance
  • 7. • Well-built, open source, modern orchestration • First-class citizen in the clouds we want support • People want to develop for it • Operators make it easy… There are open source options everywhere • It’s 🔥🔥🔥🔥 Kubernetes + ObjectRocket: Like Peanut Butter and Jelly
  • 9. Kubernetes + ObjectRocket: Like Oil and Water • Kubernetes not built for stateful applications and databases are pretty damn stateful • Most databases don’t tolerate disappearing resources very well • All operators aren’t easy… aaS offerings need a whole lot more functionality
  • 10. The Reality: This PB&J is not gonna make itself • Stateful sets are a start, but there is a whole lot more available in Kubernetes now that makes it suitable for certain databases. • The types of databases we offer are surprisingly tolerant of shifting resources. • We can develop around it. • There’s no operator easy button, but there (so far) have always been solutions to our trickiest scenarios.
  • 12. Kubernetes Operators An Operator is a method of packaging, deploying and managing a Kubernetes application. A Kubernetes application is an application that is both deployed on Kubernetes and managed using the Kubernetes APIs and kubectl tooling. Operators are a way to wrap business logic and manual operations around kubernetes features and components. Requests Standard Resource Requests Custom Resource requests Actions Applied Actions CRD(s) Controller Intercept events Perform custom logic Translate to standard resources Register custom resources.
  • 13. What Our Operator Will Manage Service Features04 ● Safely scale up/out/in/down ● Orchestrate support utilities ● Add-on dashboards and tooling Database Administration 03 ● Cluster configuration and plugins ● Perform regular backups ● Apply minor and patch updates ● Running database utilities Security02 ● Database User CRUD ● Database User roles ● IP whitelist CRUD ● Cluster Certificates The Basics01 ● Safely create a full cluster ● Make sure the cluster is healthy ● Delete all resources when asked ● Handle multiple tenants
  • 14. DBaaS Challenges in a ‘Stateless’ Landscape
  • 15. Biggest Challenges There are lots of small challenges, but the most interesting things we encountered were: • Safe Updates • K8s Queuing behaviors • Remote Execution • State Management • Supportability • Velocity of the Kubernetes ecosystem
  • 16. Safe Updates The #1 concern for databases
  • 17. The Challenge How can we ensure that Elasticsearch cluster updates are performed safely? • Version upgrades and some configuration changes require that nodes are restarted • This should be accomplished without impacting database uptime and performance 1 1. Node disappears 2. Replicas on other nodes are promoted / New replicas created on live nodes 3. When node returns to cluster, data reshuffles 4. When green, repeat for every node restart 2 3 The Wrong Way 2 1. Cluster allocation disabled 2. Node disappears 3. Replicas on other nodes promoted to primary, but no data movement 4. When node returns to cluster, enable allocation 5. Elasticsearch verifies shards on returned node 6. When green, repeat for every node restart The Right Way 5
  • 18. • Unique network identifiers • Persistent storage • Ordered, graceful deployment and scaling. • Ordered, automated rolling updates. Stateful Sets StatefulSets are intended to be used with stateful applications and distributed systems.
  • 19. StatefulSet Rolling Update Strategies OnDelete Strategy .spec.updateStrategy.type = OnDelete • Implements legacy (1.6 and prior) behavior. • Controller will not automatically update each pod in a StatefulSet. • User manually deletes pods to cause the controller to create new pods • Must manage workflow to maintain uptime RollingUpdate .spec.updateStrategy.type = RollingUpdate • Automated, rolling update of pods • Controller will delete and recreate each pod in the StatefulSet. • Proceeds in the same order as pod termination • Waits until an updated pod is running and ready prior to updating its predecessor.
  • 20. Our Approach: Partitioned RollingUpdate • RollingUpdate applies changes to pods in reverse order, from {N-1..0}. • Kubernetes offers a couple of ways to safely tear down each pod: • A grace period (time) is given before the pod is violently shutdown. • preHooks: command/script to execute before the pod is violently shutdown. • Partitioned RollingUpdate enables control over when each pod has the changes applied. • Only pods with an ordinal >= the partition value will be updated when the StatefulSet’s .spec.template is updated. • Pods with an ordinal < the partition will not be updated, even if they are deleted
  • 21. Example Update Flow Enable ES Cluster Allocation Wait For Pod Ready State Apply New Pod Definition Increase Partition Size Update Received Disable ES Cluster Allocation Wait for ES Cluster Healthy State
  • 23. The Challenge Controlling the auth plugin that runs on the Elasticsearch containers • User and role CRUD will need to be managed by the operator • Apache Licensed Elasticsearch does not include an RBAC implementation Apache 2.0 licensed Elasticsearch plugin that secures Elasticsearch by providing authentication and authorization. • Pre-built management utility • Community Edition • Internal user database for authentication • Role based permissions for authorization • Cluster and Index level permissions • Live reloads of user database
  • 24. How to Automate Updates? Centralized Service k8s Job Remote Execution Standalone service running, listening on a queue and executing its own copy of sgadmin The operator starts up a k8s job which executes its own copy of sgadmin in instance namespace The operator remotely executes the copy of sgadmin already existing on the cluster
  • 25. Winner: Remote Execution Pros ● Security: Uses the k8s API server port; minimizes open ports on the cluster ● Security: Leverages unique local admin certs we generate for each cluster ● Simplicity: Uses the version of sgadmin installed on each cluster, simplifying the support of multiple versions of the plugin ● Efficiency: No extra pods/run on demand means less wasted resources Cons ● Temporary multi-process container: Introduces another process running in the Elasticsearch container breaking docker paradigms. ● Risk: client-go’s remotecommand library isn’t widely used
  • 27. Operator The Challenge Managing multiple, possibly conflicting requests At the core of the Kubernetes design philosophy is an easy-to-understand idea: Bring the actual state of an object in line with the specified state of an object. Just do that...forever… Add Modify Delete Cluster
  • 29. Re-queueing - Custom Rate-Limited Slow Re-Queue ● Mounting PVC (EBS Volumes) ● Expanding volumes ● Removing nodes ● Cluster upgrades Fast Re-Queue ● Rolling restarts ● Adding nodes ● Configuration updates
  • 31. Get free database resources on our new Kubernetes-based platform on AWS in the region of your choice. MongoDB | Elasticsearch | Redis Your experience and feedback during the program will play a critical role in helping us build the database platform you need. https://objectrocket.com/alphaprogram Next Generation Platform Evaluation Program
  • 32. Check Out Our Code https://github.com/objectrocket
  • 33. We’re Hiring! • Developers • Engineers • Analysts Apply at ObjectRocket.com/Careers Meet ObjectRocket at the Hiring Mixer 4:30-6:30pm tonight

Editor's Notes

  1. Bolded items are part of the presentation -- Italics are not in the presentation at this time State Management: Updating, restarting, allocating, creating Supportability: Existing support relies on direct connectivity to the hosts Support has direct admin access if needed Emphasis on tooling in the new platform Velocity of K8s ecosystem: Rapid featuresets Breaking changes New/better ways to solve problems right after you’ve solved them
  2. Stateful sets are deployments that maintain ordered persistence. Ordered names ‘deployment name - n+1 Pairs deployment members with PVC (Persistent Volume Claims) allowing container termination without data loss Built in logic for update policies
  3. OnDelete was already the least preferred method when we started to build the platform RollingUpdate handles a lot of the management complexity related to active deployments We still needed a way to manage ES process around each step of the upgrade process.
  4. Overview: Default behavior is one large partition so each node in the cluster is handled one at a time down the line. This doesn’t allow us to manage cluster allocation after altering/updating each member of the cluster. Partitions: By managing the size of the partition we can control which members of the cluster are updated and when. -- wider smaller disk clusters we can upgrade multiple at a time, larger data clusters can be managed differently Allows us to: -- enable/disable allocation -- perform additional sanity checks -- rollback with minimal impact
  5. To answer the first part of the challenge, a number of readily available plugins were looked at. (e.g. Xpack, Search Guard, Read-only Rest). The plug-in that best met our needs was Search Guard. Challenges & Considerations: -- Managing updates/patches history of user changes within our control plane -- Automation of cli tooling -- Clusters have unique certs for the tool to authenticate with
  6. Centralized service: -- pro: Lightweight service with no external dependencies Follows async queue design principles -- con: It’s another deployment Accessing unique per cluster certs K8s Job: -- pro: Lightweight process decoupled from other services. Action matches what jobs are designed for -- con: Managing and cleaning up old jobs Additional container/resources required for user changes Spin up/down time of job resources Operator Remote Exec: Next page for detail discussion
  7. **** Remote execution analogy needed
  8. -- What if an object is busy? -- What if an object takes too long to resolve? -- What if external dependencies cause an error/delay?
  9. Delay: Set interval Good when you can predict the behavior Rate-Limited: Allows back-off implementation when behavior is less predictable
  10. Fast re-queue: More predictable workloads but will transition to slow requeue when things take to long Slow re-queue: There are times that things _can_ take longer Ebs errors, delays Large migrations of data during scale down events