← Notedeck
All engines
·
网络·系统
en
zh-CN
zh-TW
ja
ko
fr
de
es
pt-BR
tr
it
ar
网络·系统
24
engines
IPv4 子网划分 · CIDR
IPv4 subnet · CIDR
/n 前缀→掩码 · 主机数 2^(32−n)−2 · 网络/广播地址
A /n prefix sets the mask, network, broadcast and usable host range
TCP 拥塞控制 · AIMD
TCP congestion control · AIMD
慢启动指数→拥塞避免线性 · 丢包减半 AIMD · cwnd 锯齿
Slow-start ramp, linear climb, then multiplicative decrease on loss
递归 DNS 解析
Recursive DNS resolution
根→TLD→权威 · A 记录 · 缓存 TTL 短路
Root → TLD → authoritative → A record; a cache hit short-circuits the chain
带宽时延积(BDP)
Bandwidth-delay product
BDP=带宽×RTT · 在途数据 · 窗口≥BDP 满带宽
Data in flight that fills the pipe · the ideal TCP window
缓存命中率 · 平均访存时间
Cache hit ratio · AMAT
AMAT=命中·t_c+未命中·(t_c+t_m) · 高命中率杠杆
Average memory access time from the hit ratio · the leverage of a high hit rate
页面置换 · LRU / FIFO / OPT
Page replacement · LRU / FIFO / OPT
LRU/FIFO/OPT · 引用串缺页数 · Belady 异常
Simulate a reference string and count page faults · Belady's anomaly
Load balancing across backends
Load balancing across backends
轮询/加权/最少连接 · 请求分配 N 服务器
Round-robin spreads evenly; weighted RR sends proportionally more to heavier servers
Consistent hashing ring
Consistent hashing ring
哈希环顺时针归属 · 加节点仅迁移 1/N · 虚拟节点均衡
Adding a node re-homes only ~1/(N+1) of the keys; virtual nodes even out the load
The CAP theorem
The CAP theorem
C/A/P 三选二 · 分区时舍 C 或 A · CP/AP/CA 实例
Pick at most two of Consistency, Availability, Partition-tolerance
Amdahl's law · parallel speedup
Amdahl's law · parallel speedup
S=1/((1−p)+p/N) · 上限 1/(1−p) · p=0.95 封顶 20×
Maximum speedup is capped by the serial fraction
Bloom filter · probabilistic set
Bloom filter · probabilistic set
m 位 k 哈希 · 假阳率 (1−e^(−kn/m))^k · 最优 k=(m/n)ln2
An m-bit array and k hashes decide membership in tiny space
RAID storage · capacity vs redundancy
RAID storage · capacity vs redundancy
0/1/5/6/10 · 可用容量/容错 · 容量-冗余权衡
Each RAID level trades usable space against fault tolerance
TCP handshake & teardown
TCP handshake & teardown
3次握手SYN/SYN-ACK/ACK · 4次挥手 · seq/ack+状态机
3-way handshake + 4-way teardown · seq/ack arithmetic on a time-sequence diagram
Go-Back-N ARQ
Go-Back-N ARQ
发送窗口N · 累积ACK · 超时回退重传丢失帧及之后
Sliding-window pipelining · cumulative ACK · discard out-of-order · go back on loss
Selective Repeat ARQ
Selective Repeat ARQ
乱序缓存 · 逐帧ACK · 只重传丢失帧(vs GBN)
Buffer out-of-order · per-frame ACK · retransmit only the lost frame
距离向量路由 · 贝尔曼-福特
Distance-vector routing · Bellman-Ford
Bellman-Ford迭代 · 收敛 · 计数到无穷+毒性逆转
Each node iterates D_x(y)=min_v{c(x,v)+D_v(y)} until the vectors converge
链路状态路由 · Dijkstra
Link-state routing · Dijkstra
洪泛全拓扑 · Dijkstra最短路 · 路由表
Every node floods link states, then runs Dijkstra on the full map to build its table
NAT / PAT 地址转换
NAT / PAT translation
内网IP:端口↔公网 · 转换表 · 回程包匹配
One public IP for many inside hosts; the mapping table sends every reply back to the right host
CSMA/CD — carrier sense, collision & backoff
CSMA/CD — carrier sense, collision & backoff
载波侦听 · 冲突检测 · 二进制指数退避 · 时空图
Shared bus · listen-while-talk · jam then deterministic binary backoff
Packet-switching end-to-end delay
Packet-switching end-to-end delay
传输L/R+传播d/s+排队+处理 · 存储转发 · 逐跳
Store-and-forward · transmission + propagation + queuing + processing, per hop
Shannon channel capacity
Shannon channel capacity
C=B·log2(1+SNR) · 奈奎斯特2B·log2 M
C = B·log₂(1 + SNR) · Nyquist 2B·log₂M · capacity plotted against SNR
Token bucket · traffic shaping
Token bucket · traffic shaping
令牌以r累积到容量b · 允许突发 · 再限速到r
Tokens fill at rate r up to capacity b; a full bucket lets a burst through, then output is shaped to r
Leaky bucket · traffic shaping
Leaky bucket · traffic shaping
恒定漏出 · 队列缓冲突发 · 溢出丢弃 · 平滑输出
A queue drains at a constant rate d; bursts fill the queue and overflow is dropped
IPv4 fragmentation & reassembly
IPv4 fragmentation & reassembly
按MTU拆分 · 片偏移8字节单位 · MF标志 · 重组
Split a datagram to fit the MTU: offsets in 8-byte units, MF flag on every fragment but the last