Update storage.md

This commit is contained in:
Lellansin 2017-04-10 15:07:12 +08:00
parent 55d3bc619f
commit 164614abb2

View File

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