IndexedDB, a large-scale, NoSQL storage system that allows storage of just about anything in your browser. In terms of security, it’s important to point out that IndexedDB lives inside your browser (Chrome, Safari, Firefox, etc) in a sandboxed protected environment.
SurrealDB first serialises both keys and values into a Uint8Array, utilising IndexedDB as a binary key-value store. This offers good performance, and the ability to use the features that SurrealDB offers when running in alternative ways.
SurrealDB is easy to install and run, whether you are running everything on your laptop, on an IoT device or as a single-node server in the cloud.
You’ll find installation and running instructions for Linux, macOS, Windows and Docker in our documentation, where you can install and run SurrealDB with one command each.
The storage engines you can choose between are RocksDB (default) and SurrealKV.
RocksDB
SurrealKV
For highly-available and highly-scalable setups, SurrealDB can be run on top of a TiKV cluster (default) or a FoundationDB cluster, with the ability to horizontally scale to 100+ terabytes of data.
TiKV
FoundationDB
The highly-available deployment of your storage layer (TiKV, or FoundationDB) is the stateful part of the system. SurrealDB clusters do not have state. Any necessary communication is either avoided by design, or communicated via the storage layer which maintains consistency.
This makes deploying SurrealDB really convenient, since your fault tolerance is equal to the number of replicas (minus 1, the bare minimum number of instances). Even though we do have bootstrapping, by design, nodes can come and go as they please without much interference.
You can see the details of how to run a multi-node cluster and deploy it in our documentation.
We’ve covered quite a lot, and as we’ve seen, SurrealDB was designed from the start to have unparalleled deployment flexibility, ranging from embedded devices to distributed multi-node clusters and even embedded directly in your website using WebAssembly (WASM).
If you want the power and flexibility of SurrealDB without the pain of managing infrastructure, sign up for Surreal Cloud for a fully managed solution where you can focus on building your application, and we’ll take care of the rest.