SurrealDB 4: the next major release of the database

Open original

SurrealDB 4 is a database engine that runs two ways: as serverless instances on Cloudflare (SurrealDB Earth) and as multi-node clusters over object storage (SurrealDS). The release is pitched on speed, durability, and compatibility with Postgres, MySQL, and MongoDB clients.

  • Benchmarks claim indexed queries run 22x faster than 3.x, full-table scans 2.3x faster, and basic CRUD operations 42% faster, measured with crud-bench on the same hardware.
  • Writes on SurrealDS are acknowledged only after being stored in two separate zones, and a new node recovers from the surviving copy.
  • Existing PostgreSQL, MySQL, and MongoDB clients can query the same records as SurrealQL through one query planner.

SurrealDB 4 is the core engine, and the company offers it in two deployment shapes. SurrealDB Earth runs it serverless on Cloudflare, with one isolated database per agent and thousands of instances, each able to scale to zero when idle. SurrealDS runs it on clusters over object storage, where each write is acknowledged only after landing on disks in two zones under the default policy. The headline performance claims are a 22x speedup on indexed queries versus 3.x, 2.3x on full-table scans, and 42% faster creates, reads, updates and deletes, all measured with crud-bench on identical hardware. Earth is claimed to handle more than 10 billion peak rows per second, fully transactional. Those are vendor numbers, so the sensible move is to reproduce crud-bench on your own workload before trusting them. The reliability and compatibility pitches are where the practical interest lies. The article says SurrealDB 4 includes more than 240 fixes over 3.x, with a test suite of over 4,500 files, and that SurrealDS copies each write across failure domains so a new node can recover from the surviving copy. On compatibility, PostgreSQL and MySQL clients, plus code written against the MongoDB driver, can read the same records as SurrealQL through one query planner. The examples show a Postgres-style JOIN over graph edge tables (`bought b ON b.in = p.id`) and a Mongo-style `find` with `$gt`, which suggests SurrealDB is betting that teams can migrate incrementally rather than rewrite. How complete that wire-level compatibility is in practice, especially for less common SQL features and driver edge cases, is not something the page quantifies. The pitch is aimed squarely at AI agent workloads: one database per agent, thousands of agents, or shared clusters for large platforms, with a built-in agent memory layer and an MCP server so models can query the database directly. The only customer evidence is a single quote from a VP of Engineering at a company called Later, plus logo names like Samsung, Nvidia, Verizon, Tencent and Walmart with no detail on what they run. Upgrading from 3.x is presented as keeping every existing record readable, and the engine runs embedded, on a laptop, in the browser, or in the cloud. If you're weighing it, the questions worth answering are how the per-agent isolation pricing works at thousands of instances and what the upgrade path costs in practice.

Ask about this article