SlideShare a Scribd company logo
High-level architecture
of a complete MariaDB setup
A complete
deployment
A production deployment should include:
● MariaDB itself
● High Availability / Redundancy
● Delayed replica
● Automated backups and backup testing
● Monitoring
● Automation / gitops
What is a complete production deployment?
Where should
MariaDB run?

Recommended for you

SkySQL MariaDB 云数据组件
SkySQL MariaDB 云数据组件SkySQL MariaDB 云数据组件
SkySQL MariaDB 云数据组件

SkySQL MariaDB 云数据组件 http://www.ossez.com/forum.php?mod=viewthread&tid=26725&fromuid=426 (出处: OSSEZ)

Choosing the right high availability strategy
Choosing the right high availability strategyChoosing the right high availability strategy
Choosing the right high availability strategy

- MariaDB provides several high availability options including asynchronous replication, semi-synchronous replication, Galera synchronous replication, and MaxScale for load balancing and failover. - Asynchronous replication allows for read scaling but carries a risk of data loss during failover. Semi-synchronous replication reduces this risk by ensuring data is written to at least one slave before confirming to the client. - Galera synchronous multi-master replication ensures all nodes remain in sync with no data loss but can impact performance. MaxScale helps manage replication topology and perform automated failovers.

mariadbreplicationhigh performance
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber

Uber uses a scalable real-time complex event processing system to analyze streaming data from its services. The system uses Apache Samza for distributed stream processing and WSO2 Siddhi for complex event processing. Key events are detected using Siddhi queries and then actions like notifications or indexing to databases are triggered. The system processes over 30 billion messages per day across many use cases. Maintaining scalability, fault tolerance, and low latency are ongoing challenges.

● System:
○ Linux or *BSD
○ Have enough memory and at least 2 CPU cores
○ Prefer SSD storage
○ (Xfs or ext4 + LVM) or ZFS
● I don't recommend containers
Any cloud platform that provides bare systems will be fine
Where should MariaDB run?
Storage Engines
and Plugins
MariaDB doesn't know how to read or write data, indexes,
caches, run transactions…
All these operations are delegated to a special plugin type called
the storage engines
The default is InnoDB
What is a complete production deployment?
Other notable storage engines include:
● CONNECT
● S3
● SPIDER
● RocksDB
● ColumnStore
What is a complete production deployment?

Recommended for you

Cassandra Lunch #88: Cadence
Cassandra Lunch #88: CadenceCassandra Lunch #88: Cadence
Cassandra Lunch #88: Cadence

In Cassandra Lunch #88, CEO of Anant, Rahul Singh, will discuss how Cadence works on top of Cassandra to provide workflow management at scale and Cadence architecture in the context of SAGA Patterns Accompanying Blog: Coming Soon! Accompanying YouTube: https://youtu.be/YPPPM0F0xw0 Sign Up For Our Newsletter: http://eepurl.com/grdMkn Join Cassandra Lunch Weekly at 12 PM EST Every Wednesday: https://www.meetup.com/Cassandra-DataStax-DC/events/ Cassandra.Link: https://cassandra.link/ Follow Us and Reach Us At: Anant: https://www.anant.us/ Awesome Cassandra: https://github.com/Anant/awesome-cassandra Cassandra.Lunch: https://github.com/Anant/Cassandra.Lunch Email: solutions@anant.us LinkedIn: https://www.linkedin.com/company/anant/ Twitter: https://twitter.com/anantcorp Eventbrite: https://www.eventbrite.com/o/anant-1072927283 Facebook: https://www.facebook.com/AnantCorp/ Join The Anant Team: https://www.careers.anant.us

cadencecassandrasaga patterns
Buytaert kris my_sql-pacemaker
Buytaert kris my_sql-pacemakerBuytaert kris my_sql-pacemaker
Buytaert kris my_sql-pacemaker

This document discusses using Pacemaker with MySQL for high availability (HA). It covers key concepts in HA including eliminating single points of failure. It then discusses various MySQL HA solutions like replication, DRBD, MySQL Cluster, and using Linux HA tools like Pacemaker. Pacemaker manages resources across nodes to ensure services are always running, and can monitor and migrate MySQL and other services in an HA cluster. The document provides configuration examples and best practices for setting up MySQL HA with Pacemaker.

MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt

MariaDB und mehr Presented by Ralf Gebhardt at the MariaDB Roadshow Germany: 4.7.2014 in Hamburg, 8.7.2014 in Berlin and 11.7.2014 in Frankfurt.

mariadbmysql
Notable plugins:
● User statistics
● On staging: SQL error log
What is a complete production deployment?
High Availability
& Scalability
High Availability and Redundancy are achieved by Replication
Which can be of the following types:
● Synchronous or asynchronous
● Single master or multi-master
High Availability & Scalability
MariaDB replication can be:
● Asynchronous replication
● Semi-sync replication
● Galera cluster
High Availability & Scalability

Recommended for you

Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster

Galera Cluster vs. Continuent Tungsten Clusters Building a Geo-Scale, Multi-Region and Highly Available MySQL Cloud Back-End This second installment of our High Noon series of on-demand webinars is focused on Galera Cluster (including MariaDB Cluster & Percona XtraDB Cluster). It looks at some of the key characteristics of Galera Cluster and how it fares as a MySQL HA / DR / Geo-Scale solution, especially when compared to Continuent Tungsten Clustering. Watch this webinar to learn how to do better MySQL HA / DR / Geo-Scale. AGENDA - Goals for the High Noon Webinar Series - High Noon Series: Tungsten Clustering vs Others - Galera Cluster (aka MariaDB Cluster & Percona XtraDB Cluster) - Key Characteristics - Certification-based Replication - Galera Multi-Site Requirements - Limitations Using Galera Cluster - How to do better MySQL HA / DR / Geo-Scale? - Galera Cluster vs Tungsten Clustering - About Continuent & Its Solutions PRESENTER Matthew Lang - Customer Success Director – Americas, Continuent - has over 25 years of experience in database administration, database programming, and system architecture, including the creation of a database replication product that is still in use today. He has designed highly available, scaleable systems that have allowed startups to quickly become enterprise organizations, utilizing a variety of technologies including open source projects, virtualization and cloud.

galera clustermariadb clusterpercona xtradb cluster
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases

Slides presented at Percona Live Europe Open Source Database Conference 2019, Amsterdam, 2019-10-01. Imagine a world where all Wikipedia articles disappear due to a human error or software bug. Sounds unreal? According to some estimations, it would take an excess of hundreds of million person-hours to be written again. To prevent that scenario from ever happening, our SRE team at Wikimedia recently refactored the relational database recovery system. In this session, we will discuss how we backup 550TB of MariaDB data without impacting the 15 billion page views per month we get. We will cover what were our initial plans to replace the old infrastructure, how we achieved recovering 2TB databases in less than 30 minutes while maintaining per-table granularity, as well as the different types of backups we implemented. Lastly, we will talk about lessons learned, what went well, how our original plans changed and future work.

backupswikipediaperconalive
Microsoft Hekaton
Microsoft HekatonMicrosoft Hekaton
Microsoft Hekaton

Hekaton is SQL Server's in-memory optimized database engine for online transaction processing (OLTP) workloads. It uses lock-free data structures, multi-version concurrency control, and compiled Transact-SQL queries to provide high performance and scalability. Transaction logging and continuous checkpointing ensure data durability. Hekaton tables and indexes are optimized for memory residency, with hash indexes and Bw-tree indexes to support efficient lookups and updates.

datamicrosoftcomputer
Asynchronous replication:
● Writes on the master (events) are logged into the binary log
● The binary log is read and sent to the replicas
● The replicas receive it and write the relay log
● The relay log events are applies to the data
○ In parallel
● Replicas can be used to scale reads, but the lag should be
monitored
● GTID allows master failover is possible
High Availability & Scalability
Delayed replication:
● Asynchronous replication can be configured to be delayed
● Eg: 1 hour, 1 day
● If an SQL statements destroys data on the master, you can use the
delayed replica to recover data
High Availability & Scalability
Semi-sync replication:
● Similar to asynchronous replication
● But when a client makes a change to the data:
○ The master waits until at least 1 replica has logged the event
into the binary log
○ Then it returns success to the client
● This means that semisync replication makes writes slower
● And if all replicas crash, the master won't accept data writes
High Availability & Scalability
Galera is virtually synchronous replication
● Each transaction needs be certified by the majority of nodes before
it is applied to any node
● Number of nodes should be odd
● Data conflicts lead to failed transactions and potentially node
eviction
● Don't use multiple masters
● Large transactions should be avoided
● AUTO_INCREMENT id's are not necessarily in chronological order
● A node slowdown slows down the cluster
High Availability & Scalability

Recommended for you

The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA

This document provides a summary of a presentation on becoming an accidental PostgreSQL database administrator (DBA). It covers topics like installation, configuration, connections, backups, monitoring, slow queries, and getting help. The presentation aims to help those suddenly tasked with DBA responsibilities to not panic and provides practical advice on managing a PostgreSQL database.

Interactive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark StreamingInteractive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark Streaming

This document discusses strategies for building interactive streaming applications in Spark Streaming. It describes using Zookeeper as a dynamic configuration source to allow modifying a Spark Streaming application's behavior at runtime. The key points are: - Zookeeper can be used to track configuration changes and trigger Spark Streaming context restarts through its watch mechanism and Curator library. - This allows building interactive applications that can adapt to configuration updates without needing to restart the whole streaming job. - Examples are provided of using Curator caches like node and path caches to monitor Zookeeper for changes and restart Spark Streaming contexts in response.

bangalore apache spark meetupapache sparkspark streaming
Managing and Visualizing your Replication Topologies with Orchestrator
Managing and Visualizing your Replication Topologies with OrchestratorManaging and Visualizing your Replication Topologies with Orchestrator
Managing and Visualizing your Replication Topologies with Orchestrator

Introducing Orchestrator: a MySQL replication topology management service, that greatly simplifies DBA's tasks and enhances visibility on your topologies.

mysqlorchestratoropen source
● Galera nodes can have replicas to scale reads without affecting
writes
● A Galera node can be the master of a node of another cluster
● In this way you can have a secondary cluster
High Availability & Scalability
High-level architecture of a complete MariaDB deployment
Proxy layer
Proxies are needed to:
● Only send queries to working servers
● Only send writes to the master(s), send reads to replicas
● Distribute the reads more or less equally amongst replicas
Proxy layer

Recommended for you

EQUNIX - PPT 11DB-Postgres���.pdf
EQUNIX - PPT 11DB-Postgres™.pdfEQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdf

Equnix Business Solutions (Equnix) is an IT Solution provider in Indonesia, providing comprehensive solution services especially on the infrastructure side for corporate business needs based on research and Open Source. Equnix has 3 (three) main services known as the Trilogy of Services: Support (Maintenance/Managed), World class level of Software Development, and Expert Consulting and Assessment for High Performance Transactions System. Equnix is customer oriented, not product or principal. Equal opportunity based on merit is our credo in managing HR development.

open source11dbpostgresql
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month

TubeMogul grew from few servers to over two thousands servers and handling over one trillion http requests a month, processed in less than 50ms each. To keep up with the fast growth, the SRE team had to implement an efficient Continuous Delivery infrastructure that allowed to do over 10,000 puppet deployment and 8,500 application deployment in 2014. In this presentation, we will cover the nuts and bolts of the TubeMogul operations engineering team and how they overcome challenges.

tubemogulfastlyjenkins
MariaDB 10 and Beyond
MariaDB 10 and BeyondMariaDB 10 and Beyond
MariaDB 10 and Beyond

MariaDB 10 and Beyond - the Future of Open Source Databases by Ivan Zoratti. Presented 24.6.2014 at the MariaDB Roadshow in Maarssen, Utrecht, The Netherlands.

mariadbmysqlfusion-io
Why not doing this in the application?
● DBAs would need to update app configuration when the list of
servers changes
● Proxies are complex pieces of software, they know their stuff
● They also have advanced features that the application can't have,
like connections multiplexing
Proxy layer
Main existing proxies:
● ProxySQL
● MaxScale
● HAProxy
Proxy layer
● Proxies can form an independent layer
● Or each app server can run a different proxy
● …or both
● In all cases, proxies can crash. Make sure you have multiple
proxies
Proxy layer
High-level architecture of a complete MariaDB deployment

Recommended for you

Server fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil AhujaServer fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil Ahuja

Linkedin has multiple data-centers hosting tens of thousands of servers across them. A large percentage of these servers host our data infrastructure - our distributed data store called Espresso is sizeable amongst them. The fleet of servers contain various hardware components including, but not limited to, SSDs; and hardware has a tendency of failing from time to time. In case of hardware failures the servers need to undergo maintenance which can take a significant amount of time based on type of failure. This creates reduced capacity for that duration and throws an interesting problem of maintaining capacity in the face of multiple failures. This talk covers how LinkedIn uses Camunda wrapped around with several components to achieve hands-off capacity management via multiple workflows, with asynchronous pauses and synchronisation among them. It will also highlight how we achieved seamless integrations with various platforms and components within Linkedin's Infrastructure, and a few best practices that helped us achieve the final state.

camundacon
Scalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBERScalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBER

The Marketplace data team at Uber has built a scalable complex event processing platform to solve many challenging real time data needs for various Uber products. This platform has been in production for almost a year and it has proven to be very flexible to solve many use cases. In this talk, we will share in detail the design and architecture of the platform, and how we employ Samza, Kafka, and Siddhi at scale. This slides was presented at Stream Processing Meetup @ LinkedIn on June 15 2016.

cepsamzastream processing
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse

Are you new to data warehouses (DWH)? Do you need to check whether your data warehouse follows the best practices for a good design? In both cases, this webinar is for you. A data warehouse is a central relational database that contains all measurements about a business or an organisation. This data comes from a variety of heterogeneous data sources, which includes databases of any type that back the applications used by the company, data files exported by some applications, or APIs provided by internal or external services. But designing a data warehouse correctly is a hard task, which requires gathering information about the business processes that need to be analysed in the first place. These processes must be translated into so-called star schemas, which means, denormalised databases where each table represents a dimension or facts. We will discuss these topics: - How to gather information about a business; - Understanding dictionaries and how to identify business entities; - Dimensions and facts; - Setting a table granularity; - Types of facts; - Types of dimensions; - Snowflakes and how to avoid them; - Expanding existing dimensions and facts.

data warehousedwhbig data
High-level architecture of a complete MariaDB deployment
Service discovery
● Proxies send queries to running MariaDB instances
● But proxies can fail too, like any other technology
● Application should only connect to running proxies
Service discovery
Solutions:
● Hashicorp Consul
● Kubernetes
● Cloud vendor-specific solutions
Service discovery

Recommended for you

Webinar - Unleash AI power with MySQL and MindsDB
Webinar - Unleash AI power with MySQL and MindsDBWebinar - Unleash AI power with MySQL and MindsDB
Webinar - Unleash AI power with MySQL and MindsDB

MindsDB enormously simplifies the process of making machine learning based predictions. Intead of developing a model and prepare data, you can connect MindsDB to an external data source (such as MySQL, PostgreSQL, other databases, or APIs) and run SQL queries about the future. Any AI engine (predictive algorithm) can be used.

mysqlmindsdbartificial intelligence
MariaDB Security Best Practices
MariaDB Security Best PracticesMariaDB Security Best Practices
MariaDB Security Best Practices

MariaDB best practices for user and permissions management, secrets storage, SSL, encryption at rest, and more. Includes an overview of MariaDB most advanced security features. Webinar organised in December 2023.

mariadbmariadb featuresmariadb administration
A first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them

From my webinar "A first look at MariaDB 11.x features and ideas on how to use them", from November 2023. I talked about the features introduced in MariaDB versions 11.0 to 11.3, not yet production-ready. For some features, I provided ideas about how they can be used.

mariadbsqlmariadb administration
High-level architecture of a complete MariaDB deployment
Backups
You need to backup:
● Configuration
● Data
If you use gitops configuration can always be recreated
We'll focus on data
Backups
For proper resilience:
● Automate backups
● Automatically test backups
● Have multiple backup strategies
● Have incremental backups
Also, archive and rotate backups
Backups

Recommended for you

MariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improvedMariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improved

This document discusses improvements that could be made to MariaDB stored procedures. It begins by explaining why stored procedures are useful from a user and community perspective. It then outlines currently limitations with MariaDB stored procedures, such as them being too slow and missing features that make development easier. The document proposes several specific improvements, such as supporting external programming languages like Python, adding more flexible input/output features, and implementing optimizations like inline functions and deterministic function caching. It concludes by suggesting adding support for array types and polymorphic types to MariaDB stored procedures.

mariadbmariadb featuresstored procedures
Webinar - MariaDB Temporal Tables: a demonstration
Webinar - MariaDB Temporal Tables: a demonstrationWebinar - MariaDB Temporal Tables: a demonstration
Webinar - MariaDB Temporal Tables: a demonstration

MariaDB Temporal Tables are useful to track how data change over time, and to handle data that refer to specific time periods. In this webinar I showed: * Which problems Temporal Tables solve * How to create Temporal Tables * How to turn regular tables into Temporal Tables * Best practices * Examples of what can be done with Temporal Tables

mariadbmariadb featurestemporal tables
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11

- MySQL 5.7 is no longer supported and will not receive any bugfixes or security updates after October 2023. Users need to upgrade to either MySQL 8.0 or MariaDB 10.11. - MySQL is developed by Oracle while MariaDB has its own independent foundation. MariaDB aims to be compatible with MySQL but also has unique features like storage engines. - Both MySQL 8.0 and MariaDB 10.11 are good options to upgrade to. Users should consider each product's unique features and governance model as well as test which one works better for their applications and use cases.

mariadbmysqlmariadb features
Main backup tools / methods:
● Snapshots
● Mariabackup
● mariadb-dump
● Binary log
Backups
Snapshots can be taken at several levels:
● LVM
● Filesystem (ZFS)
● VM
Make sure to only include data in your snapshots
Snapshots are not copies, they are taken instantaneously
They can be incremental
Backups
Mariabackup:
● Takes a copy of the files
● (Almost) no locks are taken
● Uses InnoDB transaction logs to bring the data to a consistent state
○ Ie: undo transactions committed after the copy started
Backups
mariadb-dump:
● Writes all the SQL statement needed to recreate the database
● Slowest backup method, slowest recovery method
● Historically single-threaded
● Uses a long transaction
● But backups can be restored on any MariaDB version
Backups

Recommended for you

MariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAsMariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAs

Webinar: MariaDB 10.11 key features overview for DBAs Orgnised by Vettabase 27 April 2023 Amongst other topics: - Long ALTER TABLES now don’t cause replicas to lag - InnoDB configuration is now more dynamic, and certain important variables can be modified without a restart - Populating an empty table is now much faster - New data types: UUID, INET4, INET6 - SFORMAT() function, NATURAL_KEY_SORT() function

mariadbmariadb administrationmariadb features
Recent MariaDB features to learn for a happy life
Recent MariaDB features to learn for a happy lifeRecent MariaDB features to learn for a happy life
Recent MariaDB features to learn for a happy life

After MariaDB 10.6 LTS was made available last year, three Short Term Support versions were released. While they shouldn’t be used in production, they allow us to test the features that will be included in the next LTS version. I follow the development of MariaDB through their JIRA, I test the new features, and I regularly review each new major version on the Vettabase website. In this talk I will summarise the most relevant features, show how to use them, and discuss how we can leverage them for real-world cases.

mariadbdatabasesql
Advanced MariaDB features that developers love.pdf
Advanced MariaDB features that developers love.pdfAdvanced MariaDB features that developers love.pdf
Advanced MariaDB features that developers love.pdf

MariaDB is one of the most widely used relational databases. It is compatible with MySQL for most practical purposes, and it is appreciated by developers communities all over the world. Over the years, MariaDB has developed many features that are extremely useful for developers, saving a lot of development time and enabling its use in situations where it wouldn't be practical otherwise. In this talk, we'll briefly discuss some of those features and why they are so useful. We'll talk about: * Querying remote or heterogeneous data sources in SQL; * Using temporal tables to analyse how data changes over time; * Using JSON in a relational database; * Miscellaneous tips and tricks.

mariadbmysqldatabase
Binary log:
● Contains events: binary changes to the rows, or SQL statements
and GTIDs
Can be analysed by a human with mariadb-binlog
● It should be periodically be copied to elsewhere
● When you restore a complete backup, check the latest GTID
● Then apply the binlog starting from the next GTID
Backups
Monitoring
A good, well-configured monitoring system:
● Shows detailed metrics about MariaDB performance
● Allows easy customisations
● Sends meaningful, non-redundant warnings
● Sends actionable, critical alerts
Monitoring
● Best ready-made solution: PMM
○ Includes query analysis
Some monitoring systems have templates for MariaDB or MySQL
You can also build your own solution with Prometheus + Grafana
For query analysis: ELK stack
● You can also use a solution for monitoring an application and
DB response times
Monitoring

Recommended for you

Automate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with AnsibleAutomate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with Ansible

Best practices for writing Ansible roles to administrate a real world MariaDB Galera Cluster, including monitoring, backups,, cron jobs, and so on.

mariadbgalerahigh availability
Creating Vagrant development machines with MariaDB
Creating Vagrant development machines with MariaDBCreating Vagrant development machines with MariaDB
Creating Vagrant development machines with MariaDB

How to create Vagrant development machines with MariaDB running on them. Best practices to follow to achieve production parity and code testability.

mariadbvagrantdbops
MariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructuresMariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructures

This document summarizes a talk on automating database infrastructures using MariaDB, MySQL and Ansible. It discusses Ansible concepts like inventories, modules, playbooks, roles, plays, variables and facts. It provides code examples of using Ansible to automate the deployment and configuration of MariaDB and MySQL database servers through plays, roles, variables and templates. It also discusses best practices for making tasks idempotent, using conditional tasks, tags and validating variables.

mariadbmysqlansible
High-level architecture of a complete MariaDB deployment

More Related Content

Similar to High-level architecture of a complete MariaDB deployment

MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
javier ramirez
 
SkySQL MariaDB 云数据组件
SkySQL MariaDB 云数据组件SkySQL MariaDB 云数据组件
SkySQL MariaDB 云数据组件
YUCHENG HU
 
Choosing the right high availability strategy
Choosing the right high availability strategyChoosing the right high availability strategy
Choosing the right high availability strategy
MariaDB plc
 
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
confluent
 
Cassandra Lunch #88: Cadence
Cassandra Lunch #88: CadenceCassandra Lunch #88: Cadence
Cassandra Lunch #88: Cadence
Anant Corporation
 
Buytaert kris my_sql-pacemaker
Buytaert kris my_sql-pacemakerBuytaert kris my_sql-pacemaker
Buytaert kris my_sql-pacemaker
kuchinskaya
 
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB Corporation
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Continuent
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
Jaime Crespo
 
Microsoft Hekaton
Microsoft HekatonMicrosoft Hekaton
Microsoft Hekaton
Siraj Memon
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
PostgreSQL Experts, Inc.
 
Interactive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark StreamingInteractive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark Streaming
datamantra
 
Managing and Visualizing your Replication Topologies with Orchestrator
Managing and Visualizing your Replication Topologies with OrchestratorManaging and Visualizing your Replication Topologies with Orchestrator
Managing and Visualizing your Replication Topologies with Orchestrator
Shlomi Noach
 
EQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdfEQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdf
Equnix Business Solutions
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
Nicolas Brousse
 
MariaDB 10 and Beyond
MariaDB 10 and BeyondMariaDB 10 and Beyond
MariaDB 10 and Beyond
MariaDB Corporation
 
Server fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil AhujaServer fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil Ahuja
camunda services GmbH
 
Scalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBERScalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBER
Shuyi Chen
 

Similar to High-level architecture of a complete MariaDB deployment (20)

MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
 
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
 
SkySQL MariaDB 云数据组件
SkySQL MariaDB 云数据组件SkySQL MariaDB 云数据组件
SkySQL MariaDB 云数据组件
 
Choosing the right high availability strategy
Choosing the right high availability strategyChoosing the right high availability strategy
Choosing the right high availability strategy
 
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
 
Cassandra Lunch #88: Cadence
Cassandra Lunch #88: CadenceCassandra Lunch #88: Cadence
Cassandra Lunch #88: Cadence
 
Buytaert kris my_sql-pacemaker
Buytaert kris my_sql-pacemakerBuytaert kris my_sql-pacemaker
Buytaert kris my_sql-pacemaker
 
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
 
Microsoft Hekaton
Microsoft HekatonMicrosoft Hekaton
Microsoft Hekaton
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
Interactive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark StreamingInteractive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark Streaming
 
Managing and Visualizing your Replication Topologies with Orchestrator
Managing and Visualizing your Replication Topologies with OrchestratorManaging and Visualizing your Replication Topologies with Orchestrator
Managing and Visualizing your Replication Topologies with Orchestrator
 
EQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdfEQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdf
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
 
MariaDB 10 and Beyond
MariaDB 10 and BeyondMariaDB 10 and Beyond
MariaDB 10 and Beyond
 
Server fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil AhujaServer fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil Ahuja
 
Scalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBERScalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBER
 

More from Federico Razzoli

Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
Webinar - Unleash AI power with MySQL and MindsDB
Webinar - Unleash AI power with MySQL and MindsDBWebinar - Unleash AI power with MySQL and MindsDB
Webinar - Unleash AI power with MySQL and MindsDB
Federico Razzoli
 
MariaDB Security Best Practices
MariaDB Security Best PracticesMariaDB Security Best Practices
MariaDB Security Best Practices
Federico Razzoli
 
A first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
Federico Razzoli
 
MariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improvedMariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improved
Federico Razzoli
 
Webinar - MariaDB Temporal Tables: a demonstration
Webinar - MariaDB Temporal Tables: a demonstrationWebinar - MariaDB Temporal Tables: a demonstration
Webinar - MariaDB Temporal Tables: a demonstration
Federico Razzoli
 
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Federico Razzoli
 
MariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAsMariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAs
Federico Razzoli
 
Recent MariaDB features to learn for a happy life
Recent MariaDB features to learn for a happy lifeRecent MariaDB features to learn for a happy life
Recent MariaDB features to learn for a happy life
Federico Razzoli
 
Advanced MariaDB features that developers love.pdf
Advanced MariaDB features that developers love.pdfAdvanced MariaDB features that developers love.pdf
Advanced MariaDB features that developers love.pdf
Federico Razzoli
 
Automate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with AnsibleAutomate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with Ansible
Federico Razzoli
 
Creating Vagrant development machines with MariaDB
Creating Vagrant development machines with MariaDBCreating Vagrant development machines with MariaDB
Creating Vagrant development machines with MariaDB
Federico Razzoli
 
MariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructuresMariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructures
Federico Razzoli
 
Playing with the CONNECT storage engine
Playing with the CONNECT storage enginePlaying with the CONNECT storage engine
Playing with the CONNECT storage engine
Federico Razzoli
 
MariaDB Temporal Tables
MariaDB Temporal TablesMariaDB Temporal Tables
MariaDB Temporal Tables
Federico Razzoli
 
Database Design most common pitfalls
Database Design most common pitfallsDatabase Design most common pitfalls
Database Design most common pitfalls
Federico Razzoli
 
JSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB DatabasesJSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB Databases
Federico Razzoli
 
How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2
Federico Razzoli
 
MySQL Transaction Isolation Levels (lightning talk)
MySQL Transaction Isolation Levels (lightning talk)MySQL Transaction Isolation Levels (lightning talk)
MySQL Transaction Isolation Levels (lightning talk)
Federico Razzoli
 
Cassandra sharding and consistency (lightning talk)
Cassandra sharding and consistency (lightning talk)Cassandra sharding and consistency (lightning talk)
Cassandra sharding and consistency (lightning talk)
Federico Razzoli
 

More from Federico Razzoli (20)

Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
Webinar - Unleash AI power with MySQL and MindsDB
Webinar - Unleash AI power with MySQL and MindsDBWebinar - Unleash AI power with MySQL and MindsDB
Webinar - Unleash AI power with MySQL and MindsDB
 
MariaDB Security Best Practices
MariaDB Security Best PracticesMariaDB Security Best Practices
MariaDB Security Best Practices
 
A first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
 
MariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improvedMariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improved
 
Webinar - MariaDB Temporal Tables: a demonstration
Webinar - MariaDB Temporal Tables: a demonstrationWebinar - MariaDB Temporal Tables: a demonstration
Webinar - MariaDB Temporal Tables: a demonstration
 
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11
 
MariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAsMariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAs
 
Recent MariaDB features to learn for a happy life
Recent MariaDB features to learn for a happy lifeRecent MariaDB features to learn for a happy life
Recent MariaDB features to learn for a happy life
 
Advanced MariaDB features that developers love.pdf
Advanced MariaDB features that developers love.pdfAdvanced MariaDB features that developers love.pdf
Advanced MariaDB features that developers love.pdf
 
Automate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with AnsibleAutomate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with Ansible
 
Creating Vagrant development machines with MariaDB
Creating Vagrant development machines with MariaDBCreating Vagrant development machines with MariaDB
Creating Vagrant development machines with MariaDB
 
MariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructuresMariaDB, MySQL and Ansible: automating database infrastructures
MariaDB, MySQL and Ansible: automating database infrastructures
 
Playing with the CONNECT storage engine
Playing with the CONNECT storage enginePlaying with the CONNECT storage engine
Playing with the CONNECT storage engine
 
MariaDB Temporal Tables
MariaDB Temporal TablesMariaDB Temporal Tables
MariaDB Temporal Tables
 
Database Design most common pitfalls
Database Design most common pitfallsDatabase Design most common pitfalls
Database Design most common pitfalls
 
JSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB DatabasesJSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB Databases
 
How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2
 
MySQL Transaction Isolation Levels (lightning talk)
MySQL Transaction Isolation Levels (lightning talk)MySQL Transaction Isolation Levels (lightning talk)
MySQL Transaction Isolation Levels (lightning talk)
 
Cassandra sharding and consistency (lightning talk)
Cassandra sharding and consistency (lightning talk)Cassandra sharding and consistency (lightning talk)
Cassandra sharding and consistency (lightning talk)
 

Recently uploaded

How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 

Recently uploaded (20)

How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 

High-level architecture of a complete MariaDB deployment

  • 1. High-level architecture of a complete MariaDB setup
  • 3. A production deployment should include: ● MariaDB itself ● High Availability / Redundancy ● Delayed replica ● Automated backups and backup testing ● Monitoring ● Automation / gitops What is a complete production deployment?
  • 5. ● System: ○ Linux or *BSD ○ Have enough memory and at least 2 CPU cores ○ Prefer SSD storage ○ (Xfs or ext4 + LVM) or ZFS ● I don't recommend containers Any cloud platform that provides bare systems will be fine Where should MariaDB run?
  • 7. MariaDB doesn't know how to read or write data, indexes, caches, run transactions… All these operations are delegated to a special plugin type called the storage engines The default is InnoDB What is a complete production deployment?
  • 8. Other notable storage engines include: ● CONNECT ● S3 ● SPIDER ● RocksDB ● ColumnStore What is a complete production deployment?
  • 9. Notable plugins: ● User statistics ● On staging: SQL error log What is a complete production deployment?
  • 11. High Availability and Redundancy are achieved by Replication Which can be of the following types: ● Synchronous or asynchronous ● Single master or multi-master High Availability & Scalability
  • 12. MariaDB replication can be: ● Asynchronous replication ● Semi-sync replication ● Galera cluster High Availability & Scalability
  • 13. Asynchronous replication: ● Writes on the master (events) are logged into the binary log ● The binary log is read and sent to the replicas ● The replicas receive it and write the relay log ● The relay log events are applies to the data ○ In parallel ● Replicas can be used to scale reads, but the lag should be monitored ● GTID allows master failover is possible High Availability & Scalability
  • 14. Delayed replication: ● Asynchronous replication can be configured to be delayed ● Eg: 1 hour, 1 day ● If an SQL statements destroys data on the master, you can use the delayed replica to recover data High Availability & Scalability
  • 15. Semi-sync replication: ● Similar to asynchronous replication ● But when a client makes a change to the data: ○ The master waits until at least 1 replica has logged the event into the binary log ○ Then it returns success to the client ● This means that semisync replication makes writes slower ● And if all replicas crash, the master won't accept data writes High Availability & Scalability
  • 16. Galera is virtually synchronous replication ● Each transaction needs be certified by the majority of nodes before it is applied to any node ● Number of nodes should be odd ● Data conflicts lead to failed transactions and potentially node eviction ● Don't use multiple masters ● Large transactions should be avoided ● AUTO_INCREMENT id's are not necessarily in chronological order ● A node slowdown slows down the cluster High Availability & Scalability
  • 17. ● Galera nodes can have replicas to scale reads without affecting writes ● A Galera node can be the master of a node of another cluster ● In this way you can have a secondary cluster High Availability & Scalability
  • 20. Proxies are needed to: ● Only send queries to working servers ● Only send writes to the master(s), send reads to replicas ● Distribute the reads more or less equally amongst replicas Proxy layer
  • 21. Why not doing this in the application? ● DBAs would need to update app configuration when the list of servers changes ● Proxies are complex pieces of software, they know their stuff ● They also have advanced features that the application can't have, like connections multiplexing Proxy layer
  • 22. Main existing proxies: ● ProxySQL ● MaxScale ● HAProxy Proxy layer
  • 23. ● Proxies can form an independent layer ● Or each app server can run a different proxy ● …or both ● In all cases, proxies can crash. Make sure you have multiple proxies Proxy layer
  • 27. ● Proxies send queries to running MariaDB instances ● But proxies can fail too, like any other technology ● Application should only connect to running proxies Service discovery
  • 28. Solutions: ● Hashicorp Consul ● Kubernetes ● Cloud vendor-specific solutions Service discovery
  • 31. You need to backup: ● Configuration ● Data If you use gitops configuration can always be recreated We'll focus on data Backups
  • 32. For proper resilience: ● Automate backups ● Automatically test backups ● Have multiple backup strategies ● Have incremental backups Also, archive and rotate backups Backups
  • 33. Main backup tools / methods: ● Snapshots ● Mariabackup ● mariadb-dump ● Binary log Backups
  • 34. Snapshots can be taken at several levels: ● LVM ● Filesystem (ZFS) ● VM Make sure to only include data in your snapshots Snapshots are not copies, they are taken instantaneously They can be incremental Backups
  • 35. Mariabackup: ● Takes a copy of the files ● (Almost) no locks are taken ● Uses InnoDB transaction logs to bring the data to a consistent state ○ Ie: undo transactions committed after the copy started Backups
  • 36. mariadb-dump: ● Writes all the SQL statement needed to recreate the database ● Slowest backup method, slowest recovery method ● Historically single-threaded ● Uses a long transaction ● But backups can be restored on any MariaDB version Backups
  • 37. Binary log: ● Contains events: binary changes to the rows, or SQL statements and GTIDs Can be analysed by a human with mariadb-binlog ● It should be periodically be copied to elsewhere ● When you restore a complete backup, check the latest GTID ● Then apply the binlog starting from the next GTID Backups
  • 39. A good, well-configured monitoring system: ● Shows detailed metrics about MariaDB performance ● Allows easy customisations ● Sends meaningful, non-redundant warnings ● Sends actionable, critical alerts Monitoring
  • 40. ● Best ready-made solution: PMM ○ Includes query analysis Some monitoring systems have templates for MariaDB or MySQL You can also build your own solution with Prometheus + Grafana For query analysis: ELK stack ● You can also use a solution for monitoring an application and DB response times Monitoring