examples/surrealdb_tikv_prod
2025-06-14 03:50:35 +03:00
..
deploy_db.sh added Apache 2.0 license 2025-06-14 03:50:35 +03:00
deploy_nodes.sh added Apache 2.0 license 2025-06-14 03:50:35 +03:00
prepare_bastion.sh added Apache 2.0 license 2025-06-14 03:50:35 +03:00
prod_cluster.yaml added Apache 2.0 license 2025-06-14 03:50:35 +03:00
README.md added Apache 2.0 license 2025-06-14 03:50:35 +03:00
staging_cluster.yaml added Apache 2.0 license 2025-06-14 03:50:35 +03:00
surrealdb.service network overlay and production surrealdb setup 2025-06-05 15:11:40 +03:00

Production SurrealDB setup with TiKV

This repo uses the WireGuard Overlay under the hood to protect the DataBase nodes, as TLS is not fully supported for SurrealDB + TiKV. We are using this setup internally for the contract platform called "The Brain".

TiKV is a distributed Key-Value database. SurrealDB is a database that offers an SQL-like syntax to manage data saved in a production-grade TiKV cluster. This respository will deploy two clusters, one for testing and one for production. Each cluster has its own monitoring node. The cluster gets deployed by the bastion node. As a result, the following nodes get created:

  • bastion-brain
  • prod-brain-1
  • prod-brain-2
  • prod-brain-3
  • prod-brain-mon
  • staging-brain-1
  • staging-brain-2
  • staging-brain-3
  • staging-brain-mon

Feel free to change the naming if you are deploying a similar setup for your own purposes.

Considering the database cluster lives on top of an encrypted network overlay, internal communication is protected by WireGuard from outside attacks. In order to access the cluster, feel free to create a secondary WireGuard VPN connection from your own Laptop to the cluster.

For any questions, don't hesitate to join us on Discord.