9

这样的后端架构适合做读写分离吗?

 2 years ago
source link: https://www.v2ex.com/t/784878
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  程序员

这样的后端架构适合做读写分离吗?

  olist · 10 小时 0 分钟前 · 611 次点击
数据层只有一个 mysql 。玩家登录时,后端会加载和玩家相关的绝大部分数据并缓存在服务端。小部分数据根据客户端请求实时查询数据库后返回。数据变化时,先修改服务端的数据,然后更新到数据库。
上面提到的”绝大部分数据“是不是不适合做读写分离?因为主从复制的延迟会导致登陆时读到脏数据,并在此基础上修改并同步到主库。实时同步又会影响性能。分表分库或加 redis 缓存应该更适合,但这些改动大,自己没有什么信心。
大家有什么建议吗?

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK