StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Stackups
  2. Application & Data
  3. Databases
  4. Databases
  5. CockroachDB vs MariaDB

CockroachDB vs MariaDB

OverviewDecisionsComparisonAlternatives

Overview

MariaDB
MariaDB
Stacks16.5K
Followers12.8K
Votes468
GitHub Stars6.6K
Forks1.9K
CockroachDB
CockroachDB
Stacks216
Followers341
Votes0

CockroachDB vs MariaDB: What are the differences?

Introduction

CockroachDB and MariaDB are two popular relational database management systems (RDBMS) that are used for storing and managing data. While they share some similarities, there are key differences between them that make them suitable for different use cases. This article will explore the main differences between CockroachDB and MariaDB.

  1. Architecture: CockroachDB is a distributed SQL database that offers automatic data replication and distribution across multiple nodes, allowing for high scalability and fault tolerance. On the other hand, MariaDB follows a traditional master-slave architecture where data is stored and replicated on separate nodes.

  2. Consistency: CockroachDB uses a distributed consensus protocol called Raft to ensure strong consistency across the distributed database. This means that every read operation will return the most recent committed value. In contrast, MariaDB uses asynchronous replication, which can potentially lead to eventual consistency, where reads may return slightly outdated data.

  3. Scaling: CockroachDB is designed to scale horizontally by adding more nodes to the cluster, allowing it to handle increasing workloads. It automatically distributes data across multiple nodes, optimizing performance. MariaDB, on the other hand, scales vertically by adding more resources (such as CPU or RAM) to a single machine or by using replication to offload some of the workload to other machines.

  4. Fault Tolerance: CockroachDB offers built-in fault tolerance by replicating data across multiple nodes, ensuring that even if some nodes fail, the database remains available. It automatically handles data rebalancing and failover. MariaDB also supports replication for fault tolerance, but it requires manual configuration and management of replicas.

  5. SQL Compatibility: CockroachDB is compatible with the PostgreSQL wire protocol, which allows it to work seamlessly with PostgreSQL client libraries and tools. MariaDB is a fork of MySQL and is compatible with MySQL's wire protocol, providing compatibility with existing MySQL applications.

  6. Consistency Models: CockroachDB offers both serializable and snapshot isolation levels, allowing developers to choose the level of consistency required for their application. MariaDB supports various isolation levels, including read committed, repeatable read, and serializable, but it does not offer snapshot isolation.

In Summary, CockroachDB is a distributed SQL database with automatic data replication and fault tolerance, strong consistency, horizontal scaling, PostgreSQL compatibility, and support for multiple consistency models. In contrast, MariaDB follows a traditional master-slave architecture, uses asynchronous replication for fault tolerance, supports MySQL compatibility, and offers a range of isolation levels.

Share your Stack

Help developers discover the tools you use. Get visibility for your team's tech choices and contribute to the community's knowledge.

View Docs
CLI (Node.js)
or
Manual

Advice on MariaDB, CockroachDB

Maxim
Maxim

student at USI

Aug 25, 2020

Needs adviceonNode.jsNode.jsMongooseMongoosePostgreSQLPostgreSQL

Hi all. I am an informatics student, and I need to realise a simple website for my friend. I am planning to realise the website using Node.js and Mongoose, since I have already done a project using these technologies. I also know SQL, and I have used PostgreSQL and MySQL previously.

The website will show a possible travel destination and local transportation. The database is used to store information about traveling, so only admin will manage the content (especially photos). While clients will see the content uploaded by the admin. I am planning to use Mongoose because it is very simple and efficient for this project. Please give me your opinion about this choice.

321k views321k
Comments
Omran
Omran

CTO & Co-founder at Bonton Connect

Jun 19, 2020

Needs advice

We actually use both Mongo and SQL databases in production. Mongo excels in both speed and developer friendliness when it comes to geospatial data and queries on the geospatial data, but we also like ACID compliance hence most of our other data (except on-site logs) are stored in a SQL Database (MariaDB for now)

582k views582k
Comments

Detailed Comparison

MariaDB
MariaDB
CockroachDB
CockroachDB

Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry. MariaDB is designed as a drop-in replacement of MySQL(R) with more features, new storage engines, fewer bugs, and better performance.

CockroachDB is distributed SQL database that can be deployed in serverless, dedicated, or on-prem. Elastic scale, multi-active availability for resilience, and low latency performance.

Replication;Insert Delayed;Events;Dynamic;Columns;Full-text;Search;GIS;Locale;Settings;subqueries;Timezones;Triggers;XML;Functions;Views;SSL;Show Profile
sql; high availability; fast; acid;
Statistics
GitHub Stars
6.6K
GitHub Stars
-
GitHub Forks
1.9K
GitHub Forks
-
Stacks
16.5K
Stacks
216
Followers
12.8K
Followers
341
Votes
468
Votes
0
Pros & Cons
Pros
  • 149
    Drop-in mysql replacement
  • 100
    Great performance
  • 74
    Open source
  • 55
    Free
  • 44
    Easy setup
No community feedback yet

What are some alternatives to MariaDB, CockroachDB?

MongoDB

MongoDB

MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.

MySQL

MySQL

The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.

PostgreSQL

PostgreSQL

PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions.

Microsoft SQL Server

Microsoft SQL Server

Microsoft® SQL Server is a database management and analysis system for e-commerce, line-of-business, and data warehousing solutions.

SQLite

SQLite

SQLite is an embedded SQL database engine. Unlike most other SQL databases, SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file.

Cassandra

Cassandra

Partitioning means that Cassandra can distribute your data across multiple machines in an application-transparent matter. Cassandra will automatically repartition as machines are added and removed from the cluster. Row store means that like relational databases, Cassandra organizes data by rows and columns. The Cassandra Query Language (CQL) is a close relative of SQL.

Memcached

Memcached

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

RethinkDB

RethinkDB

RethinkDB is built to store JSON documents, and scale to multiple machines with very little effort. It has a pleasant query language that supports really useful queries like table joins and group by, and is easy to setup and learn.

ArangoDB

ArangoDB

A distributed free and open-source database with a flexible data model for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.

InfluxDB

InfluxDB

InfluxDB is a scalable datastore for metrics, events, and real-time analytics. It has a built-in HTTP API so you don't have to write any server side code to get up and running. InfluxDB is designed to be scalable, simple to install and manage, and fast to get data in and out.

Related Comparisons

Bootstrap
Materialize

Bootstrap vs Materialize

Laravel
Django

Django vs Laravel vs Node.js

Bootstrap
Foundation

Bootstrap vs Foundation vs Material UI

Node.js
Spring Boot

Node.js vs Spring-Boot

Liquibase
Flyway

Flyway vs Liquibase