4 ms·
Is there something that explains the Pros/Cons of Spanner vs their new AlloyDB offering? Both have a PostgreSQL compatibility layer...
by marune 4y ago
Is there something that explains the Pros/Cons of Spanner vs their new AlloyDB offering?
Both have a PostgreSQL compatibility layer...
- teraflop 4y agoJust from a glance at the AlloyDB documentation, it seems to be fundamentally a similar design to PostgreSQL. That is, you have a single primary instance that holds the entire dataset and handles all write traffic, plus some number of additional replicas within the system for failover and read-only queries. Spanner has a very different implementation: your dataset is split into (possibly a large number of) shards, each of which is replicated across multiple regions. So you get better global availability and scalability, at the cost of more complicated performance characteristics when you have to do operations that involve multiple shards.
- mdasen 4y agoI think the difference is that AlloyDB is basically PostgreSQL where they've modified how it's storing things to offer better performance via better integration with Google's infrastructure - like what Amazon did with AuroraDB. That means that AlloyDB is compatible with all the stuff you're used to using with PostgreSQL. Spanner is a very different database. They've included a PostgreSQL query-language compatibility layer, but that isn't the same as being "100% compatible." You'll still be dealing with some Spanner concepts like not wanting to hot-spot your writes. Spanner does allow really scaling out and a truly distributed database while AlloyDB is an improvement via better integration with Google's infrastructure, but still mostly the same model. Aurora/Alloy do have advantages by decoupling the storage from the server instances including performance and resiliency, but Spanner is really creating a horizontally scalable, distributed database - with some trade-offs.