OceanBase: a Paxos-based distributed SQL database you can start with two commands
OceanBase is the unified distributed database for the AI era — open-source, multi-model, one engine for your most demanding workloads.
At a glance
- What is it?
- OceanBase is an Apache-2.0 distributed relational database from Ant Group, MySQL-compatible and aimed at HTAP workloads. Here is what the repository documents, how to get a demo instance running, and where the approach stops making sense.
- Who is it for?
- Adopt OceanBase if you need a MySQL-compatible distributed database with Paxos-based replication and you are willing to accept a single-writer-per-partition model and a C++ build path. Do not adopt it if you want a small embedded database, a pure analytics warehouse, or a system you can patch by editing a config file and restarting.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What OceanBase is, and who the repository is written for
OceanBase is a distributed relational database developed entirely by Ant Group, according to the README. It is built on a common server cluster and uses the Paxos protocol plus a distributed structure to provide high availability and linear scalability. The README states the database is not dependent on specific hardware architectures.
The audience is not the hobbyist running SQLite on a laptop. The README's headline figures describe a cluster scale of 1,500 nodes, PB data and a trillion rows in one cluster, with RPO = 0 and RTO < 8s. Those are numbers for teams replacing a sharded MySQL estate or a commercial distributed database, not for someone who wants a single-file store. The topics list on the repository adds analytics, cloud-native, HTAP, fulltext, vector and vector-search, so the project is also positioning itself toward AI-adjacent workloads, though the README body does not explain the vector features in any depth. That gap matters: the topic tags promise more than the README documents.
The primary language is C++, and the repository layout confirms this is a compiled system: CMakeLists.txt, build.sh, cmake/, deps/, src/, unittest/, mittest/. There is no interpreted runtime to drop in. That single fact shapes the entire adoption story.
How the Paxos layer and the tenant model fit together
The mechanism the README names is Paxos. Replicas of data agree on an ordered log through the protocol, which is what produces the RPO = 0 claim: a committed write is on a quorum before it is acknowledged. RTO < 8s is the recovery side of the same design, the time for the remaining replicas to elect and resume.
What the README does not spell out is the tenant model that most operational documentation for OceanBase describes. The Docker quick start connects as the root user of the sys tenant, which is a strong hint that the system separates a system tenant from user tenants. If you have only read this README, treat the tenant topology as something to confirm in the linked architecture document rather than something you can infer from the quick start alone.
The HTAP claim is the other structural choice. The README says real-time analytics are supported "without additional cost", which in a distributed SQL engine normally means one storage format serving both row-oriented transaction access and column-oriented scan access. The README does not describe that storage format. It also does not describe how the fulltext and vector search topics are implemented. Those are the three areas where a reader should go to the linked documentation before making an architectural decision, because the README asserts the capability without showing the machinery.
Installing OceanBase with the all-in-one package
The README gives two fast paths. The all-in-one path is Linux only, and the README marks that constraint explicitly. The first command downloads and runs an installer script from an Alibaba Cloud OSS bucket, which means an internet connection is required and you are executing a remote script. The second command sources the environment file the installer wrote, and the third deploys a demo instance.
bash -c "$(curl -s https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/oceanbase-all-in-one/installer.sh)"
source ~/.oceanbase-all-in-one/bin/env.sh
obd demoAfter `obd demo` completes, the README does not print a connection string for this path; it points to the Quick experience document instead. If you want to see the instance immediately, the Docker path below gives you the port and the client command in one place. The all-in-one route is the better fit when you want the deployment tooling (`obd`) available on the host for later cluster work, because that is what the installer puts on disk.
Starting a mini instance with Docker and connecting with obclient
The Docker path is the shortest route to a running instance. The README publishes images on Docker Hub, quay.io and ghcr.io, and notes that if pulling from Docker Hub fails you should try the other two registries. The run command maps port 2881, names the container, sets MODE=mini and detaches.
docker run -p 2881:2881 --name oceanbase-ce -e MODE=mini -d oceanbase/oceanbase-ceThe README shows the same command with the quay.io and ghcr.io image names commented out, so the registry is a one-token change. Once the container is up, the client is already inside it:
docker exec -it oceanbase-ce obclient -h127.0.0.1 -P2881 -urootThe README comments that this connects to the root user of the sys tenant. Note what is absent. There is no password in the command, and the README does not discuss what credentials the mini image ships with or whether they should be changed. For a local evaluation that is fine. For anything reachable from a network, treating that command as a deployment recipe would be a mistake, and the README does not warn you about it.
The third path is Kubernetes, through ob-operator, with the quick start hosted at oceanbase.github.io/ob-operator. The README delegates entirely to that document, so there is nothing here to evaluate about the operator itself.
Where OceanBase is the wrong choice
The first limitation is the one the README states outright: the all-in-one installer is Linux only. If your team develops on macOS or Windows, the fast path is closed and Docker becomes your only documented option.
The second is the build path. The repository is C++ with CMake, a deps/ directory and a build.sh. The README points developers at a separate build-and-run document rather than including build steps. Compiling a distributed database from source is a different order of effort from `pip install`, and nothing in the README suggests a supported prebuilt binary distribution for arbitrary platforms beyond the container images.
The third is the nature of the product. A Paxos-replicated distributed database is the wrong tool when your data fits comfortably on one machine and your availability requirement is satisfied by a single node with backups. The coordination, the quorum, and the operational surface all cost something, and the README offers no small-footprint mode beyond the mini container, which is described as a deployment for experience rather than production.
Finally, the README's performance claims (TPC-C 707 million tmpC, TPC-H 15.26 million QphH @30000GB) are stated without the hardware, cluster size or tuning context in the README itself. Treat them as vendor-published results to be reproduced on your own workload, not as a property of the software you will get.
OceanBase against TiDB and CockroachDB
The comparisons people search for are OceanBase vs TiDB, vs CockroachDB, vs MySQL, vs PostgreSQL, vs Oracle and vs ClickHouse. The repository does not contain a comparison page, so the only honest comparison is the one the README supports.
Against MySQL, the README claims MySQL compatibility and says migration is easy. That is the project's own framing, and the practical question is which SQL surface, which system variables, and which client protocol behaviours are covered. The README does not quantify compatibility, so the only way to answer it is to run your own schema and queries against the mini container.
Against TiDB and CockroachDB, the shared idea is a distributed SQL layer with replication underneath. The README names Paxos specifically; CockroachDB's public design is also built on a consensus protocol of that family, while TiDB separates a stateless SQL layer from a separate storage layer. OceanBase's README describes a single database with a distributed structure rather than a split SQL and storage tier. That is a real architectural difference in how you operate the system, even though this README does not go into deployment topology.
Against ClickHouse, the difference is categorical. ClickHouse is an analytical column store. OceanBase claims HTAP, meaning it intends to serve transactional and analytical queries from one engine. If your workload is purely analytical and you have no transactional requirement, the transactional machinery in OceanBase is overhead you are paying for nothing.
Maintenance, releases and the licence you actually get
The repository is not archived, and the last push was on 2026-09-15. Recent releases listed are v4.4.2_CE_BP3 on 2026-09-15, v5.0.1_CE on 2026-08-10 and v4.4.2_CE_BP2 on 2026-07-21. The naming tells you something about the upgrade model: there is a 5.0 line and a 4.4.2 line receiving backports (the BP suffix), so you should expect to choose between tracking a major line and taking patch releases on a stable one. The README does not document an upgrade procedure, a downgrade path, or rollback, and it does not state a support window for either line. That is the largest maintenance unknown in the repository.
Licensing is Apache-2.0, stated in the README and present as a LICENSE file at the repository root. The repository also ships a NOTICE file and a replace_license.py script. Apache-2.0 permits commercial use and modification with the usual conditions around notices and attribution. This article is not legal advice; read LICENSE and NOTICE yourself and have counsel review them if you plan to redistribute a modified build, because the NOTICE file can carry attribution requirements that are easy to overlook.
For upgrade cost, the concrete thing you can act on is the release cadence: three releases between 2026-07-21 and 2026-09-15. If you adopt the 4.4.2_CE line, budget for backport releases arriving on that kind of schedule.
Editorial conclusion
Adopt OceanBase if you need a MySQL-compatible distributed database with Paxos-based replication and you are willing to accept a single-writer-per-partition model and a C++ build path. Do not adopt it if you want a small embedded database, a pure analytics warehouse, or a system you can patch by editing a config file and restarting. Before committing, verify three things: that your application's SQL actually passes against the MySQL compatibility layer, that the deployment mode you pick (all-in-one demo, Docker mini, or Kubernetes via ob-operator) matches the availability target you are promising, and that you have read the Apache-2.0 LICENSE and NOTICE files yourself, because the repository ships both and they are not the same document.
Frequently asked questions
What is OceanBase?
OceanBase is a distributed relational database developed entirely by Ant Group, built on a common server cluster and using the Paxos protocol for high availability and linear scalability, according to the README. It is written primarily in C++ and licensed under Apache-2.0.
Is OceanBase open source?
Yes. The repository is public, the README states the database is licensed under the Apache License, Version 2.0, and a LICENSE file is present at the repository root alongside a NOTICE file.
Is OceanBase free?
The source code is available under Apache-2.0, which permits commercial use under the licence conditions. The README does not describe any paid tier, so cost questions beyond the licence itself are not answered by the repository.
What does OceanBase do?
It provides a distributed relational database with Paxos-based replication, MySQL compatibility, HTAP analytics and horizontal scalability. The README lists RPO = 0 and RTO < 8s among its availability characteristics.
Community notes