<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>分片服务 on PlumePHP</title><link>https://plumephp.com/tags/%E5%88%86%E7%89%87%E6%9C%8D%E5%8A%A1/</link><description>Recent content in 分片服务 on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Sun, 29 Aug 2021 19:24:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/%E5%88%86%E7%89%87%E6%9C%8D%E5%8A%A1/index.xml" rel="self" type="application/rss+xml"/><item><title>分片本地缓存协同架构：快读、脏读和失效风暴之间的平衡</title><link>https://plumephp.com/game-server-shard-local-cache-coherency-architecture/</link><pubDate>Sun, 29 Aug 2021 19:24:00 +0800</pubDate><guid>https://plumephp.com/game-server-shard-local-cache-coherency-architecture/</guid><description>&lt;h2 id="背景架构问题通常藏在正常路径之外"&gt;背景：架构问题通常藏在正常路径之外&lt;/h2&gt;
&lt;p&gt;游戏服务端为了降低延迟，很多分片服务都会使用本地缓存：玩家基础信息、配置摘要、公会信息、商品状态、匹配标签。读本地缓存很快，但多实例同时运行时，一份数据被修改后，其他实例多久能知道？如果所有实例同时失效又同时回源，数据库会被打爆。分片本地缓存协同架构要在快读、可接受旧值和失效风暴之间找到边界。&lt;/p&gt;</description></item></channel></rss>