- Learning AWS(Second Edition)
- Aurobindo Sarkar Amit Shah
- 274字
- 2021-06-30 18:52:55
Designing for eventual consistency
Depending on the type of applications you have designed in the past, you may or may not have come across the concept of eventual consistency (unless you have worked extensively on distributed transactions oriented applications). However, it is fairly common in the cloud world. After a data update, if your application can tolerate a few seconds delay before the update is reflected across all replicas of the data then eventual consistency can lead to better scalability and performance.
Cloud platforms typically store multiple replicas of the data to ensure data durability. For example, the replica of a database table could be stored in several geographically distributed locations.
Normally, eventual consistency is the default behavior in a cloud data service. In case the application requires consistent reads at all times then some cloud data services provide the flexibility to specify strongly consistent reads. However, there are several cloud data services that support the eventually consistent option only.
Another approach used to improve scalability and performance beyond the capacity, that is CPU or I/O or both, of a single instance of your database, is to deploy one or more read replicas close to your end users. This is typically used for read-heavy applications. The read traffic can be routed to these replicas for reduced latencies. These replicas can also support resource heavy queries for online report generation or serve read-only requests, while your main database is down for maintenance or operations activities.
Note that changes to the source database are applied to the read replicas continuously, but there is a small lag involved. Hence, read replicas are considered to be eventually consistent.
- 物聯(lián)網(wǎng)安全(原書第2版)
- Hands-On Chatbot Development with Alexa Skills and Amazon Lex
- OpenLayers Cookbook
- 互聯(lián)網(wǎng)安全的40個智慧洞見:2014年中國互聯(lián)網(wǎng)安全大會文集
- Socket.IO Real-time Web Application Development
- SSL VPN : Understanding, evaluating and planning secure, web/based remote access
- C/C++串口通信:典型應(yīng)用實例編程實踐
- 夢工廠之材質(zhì)N次方:Maya材質(zhì)手冊
- RestKit for iOS
- React Design Patterns and Best Practices(Second Edition)
- 智能物聯(lián)網(wǎng):區(qū)塊鏈與霧計算融合應(yīng)用詳解
- 黑客與反黑工具使用詳解
- 物聯(lián)網(wǎng)技術(shù)與實踐
- 巧學(xué)活用CISCO網(wǎng)絡(luò)典型配置
- 天下一家:網(wǎng)絡(luò)聯(lián)通世界(科學(xué)新導(dǎo)向叢書)