Lwan vs OpenResty: What are the differences?
Developers describe Lwan as "Experimental, scalable, high performance HTTP server". In development for almost 3 years, Lwan was until now a personal research effort that focused mostly on building a solid infrastructure for a lightweight and speedy web server. On the other hand, OpenResty is detailed as "Turning Nginx into a Full-fledged Web App Server". OpenResty (aka. ngx_openresty) is a full-fledged web application server by bundling the standard Nginx core, lots of 3rd-party Nginx modules, as well as most of their external dependencies.
Lwan and OpenResty belong to "Web Servers" category of the tech stack.
Lwan and OpenResty are both open source tools. OpenResty with 7.12K GitHub stars and 984 forks on GitHub appears to be more popular than Lwan with 5.01K GitHub stars and 524 GitHub forks.
What is Lwan?
What is OpenResty?
Need advice about which tool to choose?Ask the StackShare community!
Why do developers choose OpenResty?
What are the cons of using Lwan?
What are the cons of using OpenResty?
What companies use Lwan?
Sign up to get full access to all the companiesMake informed product decisions
What tools integrate with Lwan?
At Kong while building an internal tool, we struggled to route metrics to Prometheus and logs to Logstash without incurring too much latency in our metrics collection.
We replaced nginx with OpenResty on the edge of our tool which allowed us to use the lua-nginx-module to run Lua code that captures metrics and records telemetry data during every request’s log phase. Our code then pushes the metrics to a local aggregator process (written in Go) which in turn exposes them in Prometheus Exposition Format for consumption by Prometheus. This solution reduced the number of components we needed to maintain and is fast thanks to NGINX and LuaJIT.
We use nginx and OpenResty as our API proxy running on EC2 for auth, caching, and some rate limiting for our dozens of microservices. Since OpenResty support embedded Lua we were able to write a custom access module that calls out to our authentication service with the resource, method, and access token. If that succeeds then critical account info is passed down to the underlying microservice. This proxy approach keeps all authentication and authorization in one place and provides a unified CX for our API users. Nginx is fast and cheap to run though we are always exploring alternatives that are also economical. What do you use?