RDS跨区域阅读延迟

发布于 2025-02-01 10:21:26 字数 208 浏览 3 评论 0原文

我们在US-EAST-1中有一个RDS实例,访问RD的应用程序在US-EAST-1和US-EAST-2中。这两个区域具有VPC对等。我们正在使用Route53加权路由策略来平衡收到的请求。跨区域交流时,我们经历了10毫秒的延迟。当前,这10个MS延迟在微服务之间是可以接受的。但是,当区域2中的应用程序访问RDS时,我们将面临相当大的延迟。 (由于冬眠的数据库调用大量)。有什么可以减少此数据库延迟吗?

We have an rds instance in us-east-1, the applications that access the rds are in us-east-1 and us-east-2. the two regions have vpc peering. we are load balancing the request received by using route53 weighted routing policy. we are experiencing 10 ms delay when communicating across regions. currently, these 10 ms delays are acceptable between microservices. but when the applications in region2 are accessing rds, we are facing a considerable delay. (due to the large amount of database calls of hibernate ). Are there any was to reduce this database latency ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空城仅有旧梦在 2025-02-08 10:21:26

如果您有跨区域数据库和从从属 /读取重复程序进行阅读,则可以期待一些延迟。这不是技术问题,而是物理问题,因为数据必须从A到B进行物理传播B。随着您移动这些要点(A& b),潜伏期将会增长。

减少该延迟的一种解决方案是使用缓存层。所有第一个读取将来自数据库(跨区域),但随后的读取可以是从Redis Cache来进行的

If you have cross-region databases and reading from slave / read-replicas then expect some delays. This is not technology issue but physics problem as data has to physically travel from A to B. The latency will grow as you move these points (A & B) further away from each other.

A solution to reduce this latency is to use cache layer. All the first reads will be from database (cross-region) but subsequent ones can be from Redis cache for e.g.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文