An RFC-compliant, ESI-capable HTTP cache for Nginx/OpenResty backed by Redis, designed as a fast alternative to Squid/Varnish.
Ledge is an HTTP caching module for Nginx and OpenResty that stores cached responses in Redis. It solves the problem of high latency and origin server load by serving cached content efficiently, with support for advanced caching patterns like ESI and stale-while-revalidate. It acts as a drop-in alternative to traditional caching proxies like Squid or Varnish.
DevOps engineers and backend developers managing high-traffic web applications who need a scalable, RFC-compliant caching layer integrated with Nginx/OpenResty.
Developers choose Ledge for its tight integration with Nginx/OpenResty, Redis-backed scalability, and advanced features like ESI and collapsed forwarding—offering a modern, Lua-extensible alternative to older caching proxies.
An RFC compliant and ESI capable HTTP cache for Nginx / OpenResty, backed by Redis
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements full HTTP caching semantics from RFC 7234 and extensions like stale-while-revalidate, ensuring standards-compliant behavior with validation and revalidation.
Uses Redis for storage and metadata, enabling distributed caching with abstracted drivers and configurable setups for high performance.
Processes data in buffers regardless of response size, providing predictable memory usage and low latency, as highlighted in the streaming design section.
Supports Edge Side Includes 1.0 with regex conditions and custom variables, allowing dynamic content assembly at the edge for complex caching patterns.
Offers an events system for binding Lua functions to mid-request events, enabling deep customization of caching logic without modifying core code.
Requires OpenResty, Redis, and LuaRocks installation with configuration across Nginx and Lua blocks, increasing initial setup time and maintenance.
All cache data and metadata are stored in Redis by default, making it a critical single point of failure and bound by Redis memory limits.
Advanced features like ESI and event binding require understanding of Lua, HTTP caching semantics, and Nginx phases, which can be daunting for newcomers.
Compared to established alternatives like Varnish, Ledge has a smaller community and fewer third-party tools, potentially affecting support and troubleshooting.
ledge is an open-source alternative to the following products: