AWS RDS MySQL只读副本数据同步时间 [英] AWS RDS MySQL Read Replicas Data Sync time

查看:240
本文介绍了AWS RDS MySQL只读副本数据同步时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在AWS上拥有可扩展Web应用程序的架构,并利用了AWS RDS MySQL.他们说您必须为您的MySQL Master数据库实例创建2个Slave Read-Replicas.使用此功能,只要主数据库在所有只读副本中发现更改(在其主实例中),它就会同步您的数据.您的应用程序必须拆分读取和写入操作,以便所有读取请求都进入Read-Replicas(通过负载平衡器或DNS),而写入请求\ ops进入主数据库.

We have and architecture of a scalable web application on AWS and utilized AWS RDS MySQL. They say you have to create 2 Slave Read-Replicas for your MySQL Master db instance. Using this, the master DB will synchronize your data whenever it finds a change (in its master instance) across all of the read replicas. Your application has to split Read and Write operations so that All the Read Requests goes to Read-Replicas (Via a load-balancer or DNS) and write requests\ops goes to the master db.

现在,我的问题是,如果用户访问具有写操作的页面,那么他将执行该操作并单击到需要对该新输入的数据进行读操作的页面.主数据库与从属只读副本进行同步所需花费多少,以便用户可以在下一页成功看到读取操作结果(即新创建的记录).

Now my question is if a user visits a page which has a write operation, he does the operation and click to a page where a Read Operation is required of that new entered data. How much the Master db will take to sync with slave read-replicas so that the user can successfully see the read-operation result (i.e. the newly created record) on the very next page.

推荐答案

RDS MySQL只读副本滞后受许多因素的影响,包括主实例和辅助实例上的负载,要复制的数据量,副本(如果它们位于同一区域或跨区域等).延迟可能会延长到几秒钟或几分钟,尽管通常不到一分钟.

RDS MySQL Read Replica lag is influenced by a number of factors including the load on both the primary and secondary instances, the amount of data being replicated, the number of replicas, if they are within the same region or cross-region, etc. Lag can stretch to seconds or minutes, though typically it is under one minute.

对于MySQL兼容数据库中的低延迟(10毫秒)的只读副本,您可以使用Amazon Aurora.

For low-lag (10s of milliseconds) read replicas in a MySQL-compatible database you can use Amazon Aurora.

这篇关于AWS RDS MySQL只读副本数据同步时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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