feat:增加秒杀系统设计文档

This commit is contained in:
2026-06-10 18:16:29 +08:00
parent b40d3f14a8
commit b839e361ac
4 changed files with 242 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
  Redis是一个高性能的开源内存数据库用作缓存、数据库和消息中间件。它以极快的读写速度基于内存存储支持字符串、列表、哈希等多种数据结构。Redis提供数据持久化、主从复制、哨兵模式等高可用特性广泛应用于缓存、会话存储、排行榜、消息队列等场景。
# 二、安装
## 2.1 apt安装
1. 通过apt包管理器安装
```bash
sudo apt update
@@ -25,6 +26,33 @@ requirepass password
  `systemctl restart redis-server`重启服务。
## 2.2 docker安装
```yml
services:
redis:
image: redis:8.6.4
container_name: redis
restart: always
ports:
- "6379:6379"
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
- ./data:/data
command: redis-server /usr/local/etc/redis/redis.conf
```
  redis.conf:
```conf
bind 0.0.0.0
protected-mode yes
port 6379
requirepass password
```
## 2.3 客户端
[Tiny RDM](https://redis.tinycraft.cc/zh/)
# 三、SpringBoot使用
## 3.1 引入依赖
```xml