在RDS AWS中读取副本 [英] Read replicas in RDS AWS

查看:54
本文介绍了在RDS AWS中读取副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Amazon RDS的新手.我已经在RDS中设置了一个数据库实例.我想尝试RDS只读副本功能.

I am a newbie to amazon RDS. I have set up a db instance in RDS. I want to try the RDS read replicas feature.

我的查询很少:

  1. 读副本适用于哪种类型的应用?
  2. 只读副本是将数据同步还是异步复制到其他只读副本?
  3. 它是多可用区部署的替代品吗?
  4. 与MYSQL中的主从复制或主复制相比,它有什么优势?
  5. 如果我们在EC2上有副本,它的工作方式将与RDS读取副本的工作方式相同

提前谢谢.

推荐答案

读副本适用于哪种应用程序?

For what kind of applications read replicas are suitable?

最适合您的应用程序是

  • 读取密集型,供多个读取客户端使用
  • 可以在写入db的数据与复制到读取副本的数据之间采用一个较小的滞后时间.

只读副本是将数据同步还是异步复制到其他只读副本?

Is the read replica replicates synchronously or asynchronously data to other read replicas?

复制是异步的,因此复制会稍有延迟

The replication is asynchronous, so expect a small lag for replication

它是Multi AZ部署的替代品吗?

Is it the substitute of the Multi AZ deployments ?

多可用区设置和只读副本互为补充;它们不能互相替代或替代.多可用区设置用于高可用性(由AWS开箱即用设置),而只读副本仅用于减少/分配数据库实例上的负载,以提高读取性能并避免写入和读取的数据库瓶颈.您可以/需要编写应用程序逻辑,以将您的读取转移到只读副本和将写入到主实例中;充分利用设置.

Multi AZ setup and Read Replica compliment each other; they aren't replacement or substitute for each other. Multi AZ setup is for High Availability ( Out of the Box Setup By AWS ) whereas Read Replica is purely to reduce / distribute the load on the Database Instances to improve the read performance and to avoid bottlenecks to the databases for writes and read. You can / need to write your application logic to divert your reads to Read Replica and Writes to Main Instance; to make the best use of the setup.

通常,人们会根据应用程序和负载来混合并匹配多可用区和只读副本.

Generally people mix and match both Multi AZ and Read Replica(s) depending on the application and load.

与MYSQL中的主从复制或主复制相比,它有什么优势?

How is it better than the master slave or master master replication in MYSQL

主从与主从之间的比较取决于多个因素,例如数据,数据量,写入或读取,加载等操作.您需要进行工作才能确切了解系统在这两种设置下的性能如何.

The comparison of the master master vs master slave depends on several factors like data, data volume, operation like write or read, load etc. you need to work to see exactly how the system performs with either of the setup.

与多可用区/只读副本一起使用的最大优点是,您可以减轻数据库管理活动以及监督副本设置和运行状况到AWS的开销;而不是由您自己管理.

The best advantage you go with Multi AZ / Read Replica is that, you can offload the DB management activities and overhead of supervising the replica setup and health to AWS; instead of you managing those by yourself.

如果我们在EC2上有副本,它将以与RDS读取副本相同的方式工作

If we have replicas on EC2 will it work the same way as RDS read replicas work

这再次更像是第四季度的必然结果.尝试在EC2实例中安装数据库时,您需要注意(监视和管理)-EC2实例补丁程序,数据库实例补丁程序,复制设置,复制延迟,可用性.

This is again more like corollary to the Q4. When try to install a database in your EC2 instance you need to take care ( monitor & manage ) - EC2 Instance Patches, Database Instance Patches, Replication Setup, Replication Lag, Availability.

当您使用只读副本将其留给AWS时,它们将为您管理以上所有内容.您可以根据应用程序的需求选择哪种最适合您,这取决于成本,可用性,合规性等因素.

Whereas when you leave that to AWS by using Read Replica they manage all the above for you. It is your call to choose which ever is best for you either depending on the application requires which involves factors like cost, availability, compliance etc.

这篇关于在RDS AWS中读取副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆