Distributed MySQL databases with MRSK #106
Replies: 3 comments 3 replies
-
Planet Scale seems like a good option as well - it is a managed serverless mechanism on top of Vitess, which is an ultra scalable MySQL compatible database. Their free tier seems exceptionally generous, and the Scaler tier is cheap as well. Extra GBs, requests etc... are also very cheap. Perhaps of most interest to folks here, they have docs for connecting a Rails app |
Beta Was this translation helpful? Give feedback.
-
If you go fully self-hosted, I'd recommend keeping it as operationally simple as you can manage. For new apps and products just getting off the ground, focus on disaster recovery—incremental backup/restore with binlogs—rather than HA and replication. Solid backups cover the key risks that can otherwise entice devs into sophisticated and time/expertise/$$-costly HA setups that drain product focus. Then you're free to introduce a replica db later on when it'll be driven by lower-stakes concerns like improving app performance or implementing zero-downtime db migrations/upgrades. Going straight to PlanetScale is certainly attractive, especially for mature apps migrating off managed cloud DBs. Worth giving self-hosted a try, though! It's less scary than it looks, the experience pays off, and the db performance you'll achieve with modern commodity hardware is utterly mind-blowing compared to cloud dbs. |
Beta Was this translation helpful? Give feedback.
-
For the Stateful data, we plan to use https://github.com/reclaim-the-stack/get-started, and Talos Linux for a pretty stable k8s cluster to deploy a HA PostgreSQL (Crunchy PGO, CloudNative PG or Percona operators), or if you want to use MySQL, there is the Vitess operator. We will use Spotahome or Opstree operators for our Redis database. I hope MRSK will provide a complete escape from K8s so we don't have to rely on K8s for the database needs. For SQLite route, here is a very good article that shows how to use SQLITE and Litestream, however, I'm not sure how this works if you are using multiple hosts. |
Beta Was this translation helpful? Give feedback.
-
One of my biggest preoccupations for moving off-cloud is what to do about a HA/distributed database. The cloud providers all have managed solutions for this, but self-hosting appears to be more challenging.
There's the traditional options like Galera.
There's also things like Vitess, which is compatible with MySQL. But seems to be kubernetes-first.
Finally, you could always go the SQLite route, with primary options for replication being rqlite, dqlite, litefs and bedrockdb.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions