Adding Context to CockroachDB’s Article “Your Database Should Work Like a CDN”
My problem with CockroachDB comes down to two major issues:<p>1. I need a read slave. With MariaDB Galera, I can slave a database of a local master, but Cockroach AFAIK can only do master master. Adding another node to a cluster that will just be read from seems like a lot of unneeded overhead, and can cause massive issues if there are sync issues.<p>2. WAN sucks. Where I work, I&#x27;ve seen mysql slaves get hours out of sync due to packet loss. With a centralized system, I don&#x27;t have to worry about reconciling data. If every site can accept data, then I have to assume that every site will remain in sync. If Site 1 gets out of sync and&#x2F;or stops transmitting data, another site could make further changes to the record in question causing issues. Some places this is perfectly fine, but dealing with transactions of counting clicks, I do not want to be dropping data or running into conflicts.<p>&gt; Sharded Relational databases come in many shapes and suffer from as many different types of ailments when deployed across regions: some sacrifice replication and availability for consistency, some do the opposite.<p>I think this is a great point. You have to know what your database is doing, and how it does that. It seems to becoming more common for people to develop on something without know how it works; just to get bitten down the road. Any problem is going to get exasperated when you introduce it to the wonderful world of WAN.<p>I&#x27;m not ragging on the product; it&#x27;s a great good enough product for most use cases. I just more wanted to share my thoughts. If you can tolerate partial consistency, go for it. It a great run and done product.<p>&gt; Only companies with very sophisticated operations teams can seriously set an SLA for five nines. It’s doable, but comes with a heavy lift if your service is doing anything non-trivial. It’s certainly not the default position among the industry as far as I can tell.<p>Five 9s is do-able for a small group of you work from the ground up (infrastructure to application). Dual site Postgres Citus with a slave coming off the Citus cluster, sitting in-front of a pgpool-II load balancer. Then replicate a slave out to each site you are running in the world. If you are running an API out there, use rabbitmq or kafka to relay transactions back to one of the sites or accept the latency and run raw commands over the wire.<p>Five 9s when you are trying to drop in a solution is extremely hard, so I give a major kudos of CockroachDB for making that reachable with a drop in solution.