WED · 07.29 · WEEK 01
Rate Limiter:一次读到 High-Level Design
从需求读到 HLD,完成客户端身份、规则、接口、部署位置、算法选择与 429 契约。
原文定位
按顺序打开。链接直接指向当天需要阅读的小节。
上午执行
| 时间 | 动作 |
|---|---|
| 08:50—09:10 | 闭卷设计 100 requests/minute/user;明确 limiter 在哪里执行。 |
| 09:10—10:05 | 读到 High-Level Design;补 Rules、Clients、Requests 与 isRequestAllowed 契约。 |
| 10:05—10:35 | 比较 in-process、dedicated service、API gateway 三种放置方式。 |
| 10:35—10:55 | 选 Token Bucket,讲清 bucket capacity、refill rate、remaining 和 reset time。 |
必须产出:一张 Rate Limiter HLD:identity → rule match → atomic bucket check → allow / 429。
掌握标准
- 能区分 user ID、IP、API key 的适用面和误伤风险。
- 能解释为什么 gateway 是常见答案,同时主动指出业务上下文不足。
- 能给出 429、Retry-After、remaining、reset 的客户端恢复契约。
算法 · Arrays & Hashing
Tag 不切换。三题结束后只记录四个字段。
| # | 题目 | 留下的记录 |
|---|---|---|
| 1 | Product of Array Except Self | Pattern / Invariant / Bug / Complexity |
| 2 | Valid Sudoku | Pattern / Invariant / Bug / Complexity |
| 3 | Group Anagrams · 限时复刷 | Pattern / Invariant / Bug / Complexity |
晚上
英文口述 10 分钟:placement → identity → algorithm → interface。不要提前进入 Redis 扩展。
Detailed lecture notes, audio, recall scripts, PDFs, Staff Q&A, and mock packs are archived locally and are intentionally not published on this site.