官术网_书友最值得收藏!

Data

The topics of single responsibility, independent DURS, bounded context, and isolation come up over and over again in the context of microservices. I cover these topics at length in this book as well. The topic of a database per service also comes up over and over again in the same context. It's the combination of these topics that is rarely covered, though that is beginning to change. Earlier in this chapter, we discussed the critical idea of turning the database inside out and in turn how the cloud is the database. Bounded isolated data, as a part of the whole of a component, is fundamental to building cloud-native systems that are responsive, resilient, and elastic. Unfortunately, there is a tendency to gravitate toward shared monolithic databases. This is in part because that is the way it has always been. The other reason for this tendency towards monolithic databases is that managing and operating a database in the cloud at a large scale is hard. Managing a sharded database is more difficult and managing Polyglot Persistence is even more difficult. We have already covered this briefly, but as a core tenet of this book it bears repeating.

The result of this shared monolithic database model is that we have no bulkheads for our data. More and more tables are added to the monolithic database, ever increasing the probability that these tables will be competing for the same, scarce resources. In the best case, the database requests only increase in latency as they compete for the available memory, I/O throughput, and CPU cycles. Or worse, lack of disk space causes the database to crash and results in an outage across the entire system. Ultimately, if we have no isolation at the persistence layer then we effectively have no isolation at the component layer. Instead, each component must have its own isolated databases. Taking this one step further, we discussed how mature cloud-native systems are multi-regional, because they need to be resilient to regional outages. This means that mature cloud-native data must also be multi-regional. Thus, the persistence layer is an example of where we need a different way of thinking and reasoning about software architecture.

主站蜘蛛池模板: 鹿邑县| 武宣县| 安陆市| 信丰县| 尉氏县| 斗六市| 湖北省| 涞水县| 凤翔县| 巴林左旗| 吴忠市| 双城市| 渝北区| 孝义市| 大足县| 孝昌县| 东阿县| 田阳县| 新郑市| 黑河市| 安乡县| 永嘉县| 辛集市| 汾阳市| 五峰| 盈江县| 兴安县| 邵阳县| 根河市| 平塘县| 闽侯县| 应用必备| 亚东县| 金山区| 和田县| 扶余县| 基隆市| 咸宁市| 富蕴县| 漯河市| 元朗区|