Releases: DefectingCat/lolly
Releases · DefectingCat/lolly
v0.4.1
v0.4.0 - Least Time & Session Sticky Load Balancing
v0.4.0 - Least Time & Session Sticky Load Balancing
Added
Load Balancing
- Least Time balancer: EWMA-based least response time algorithm, automatically selects the fastest upstream
- Session Sticky balancer: Cookie-based session affinity with consistent hash sharding, supporting Cookie expiration, domain, path, Secure/HttpOnly/SameSite attributes
- YAML configuration support:
least_time,stickystrategies and parameters
Platform
- FreeBSD deployment examples
Fixed
- Least Time response time recording correction
- Sticky Cookie format, shard key, and expiration check fixes
- Sticky double-stop protection and restart support
- Config validation:
least_timedefault_timemust not be negative
Tests
- Least Time and Sticky balancer integration tests
- Least Time and Sticky benchmarks
v0.3.0
Added
核心功能
- Lua gjson 模块:JSON 编码/解码库,支持 sort_keys 选项
- Lua 路由注册:支持 route 字段的 Lua 脚本按路由执行
- Config include 指令:支持 glob 模式的配置文件拆分和包含
- SIGHUP 热重载:配置变更后通过信号触发无中断重载
- FreeBSD / OpenBSD 构建目标
- X-Forwarded-Host 和 X-Forwarded-Proto 可配置代理头
平台与构建
- MIT 许可证
docs/plans/添加到 .gitignore- Makefile 优化和一致性修复
Performance
- matcher RadixTree 搜索 sync.Pool 零分配
- loadbalance filterHealthy 池化 + atomic.Bool 重建锁
- FileInfoCache 近似 LRU 替代读写锁升级
- resolver O(1) LRU(container/list)
- proxy 内联 FNV-1a 哈希、消除 WebSocket 字符串分配、缓存键单次遍历
- compression MIME 预计算字节切片、GeoIP 查找去重、gzip_static 预建扩展名集合
- ConsistentHash 双锁消除、Balancer healthy slice 池化
Fixed
- 修复 9 个包的并发数据竞争(
go test -count=3 -race零 race)- lua: TCPSocket.currentOp 锁保护、schedulerMu 调度器同步
- server: buildMiddlewareChain 并发写、multi-server 模式 goroutine 安全
- handler/app/http3/stream: 测试同步和原子操作修复
- 多服务器模式 status/pprof 注册
- config include 循环检测
- atomic.Bool 替代 running 标志消除 data race
- OCSP 刷新逻辑、DNS resolver double-close panic
- SSL DER 提取改用 encoding/pem
- 根路径规范化修复
Changed
- 删除 ~16.8k 行死代码(disk_cache、tiered_cache、tempfile、upgrade、lua mock engine 等)
- 提取公共函数到 testutil/netutil/utils
- 合并冗余 switch、移除 50+ 子目录 AGENTS.md
- fasthttp 升级至 1.71.0,compress 升级至 1.18.6
Tests
- 安全中间件覆盖率 75.9% → 88.5%
- 服务器模块覆盖率 78.6% → 83.3%
- proxy 覆盖率 71.1% → 80%+
- variable 覆盖率 74.5% → 85%+
- http3 覆盖率 46% → 93.1%
- sslutil 覆盖率 29.2% → 85%+
- adapter 覆盖率 0% → 80%+
- stream 覆盖率 57% → 75%+
Build
- 删除 GitHub Actions workflow 文件
- 添加
docs/skills/release.md发布流程技能
v0.2.2
Highlights
Massive release with 100+ commits — performance optimizations, new features, comprehensive testing, and major code quality improvements.
✨ New Features
- Autoindex — Directory listing support for static file serving
- Nginx Config Import — Convert nginx configurations to lolly format
- Stale Cache —
stale_if_errorandstale_if_timeoutcache fallback - Layered Cache Architecture — Multi-tier caching with enhanced proxy cache
- Slow Start — Gradual traffic ramp-up for load balancer targets
- ETag & 304 — Static files support ETag and 304 Not Modified responses
- Expires — Cache-Control expires header support for static files
- Alias — Location alias directive support
- Rate Limit — Response rate limiting middleware
- Internal Directive — Internal-only location support
- Server Tokens / Types — Server identification and MIME type configuration
- Random LB — Random load balancing algorithm
- ProxyBind / Buffering / ProxyURI — Upstream server parameters and response header control
- gzip_static — Now defaults to enabled
⚡ Performance
- Zero-allocation optimizations across streaming, caching, and compression
sync.Poolpointer wrapping to eliminate boxing allocationsFileEntrypooling to reduce GC pressureRWMutexfor FileInfoCache; cached ETag regeneration avoidanceBalancerhealthy slice poolingConsistentHashandRateLimiterconcurrency optimizations- Pre-compressed file existence caching
- RWMutex-priority reads in cache Get with double-check upgrade
🏗️ Refactoring
- Extracted
CommonAdapterfor HTTP/2/3 adapters - Extracted
createFastServer,createProxyForConfighelpers - Extracted TLS config generation to
sslutil - Unified IP whitelist parsing and Lua ngx table helpers
- Modernized code with Go 1.22+ features
- Eliminated
gotostatements in proxy cache handling
🧪 Testing
- Full E2E test suite (cache, LB, health check, WebSocket, SSL/TLS, HTTP/2)
- E2E tests parallelized — from ~2h to ~102s
- Comprehensive unit test coverage expansion
- Benchmark test CI workflow
- Integration tests with testcontainers
- DNS resolver mock tests
🐛 Fixes
- Lua engine concurrency safety issues
- Security: 2 CRITICAL + 6 HIGH issues resolved
- ProxyBind dial timeout and cookie attribute matching
- HealthChecker restart support
- Various lint, formatting, and E2E test fixes