Need advice about which tool to choose?Ask the StackShare community!
nginx vs OpenResty: What are the differences?
nginx: A high performance free open source web server powering busiest sites on the Internet. nginx [engine x] is an HTTP and reverse proxy server, as well as a mail proxy server, written by Igor Sysoev. According to Netcraft nginx served or proxied 30.46% of the top million busiest sites in Jan 2018; OpenResty: 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.
nginx and OpenResty can be categorized as "Web Servers" tools.
nginx and OpenResty are both open source tools. It seems that nginx with 9.1K GitHub stars and 3.43K forks on GitHub has more adoption than OpenResty with 7.12K GitHub stars and 984 GitHub forks.
Airbnb, Uber Technologies, and Spotify are some of the popular companies that use nginx, whereas OpenResty is used by Shopify, Kong, and Pagar.me. nginx has a broader approval, being mentioned in 8670 company stacks & 2556 developers stacks; compared to OpenResty, which is listed in 37 company stacks and 5 developer stacks.
- Server rendered HTML output from PHP is being migrated to the client as Vue.js components, future plans to provide additional content, and other new miscellaneous features all result in a substantial increase of static files needing to be served from the server. NGINX has better performance than Apache for serving static content.
- The change to NGINX will require switching from PHP to PHP-FPM resulting in a distributed architecture with a higher complexity configuration, but this is outweighed by PHP-FPM being faster than PHP for processing requests.
- The NGINX + PHP-FPM setup now allows for horizontally scaling of resources rather vertically scaling the previously combined Apache + PHP resources.
- PHP shell tasks can now efficiently be decoupled from the application reducing main application footprint and allow for scaling of tasks on an individual basis.
Pros of NGINX
- High-performance http server1.5K
- Performance901
- Easy to configure732
- Open source608
- Load balancer530
- Scalability286
- Free285
- Web server222
- Simplicity174
- Easy setup133
- Content caching29
- Web Accelerator19
- Capability14
- Fast13
- Predictability11
- High-latency10
- Supports http/26
- Reverse Proxy6
- Fast and lightweight6
- The best of them4
- Lots of Modules4
- Great Community4
- Enterprise version4
- Embedded Lua scripting3
- Reversy Proxy3
- Streaming media delivery3
- Streaming media3
- High perfomance proxy server3
- Lightweight2
- saltstack2
- Fast and easy to set up2
- Slim2
- GRPC-Web1
- Narrow focus. Easy to configure. Fast1
- Ingress controller1
- Along with Redis Cache its the Most superior1
- Virtual hosting1
- A0
Pros of OpenResty
Sign up to add or upvote prosMake informed product decisions
Cons of NGINX
- Advanced features require subscription5