架构# 源码设计 设计模式与行话 Callback回调设计模式 子系统 事件驱动 HTTP 反向代理的总流程 Downstream TCP 连接建立 事件处理抽象框架 libevent 核心思想 libevent 核心思想 event event_base Setting up a default event_base event loop function flags returns Pseudocode internal time cache Dumping the event_base status Running a function over every event in an event_base Working with events event state Constructing event objects example event flags callback argument About Event Persistence Constructing signal events Making events pending and non-pending Events with priorities Finding the currently running event Inspecting event status Manually activating an event 扩展阅读 线程模型 线程概述 Thread Local Ref Listener Listener 举例 Listener 内部组件 Listener filters Network Filter Chains Listener 相关的组件和启动顺序 代码级的启动顺序 求证过程 Listener 连接建立细节 TCP 连接建立步骤 求证过程 Network Filter Network Filter Chains Network Filter 概述 Network Filter 框架设计概念 Network Filter 对象关系 Network Filter 框架设计细说 Network Filter - ReadFilter 协作 Network Filter - WriteFilter 协作 扩展阅读 http connection manager http filter 抽象对象定义 http filter C++类关系 HCM upstream/downstream 事件驱动协作下的 HTTP 反向代理流程 HTTP 反向代理的总流程 Downstream Read Request 模块协作 Downstream Request Router 模块协作 Upstream Write Request 模块协作 Upstream Read Response 模块协作 Downstream Write Response 模块协作 求证过程 Router 扩展阅读 HTTP/1.1 Stream(草稿) 流控 - Flow Control 一些流控相关的术语 TCP 流控实现 HTTP2 流控实现 HTTP2 流控总体流程 Downstream/Upstream connection 拥塞概述 Upstream connection 与 Upstream http stream 同时拥塞场景 Upstream 拥塞时 Router::Filter 的协作 Downstream 拥塞时 Http::ConnectionManagerImpl 的协作 HTTP decode/encode filter 流控实现细节 Decoder filters Encoder filters HTTP and HTTP/2 codec upstream send buffer HTTP and HTTP/2 network upstream network buffer Ref.