<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>缓存 on Leanku</title>
    <link>https://blog.leanku.com/tags/%E7%BC%93%E5%AD%98/</link>
    <description>Recent content in 缓存 on Leanku</description>
    <image>
      <url>https://blog.leanku.com/papermod-cover.png</url>
      <link>https://blog.leanku.com/papermod-cover.png</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Fri, 11 Jul 2025 20:46:01 +0800</lastBuildDate><atom:link href="https://blog.leanku.com/tags/%E7%BC%93%E5%AD%98/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>高并发系统设计-缓存保护</title>
      <link>https://blog.leanku.com/post/microservice/%E9%AB%98%E5%B9%B6%E5%8F%91%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1-%E7%BC%93%E5%AD%98/</link>
      <pubDate>Fri, 11 Jul 2025 20:46:01 +0800</pubDate>
      
      <guid>https://blog.leanku.com/post/microservice/%E9%AB%98%E5%B9%B6%E5%8F%91%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1-%E7%BC%93%E5%AD%98/</guid>
      <description>高并发系统设计-缓存保护 一、概述 1.1 什么是缓存保护 缓存保护（Cache Protection）是指：
通过一系列缓存设计策略，避免缓存异常导致数据库被大量请求直接访问，从而保证系统稳定性。
典型架构：
Client │ ▼ Gateway │ ▼ Application │ ┌─────────┴─────────┐ │ │ ▼ ▼ Local Cache Redis Cache │ Cache Miss？ │ ▼ MySQL 1.2 为什么需要缓存保护 Redis 可以承受几十万甚至百万级 QPS，而 MySQL 通常只能支撑几千 QPS。
例如：
Redis 100000 QPS ↓ MySQL 3000 QPS 如果 Redis 出现问题：
100000 请求 ↓ 全部进入 MySQL ↓ 数据库连接耗尽 ↓ 整个系统崩溃 缓存的首要目标是保护数据库，其次才是提升访问性能。
1.3 企业缓存架构 企业通常采用：
Client │ ▼ Application │ ▼ Local Cache(Caffeine) │ ▼ Redis Cluster │ ▼ MySQL 同时配合：</description>
    </item>
    
  </channel>
</rss>
