Repolode
maxpert

maxpert/marmot

A leaderless, distributed SQLite replication server that accepts writes on any node and speaks the MySQL wire protocol.

Open-source alternative to:CockroachDBAmazon Aurora

Stars
2,823
Forks
81
Open issues
39
Last commit
20 days ago

What is it?

Marmot is a distributed SQLite server written in Go. Any node in a cluster can accept writes, so there is no single primary to fail over. Nodes exchange changes through a gossip protocol, and each write is coordinated with a two-phase commit at a configurable consistency level (ONE, QUORUM, or ALL). Conflicts on the same row are resolved with last-write-wins on a hybrid logical clock timestamp.

Clients connect over the MySQL protocol, so existing drivers, ORMs and GUI tools such as DBeaver or MySQL Workbench can be used without changes. The project lists WordPress as a supported application and includes a three-node example cluster. Replication is row-level change data capture rather than SQL statement replay, and DDL statements are replicated with a cluster-wide lock and rewritten to be idempotent. Changes can also be published to Kafka or NATS in Debezium-compatible JSON.

The project also includes a built-in vector search layer using IVF/PQ indexes stored next to each node's SQLite file, and a read-only replica mode for edge deployments.

Key features

  • 01Any node accepts writes, with no leader election or failover step.
  • 02Speaks the MySQL wire protocol, so standard MySQL clients and drivers work.
  • 03Replicates row-level changes with a two-phase commit and tunable consistency.
  • 04Replicates DDL with cluster-wide locking and automatic idempotent rewriting.
  • 05Publishes change events to Kafka or NATS in Debezium-compatible format.
  • 06Provides built-in vector search with SQL functions for filtered similarity queries.

Use cases

  • Running a multi-region WordPress site backed by a replicated database.
  • Keeping regional read replicas of configuration or product catalog data at the edge.
  • Building a small RAG store that combines embeddings with ordinary SQL filters.
  • Streaming database changes into Kafka or NATS for downstream pipelines.

Quick start

  1. 1

    Start a single-node cluster

    ./marmot-v2
  2. 2

    Connect with a MySQL client

    mysql -h localhost -P 3306 -u root

Things to know

  • Offers eventual consistency, not strong serializability.
  • Every node holds a full copy of all data, so it suits smaller datasets rather than very large ones (over 100GB).
  • Concurrent DDL on the same database from multiple nodes is not supported, and ALTER TABLE is less safe to replay.
  • Media files such as uploads are not replicated and need separate shared storage.

Topics

FAQ

What is marmot?
A leaderless, distributed SQLite replication server that accepts writes on any node and speaks the MySQL wire protocol. Marmot is a distributed SQLite server written in Go. Any node in a cluster can accept writes, so there is no single primary to fail over. Nodes exchange changes through a gossip protocol, and each write is coordinated with a two-phase commit at a configurable consistency level (ONE, QUORUM, or ALL). Conflicts on the same row are resolved with last-write-wins on a hybrid logical clock timestamp.
Is marmot free to use? What license does it have?
marmot is open source under the MIT license. Check the license terms before using it in commercial products.
Is marmot still maintained?
Actively maintained. The last commit to marmot was on Sep 30, 2026.
What can I use marmot for?
Running a multi-region WordPress site backed by a replicated database. Keeping regional read replicas of configuration or product catalog data at the edge. Building a small RAG store that combines embeddings with ordinary SQL filters. Streaming database changes into Kafka or NATS for downstream pipelines.
How do I install marmot?
Start a single-node cluster: ./marmot-v2 Connect with a MySQL client: mysql -h localhost -P 3306 -u root
Where can I get marmot?
The source code and installation instructions are on GitHub: https://github.com/maxpert/marmot

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects