3 ms·
Can Cockroach be plugged into a Rails app where mysql was? I'd be interested in hearing: - the backup story - the replication/failover story - horizontal sc
by ericb 9y ago
Can Cockroach be plugged into a Rails app where mysql was?
I'd be interested in hearing:
- the backup story
- the replication/failover story
- horizontal scaling story (is it plug and play)
- irfansharif 9y agoNot mysql, but we've tested and recommend the Ruby pg driver and the ActiveRecord ORM[1] (CockroachDB supports the PostgreSQL wire protocol). It should be 'plug and play' insofar as you simply point to any node in the running cluster when setting up ActiveRecord::Base.establish_connection. As for our backup story, our doc page[2] on the subject should shed more details. [1]: https://www.cockroachlabs.com/docs/build-a-ruby-app-with-cockroachdb-activerecord.html https://www.cockroachlabs.com/docs/build-a-ruby-app-with-coc... [2]: https://www.cockroachlabs.com/docs/backup.html https://www.cockroachlabs.com/docs/backup.html
- arjunnarayan 9y agoI have ported a MySQL-based ActiveRecord Rails app that was somewhat complicated to Postgres, and then on to CockroachDB. It works pretty well, so I'd give it a go. We're also committed to supporting ActiveRecord via the Postgres connector, so if you run into any bugs, we would do our best to fix them. I am personally invested in ActiveRecord support myself. At this point ORM support on CockroachDB is driven mostly by usage so please try it! Your other questions are better answered on the blog post, but quickly: * CockroachDB core comes with a `dump` command to backup your databases. CockroachDB Enterprise has blazingly fast _incremental_ cloud backup and restore, the kind that you might want for a very large deployment. * Replication is managed under the hood by sharding the data into many ranges that are each 64mb in size. Each range is replicated using Raft, and if a node goes down, the other replicas scattered across the cluster seamlessly take over and upreplicate a new replica to "heal" the cluster. * The horizontal scaling is indeed plug and play - just add more nodes to the cluster and they'll automatically rebalance replicas across the cluster with no downtime and no additional configuration.