If I were building a new startup in 2023, I would need a mountain of evidence against using Spanner. It's ugly that it locks you into GCP but hey an iPhone locks you into Apple's ecosystem, that's just the price you pay to get good things.
* unless you need timeseries, columnar, FTS, geospatial, graph or something special like that
Spanner is very expensive even compared to hosted cockroach and RDS (Aurora). That being said I’m sure if you're enterprise it's substantially cheaper.
Spanner generally is about twice the cost as cockroach which seems cheap but the gap in nominal cost only grows with usage.
The other issue is that since there’s no source to self host you also have to pay, unlike cockroach.
Generally with cockroach I’d expect one to self host all instances except a staging/pre-pod and prod. With Spanner all your instances necessarily will be hosted, which means $$.
That being all sad, Spanner is worth it if money isn’t an issue
Back of napkin math I did a couple of months ago: Spanner costs about $1/month for 2 writes/second and 10 reads/second. The minimum is $88 which is 176wps and 880rps. If your startup gets more traffic than that, you have good problems. The simplified guarantee model (fully linearizable and serializable everything; automagic sharding, replication and failover) could save you costs elsewhere.
Low-value high-volume data like logs and search queries can be sent to a cheaper self-hosted timeseries/fts database.
So yeah, I'd rather spend a few more hours picking an actual scalable technology now than spend what could be 7 figures and massively impact product development moving to scalable technology..
But sharding is too use-case specific to prescribe something broadly like Spanner.
That's a big "if." Idk about those two, but you sacrifice a lot using Spanner. And in the initial phases, you can't tell what your actual needs will be at scale, so you'll probably have to rework things anyway. Just using Spanner doesn't solve your scaling problems.
Doesn't spanner introduce new (very unlikely) failure modes that other databases are not impacted by? The reliance on an external consistency model feels to me like a complete outsourcing of liability that warrants thorough investigation.
Hypothetically, if GPS went down for a prolonged period and/or a bug was found in the TrueTime system, what would happen to the consistency model around Spanner?
I feel like some applications and customers would much rather wait for a synchronous acknowledgement from the actual, live system. An extra 150ms when you are confirming a 6-figure wire transfer could easily be framed as a good thing in most circles.
If there was a bug in TrueTime, you would susceptible to phantoms, which isn’t great but almost certainly not catastrophic.
I believe that’s the only isolation issue you’d hit, since spanner locks the rows involved in a transaction.
>Doesn't spanner introduce new (very unlikely) failure modes that other databases are not impacted by?
Curious if you could go into that.
As I understand it, it's not a solved problem because there is no silver bullet, but rather trade-offs in every direction, and which solution works for you (including Spanner) is heavily dependent on your use case.
the clocks remove such limitations.
Unfortunately Spanner isn’t open source. Yugabyte and Citus are close. Cockroach isn’t 100% compatible and things like FoundationDB which are truly HA are not easily plugged into Postgres as the underlying storage engine.