今日固定时间表
08:30 wake 只保留起床;学习从 08:50 开始。三块窗口不互相挤占。
| 08:30 wake | 起床、早餐、准备白板;不安排预读或算法。 |
|---|---|
| 08:50—09:15 | 08:50—10:55 system design Bad/Good/Great 拆解 — polling/WebSocket/SSE,pub-sub all/partition/co-location/dispatcher,sampling/CDN snapshot。 |
| 09:15—09:50 | 08:50—10:55 system design 精确原文 — 读 Live Comments 全部 potential deep dives、Part 1/2 与 level expectation。 |
| 09:50—10:25 | 08:50—10:55 system design 故障时序 — 画断线、重连到不同 server、Last-Event-ID replay、consumer lag、broker partition hot spot。 |
| 10:25—10:55 | 08:50—10:55 system design 降级与指标 — 定义 end-to-end comment latency、reconnect gap、viewer connection fanout、sample rate、snapshot age。 |
| 14:30—16:15 | NeetCode Tag · Stack 三道题在下方独立算法表执行,避免系统设计表格挤压算法细节。 |
| 20:30—21:15 | 20:30—21:15 Staff 追问:dispatcher 为什么不是单点?SSE buffer 溢出时用户看见什么? |
算法模块
连续单一 NeetCode Stack tag;每天 3 题,14:30—16:15 完成。
| # | Problem | Invariant focus | 执行 |
|---|---|---|---|
| 10 | Evaluate Reverse Polish Notation | 限时复盘:整除截断和负数。 | 35 分钟限时 + 5 分钟 invariant/bug risk |
| 11 | Generate Parentheses | 限时复盘:生成顺序与剪枝。 | 35 分钟限时 + 5 分钟 invariant/bug risk |
| 12 | Daily Temperatures | 限时复盘:相等温度不弹。 | 35 分钟限时 + 5 分钟 invariant/bug risk |
闭卷起手
先暴露自己的当前模型,再用 live headings 修正。
15 分钟闭卷回答:一个直播间 50K、5M、50M viewer 时,连接、广播、历史补漏分别怎么退化。
Hello Interview 精确目录
day 页面必须链接到具体 section anchors;周级 overview 不放小节链接。
| 项目 | 精确 section anchor | Disposition | 今天怎么用 |
|---|---|---|---|
| FB Live Comments | Potential Deep Dives | deep dive | move to realtime scaling |
| FB Live Comments | 1) How can we ensure comments are broadcasted to viewers in real-time? | deep dive | polling vs WebSocket vs SSE |
| FB Live Comments | 2) How will the system scale to support millions of concurrent viewers? | deep dive | server coordination and mega-stream strategy |
| FB Live Comments | Part 1: Server Coordination | deep dive | pub/sub, co-location, dispatcher |
| FB Live Comments | Part 2: Mega Streams | deep dive | sampling and CDN snapshot fallback |
| FB Live Comments | 3) How do we handle client disconnections and ensure viewers don't miss comments? | deep dive | Last-Event-ID, replay and catch-up |
| FB Live Comments | What is Expected at Each Level? | level expectation | calibrate depth |
| FB Live Comments | Mid-level | level expectation | basic realtime pipe |
| FB Live Comments | Senior | level expectation | scale and disconnection |
| FB Live Comments | Staff+ | level expectation | mega stream overload, product degradation, observability |
DDIA 精确决策卡
只读能改变今天设计决定的小节。
| 项目问题 | 精确 DDIA subsection | 改变的系统决定 |
|---|---|---|
| 评论生产速度超过某些消费者时系统应该做什么? | Ch12 · 当消费者跟不上生产者时 | 普通直播允许丢低价值实时动画但不丢可回放 comment log;mega stream 可切采样/CDN snapshot。 |
| 断线后是否能重播旧评论? | Ch12 · 重播旧消息 | reconnect/catch-up 可以重放 since cursor;服务端要控制 retention、limit 与过期后的 snapshot/fallback。 |
| 直播评论如何把状态变化主动推给客户端? | Ch13 · 将状态变更推送给客户端 | SSE 是服务器推送的状态变化流;客户端仍以 cursor/log 作为恢复边界。 |
今日产出与修复规则
| 课程角色 | CORE · all deep dives + Bad/Good/Great |
|---|---|
| 必须交付 | Live Comments deep-dive matrix:real-time broadcast、server coordination、mega streams、disconnect recovery,各含 failure/recovery/metrics。 |
| 修复规则 | 如果 mega stream 仍坚持“所有评论推给所有人”,补产品降级:sampling、ranked comments、CDN/poll snapshot。 |
Detailed lecture notes, audio, recall scripts, PDFs, Staff Q&A, and mock packs are archived locally and are intentionally not published on this site.