diff --git a/sections/storage.md b/sections/storage.md index f56bf9f..e8b3b54 100644 --- a/sections/storage.md +++ b/sections/storage.md @@ -86,6 +86,12 @@ Cursor 熔断只读读/写 +### 读写分离 + +读写分离是在 query 量大的情况下减轻单个 DB 节点压力, 优化数据库读/写速度的一种策略. 不论是 MySQL 还是 MongoDB 都可以进行读写分离. + +读写分离的配置方式直接搜索一下 `数据库名 + 读写分离` 即可找到. 通常是 M/S 的情况, 使用 Master 专门写, 用 Slave 节点专门读. 使用读写分离时, 请确认读的请求对一致性要求不高, 因为从写库同步读库是有延迟的. + ## 数据一致性