<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>分布式锁 on 知识铺的博客</title>
    <link>https://index.zshipu.com/geek/tags/%E5%88%86%E5%B8%83%E5%BC%8F%E9%94%81/</link>
    <description>Recent content in 分布式锁 on 知识铺的博客</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-CN</language>
    <lastBuildDate>Tue, 15 Mar 2022 09:04:42 +0800</lastBuildDate>
    <atom:link href="https://index.zshipu.com/geek/tags/%E5%88%86%E5%B8%83%E5%BC%8F%E9%94%81/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>分布式锁用还是</title>
      <link>https://index.zshipu.com/geek/post/%E4%BA%92%E8%81%94%E7%BD%91/%E5%88%86%E5%B8%83%E5%BC%8F%E9%94%81%E7%94%A8%E8%BF%98%E6%98%AF/</link>
      <pubDate>Tue, 15 Mar 2022 09:04:42 +0800</pubDate>
      <guid>https://index.zshipu.com/geek/post/%E4%BA%92%E8%81%94%E7%BD%91/%E5%88%86%E5%B8%83%E5%BC%8F%E9%94%81%E7%94%A8%E8%BF%98%E6%98%AF/</guid>
      <description>为什么用分布式锁？ 系统 A 是一个电商系统，目前是一台机器部署，系统中有一个用户下订单的接口，但是用户下订单之前一定要去检查一下库存，确保库存足够了才会给用户下单。 由于系统有一定的并发，所以会预先将商品的库存保存在 Redis 中，用户下单的时候会更新 Redis 的库存。 此时系统架构如下： 但是这样一来会产</description>
    </item>
  </channel>
</rss>
