7 ms·
Correction: AWS does have this kind of strongly consistent, scalable OLTP database in Aurora.
by elvinyung 9y ago
Correction: AWS does have this kind of strongly consistent, scalable OLTP database in Aurora.
- ddorian43 9y agoCorrection: No. Aurora is single node. No horizontal scaling.
- iampims 9y agoNot exactly. You can add as many replicas as you need to scale reads.
- wgjordan 9y agoAurora currently supports automatic horizontal scaling for reads [1], and horizontal scaling for writes is currently in preview [2]. [1]: https://aws.amazon.com/about-aws/whats-new/2017/11/amazon-aurora-now-supports-auto-scaling-for-aurora-replicas/ https://aws.amazon.com/about-aws/whats-new/2017/11/amazon-au... [2]: https://aws.amazon.com/about-aws/whats-new/2017/11/sign-up-for-the-preview-of-amazon-aurora-multi-master/ https://aws.amazon.com/about-aws/whats-new/2017/11/sign-up-f...
- antoncohen 9y ago> horizontal scaling for writes is currently in preview I don't expect multi-master to increase write performance much. It will scale out network connections and maybe query processing, but not actual writing of data. It will replicate all data to all nodes, and the replication will be synchronous to any node it can automatically fail over to. So a client will be able to connect to any master, but that master will have to synchronously write to at minimum all other masters, if not all other nodes, before the server can acknowledge the write back to the client. Every node will need the write performance to write every write. That isn't scaling out writes.
- wgjordan 9y agoFeel free to maintain your skepticism until public benchmarks are available, but Amazon has specifically advertised multi-master will horizontally scale out writes for increased write performance [1]: > Workloads that require even higher write throughput will benefit from horizontally scaling out their writes with additional master instances. [1]: https://aws.amazon.com/about-aws/whats-new/2017/11/sign-up-for-the-preview-of-amazon-aurora-multi-master/ https://aws.amazon.com/about-aws/whats-new/2017/11/sign-up-f...
- ddorian43 8y agoBut no sharding. All writes will go to all servers.
- wgjordan 8y agoYou're probably thinking of 'group replication' in standard MySQL. Aurora's horizontal scaling for reads, writes and storage capacity is quite different since compute and storage is decoupled, and the concepts of 'sharding' or sending writes to 'servers' don't really translate directly. In Aurora [1], data is partitioned into 10GB chunks ('protection groups'), with copies stored in 6 'storage nodes' spread across 3 Availability Zones. When the 'server' (database node) handles a write, the data is sent in parallel to all 6 storage nodes, and the write is accepted as soon as a quorum of storage nodes (4) writes the data to its redo log and responds. The storage nodes also continuously back up the data to S3 for extra durability. These 6 parallel storage-node operations are performed for every write, even in a single-master Aurora setup. Multi-master simply scales out the number of 'database nodes' (compute) for handling queries, while keeping the number of storage nodes (and the total write-amplification) constant. In the rare case when conflicting write-transactions occur that can't be resolved locally at either the database or storage layer (e.g., when data changed at both multiple database nodes AND multiple storage nodes), a hierarchical conflict-resolution mechanism is invoked to decide which transaction succeeds and which gets rolled back [2]. This reportedly provides 'near-linear performance scaling when there is no or low levels of conflicts', even when dealing with multiple masters spread across multiple regions [3]. [1]: https://aws.amazon.com/blogs/database/introducing-the-aurora-storage-engine/ https://aws.amazon.com/blogs/database/introducing-the-aurora... [2]: https://www.slideshare.net/AmazonWebServices/deep-dive-on-the-amazon-aurora-mysqlcompatible-edition-dat301-reinvent-2017/35 https://www.slideshare.net/AmazonWebServices/deep-dive-on-th... [3]: https://www.slideshare.net/AmazonWebServices/deep-dive-on-the-amazon-aurora-mysqlcompatible-edition-dat301-reinvent-2017/38 https://www.slideshare.net/AmazonWebServices/deep-dive-on-th...
- ddorian43 9y agoI should have phrased better: It has NO sharding !!!
- wgjordan 8y agoSee my comment above. Aurora partitions ('shards') its data in 10GB chunks automatically, which are written in parallel to 6 nodes across 3 Availability Zones and backed up to S3 for full durability. Aurora horizontally scales storage capacity and read throughput (and with multi-master currently in preview, write throughput) without requiring the application to handle any implementation details of 'sharding'. This is a feature, not a bug.
- ddorian43 8y agoSee my comment again. The data needs to be partitioned (looks like it is in 10 GB chunks), can 6 storage servers go 600 ? And looks like the compute layer can't pushdown processing to storage servers. You do a "select coun(*) from t where a=1" and "a is not indexed" on 600 storage servers and 1 compute server. Does the count happen in parallel on 600 storage-nodes and 1 accumulate on the compute server ? Or rows transfer to compute for counting ?
- wgjordan 8y ago> can 6 storage servers go 600? Yes, 6 storage servers (10GB chunk) automatically scale up to 6000+ (64TB) [1]. > And looks like the compute layer can't pushdown processing to storage servers. 'Parallel query' for Aurora became available for preview in February [2]. The compute layer does pushdown processing to storage servers [3]. If you do a "select count(*) from t where a=1" and "a is not indexed" on 600 storage servers and 1 compute server, the count should happen in parallel on 600 storage nodes and 1 accumulate on the compute server. [1]: https://aws.amazon.com/rds/aurora/faqs/#hardware-and-scaling https://aws.amazon.com/rds/aurora/faqs/#hardware-and-scaling [2]: https://aws.amazon.com/about-aws/whats-new/2018/02/amazon-aurora-parallel-query-is-available-for-preview/ https://aws.amazon.com/about-aws/whats-new/2018/02/amazon-au... [3]: https://www.slideshare.net/AmazonWebServices/deep-dive-on-the-amazon-aurora-mysqlcompatible-edition-dat301-reinvent-2017/41 https://www.slideshare.net/AmazonWebServices/deep-dive-on-th...