WEEK 06 · 2026-09-02 · WED

Ad Click Aggregator:server-side redirect、event time 与 one-minute aggregate HLD

先把低延迟 view 和正确 raw click stream 拆开;广告主看到的是聚合视图,不是事实来源。

今日固定时间表

只有三个学习窗口:08:50-10:55、14:30-16:15、20:30-21:15。section links 只放在本日页面。

08:50-10:55System design
读 Ad Click Aggregator 从 Understanding the Problem 到 High-Level Design;保留原文 Bad/Good/Great solution titles 并画 click -> stream -> OLAP path。
14:30-16:15NeetCode Linked List
三道连续题位,每题 30m solve + 5m pattern/invariant/bug/complexity evidence。
20:30-21:15Recall / Staff Q&A / Mock
英语 recall:contrast batch pre-aggregation, stream processing, and raw lake reconciliation.

算法模块

连续 NeetCode Linked List tag;每天恰好 3 个 slot。

#Problem / modePatternInvariantBug riskTimeSpace
7Add Two Numbers
NEW · 30m solve + 5m evidence
digit carrycarry contains overflow from processed suffixremaining carry after both lists endO(n+m)O(max(n,m))
8Find Duplicate Integer
NEW · 30m solve + 5m evidence
cycle detection over valuesarray value is next pointer into index spaceconfusing index/value startO(n)O(1)
9LRU Cache
NEW · 30m solve + 5m evidence
hash map + doubly linked listhead/tail order mirrors recencystale map pointer after evictionO(1)O(capacity)

Hello Interview 精确目录

保留 live original titles;每行都有 canonical anchor 和 disposition。

项目精确 canonical sectionDisposition今天怎么用
Ad Click AggregatorUnderstanding the Problemrequired readingad click collection and advertiser metrics
Ad Click AggregatorFunctional Requirementsrequired readingredirect clicks and query one-minute metrics
Ad Click AggregatorNon-Functional Requirementsrequired reading10k peak clicks/sec, low-latency analytics, no lost clicks, idempotency
Ad Click AggregatorThe Set Uprequired readingdata-processing delivery framework
Ad Click AggregatorPlanning the Approachrequired readinginterface first, then data flow
Ad Click AggregatorSystem Interfacerequired readinginput click events and output advertiser metrics
Ad Click AggregatorData Flowrequired readingclick, track/store, redirect, aggregate query
Ad Click AggregatorHigh-Level Designrequired readingserver-side redirect, stream, OLAP read model
Ad Click Aggregator1) Users can click on ads and be redirected to the targetrequired readingcompare client-side redirect with server-side redirect
Ad Click Aggregator2) Advertisers can query ad click metrics over time at 1 minute intervalsrequired readingBad/Good/Great: raw DB, batch OLAP, real-time stream processing
Ad Click AggregatorScaling Writespattern notewrite-heavy path drives Kafka/Kinesis and Flink choices

DDIA 精确决策卡

只读 Ch8、Ch12、Ch13 中能改变今天设计选择的小节。

项目问题精确 DDIA subsection改变的系统决定
Click stream needs durable low-latency ingestionCh12 · 传递事件流Kafka/Kinesis is a durable stream buffer, not the aggregate truth
One-minute click buckets must use event timeCh12 · 事件时间与处理时间window by click/impression event time; expose processing lag separately
Metric windows need explicit bucket semanticsCh12 · 窗口的类型tumbling one-minute buckets for advertiser reports; late corrections carry version/as-of

本日项目 artifacts

今日产出、修复与英语 recall

必须交付Ad Click HLD:/click 302, signed impression payload, raw stream, Flink one-minute window, OLAP aggregate, advertiser query API。
修复规则如果回答只说组件名,重写为 decision -> mechanism -> invariant -> failure window -> recovery -> metric。
English recall
Correctness is the durable source of truth; low-latency status, aggregates, dashboards, and alerts are views with freshness and repair semantics.
Local study materials
Detailed lecture notes, audio, recall scripts, PDFs, Staff Q&A, and mock packs are archived locally and are intentionally not published on this site.