- 快召唤伙伴们来围观吧
- 微博 QQ QQ空间 贴吧
- 文档嵌入链接
- 复制
- 微信扫一扫分享
- 已成功复制到剪贴板
Which technology to choose in AWS
你是在亚马逊上运行,还是打算迁移到那里?在本文中,我们将介绍在Amazon云环境中运行数据库的不同技术。
我们将关注每一个方面的操作、好处和局限性。
展开查看详情
1 . Which technology to choose in AWS ? RDS / Aurora / Roll-your-own April 17, 2018 Daniel Kowalewski Senior Technical Operations Engineer Percona 1 © 2017 Percona
2 .AWS MySQL options RDS for MySQL Aurora MySQL EC2 (Roll-your-own) 2 © 2018 Percona
3 .EC2 Roll-your-own • EC2 Instances • MySQL • Galera Cluster (PXC) • ProxySQL • Async/semisync replication • Orchestrator • MHA • Xtrabackup • Percona Monitoring and Management 3 © 2018 Percona
4 .Agenda • Overview of three options • RDS for MySQL • Aurora MySQL • EC2 Roll-your-own • Scaling • High Availability • Backups • Performance • Pricing 4 © 2018 Percona
5 .RDS for MySQL 5 © 2017 Percona
6 .Amazon RDS for MySQL • MySQL DBaaS • Conceptually familiar • Offload some management overhead 6 © 2018 Percona
7 .RDS Benefits • Easy to set up • No OS setup or configuration • No database/package installation • Few clicks to running instance • Easy to create read replicas 7 © 2018 Percona
8 .RDS Benefits • Less management overhead • Automating time-consuming administration • Hardware provisioning • Patching • Backups • High availability (Multi-AZ) • Security (not related to mysql user privileges) • Built-in encryption 8 © 2018 Percona
9 .RDS Benefits • Scale • Vertical: Resizable computing capacity • Horizontal: Read replicas 9 © 2018 Percona
10 .RDS Limitations • No Super privilege • No OS access • No direct access to logs • 70 parameters you can’t change • Very limited plugin support • Storage limit: 16TB • No access to backups • Vendor lock-in 10 © 2018 Percona
11 .Aurora MySQL 11 © 2017 Percona
12 .Amazon Aurora MySQL • NOT MySQL • But "MySQL Compatible" • Solution for high availability • Sometimes a solution for scaling 12 © 2018 Percona
13 .Aurora MySQL Benefits • Everything RDS for MySQL provides, plus... • Very low latency replication • Data size up to 64 TB • Performance gains for some workloads • Especially high concurrency, large instances • Minimal downtime for patches 13 © 2018 Percona
14 .Aurora Limitations • Mostly the same limitations as RDS for MySQL • Storage limit: 64TB • Slower (write latency) for small workloads • Only InnoDB • Only one logical copy of your data • Replicated 6 times • No performance_schema (for 5.7, at the moment) • It's not MySQL, so don't assume it acts like MySQL 14 © 2018 Percona
15 .One approach to roll-your-own PXC + ProxySQL on EC2 15 © 2017 Percona
16 .PXC + ProxySQL on EC2 16 © 2018 Percona
17 .PXC on EC2 • Auto-provisioning with node AMI (SST) • ProxySQL on app nodes • automatic failover • read/write splitting • auto scaling • PMM • It's not hard to automate backups 17 © 2018 Percona
18 .Benefits of roll-your-own • More control over environment • Patching • MySQL parameters • Fine-tune OS • Which software and which versions • More visibility • OS metrics 18 © 2018 Percona
19 .Limitations of roll-your-own • Harder than RDS or Aurora to set up and maintain • Depends on your chosen architecture 19 © 2018 Percona
20 .Scaling Reads 20 © 2017 Percona
21 .Scale – RDS for MySQL ● Up to 5 Read Replicas ● 2 tiers (30 RR) ● Normal Async Replication ● No r/w splitting ● No load balancing 21 © 2018 Percona
22 .Scale – Amazon Aurora MySQL ● Up to 15 instances ● Load balancing ● Cluster / reader endpoints ● Shared storage ● Reduced lag ● Auto scaling 22 © 2018 Percona
23 .Scale - EC2 Roll-your-own • Scaling depends on your implementation • As many replicas and levels as you want • Relatively simple to add Galera nodes • But that's not really scaling • ProxySQL for R/W splitting, load balancing 23 © 2018 Percona
24 .High Availability 24 © 2017 Percona
25 .High Availability – RDS for MySQL ● Multi AZ (Standby DB Instance) ○ Synchronous replication at storage level ● Read Replica Promotion ○ Data integrity not ensured ● Failover can take 1 minute or more 25 © 2018 Percona
26 .High Availability – Aurora MySQL • Connection Endpoints • Storage: 6 copies, 3 AZs • Automatic failure detection • Replica promoted • Failover takes a few seconds 26 © 2018 Percona
27 .High Availability - Roll-your-own • With PXC (Galera cluster) • Synchronous replication to other nodes • No data loss for node failure • Automatic failure detection with ProxySQL • Possible to combine with semi-sync replication • Other possibilities • All async/semisync • Orchestrator or MHA • ProxySQL 27 © 2018 Percona
28 .Backups 28 © 2017 Percona
29 .Backups EC2 RDS for MySQL Aurora MySQL Type/s Physical / Logical / Binlog Automated Snapshot + binlog continuous and incremental archiving Latest Recoverable Time ~1 sec up to 5 mins up to 5 mins PITR resolution Transaction Second Second Storage EBS S3 S3 Retention No limits 1 to 35 days 1 to 35 days Automated restore Your own Yes Yes 29 © 2018 Percona