nginx Lua# nginx Lua Installation OpenResty nginx HelloWorld Tips 分布式限流 References nginx Lua Quick Start API 接收请求 输出响应 其它API Nginx全局内存 模块指令 init_by_lua init_worker_by_lua set_by_lua rewrite_by_lua access_by_lua Module References nginx Lua Redis/SSDB+Twemproxy Redis Redis Settings SSDB Twemproxy Twemproxy Settings hash算法 分片算法 HashTag 一致性Hash与服务器宕机 支持的Redis命令 Tips SSDB Install References nginx Lua Dev Lib Redis Client 基本操作 连接池 pipeline MySQL Client Http Client lua-resty-http ngx.location.capture JSON cjson dkjson 编码转换 luarocks lua-iconv 位运算 cache 字符串处理 Template lua-resty-template API References nginx Lua Web HTTP service Architecture Redis+Twemproxy Redis Settings Twemproxy Settings MySQL+Atlas MySQL Atlas Installation Atlas Configuration Running Atlas Atlas Admin Atlas Proxy Java+Tomcat Java Tomcat nginx Settings nginx+Lua Tips References nginx Lua Web Desc Page Architecture 数据存储实现 商品基本信息SSDB集群配置 商品介绍SSDB集群配置 其它信息Redis配置 Tests Twemproxy配置 动态服务实现 nginx配置 绑定hosts 前端展示实现 基础组件 商品介绍 前端展示 优化 local cache ngx_cache_purge GZIP压缩 Tips References nginx Lua Web Test 流量复制 AB测试 map lua-resty-cookie 协程 串行实现 ngx.location.capture_multi实现 协程API实现 References nginx Lua Flash Sale 服务介绍 模式特征 服务主要功能 系统设计要点 如何实现实时库存? 如何设计抢购redis数据结构? 如何保证不超卖? 如何提高吞吐量? 如何保证可用性? 系统架构 抢服务流程 REDIS+LUA抢购子流程 限流处理 References