What's the difference between OpenResty and Nginx?
Asked Answered
E

2

9

As a novice web developer, I tend to use Nginx when deploying & running my Larvel PHP sites.
I've recently come across OpenResty and, from what I believe, it appears to be webserver software like that of Nginx.
As someone who is always looking to improve the websites I make, will using Open Resty over Nginx improve the development and overall quality or experience of my Laravel websites?

Etiology answered 8/8, 2020 at 19:23 Comment(0)
I
11

OpenResty is an enhanced version of Nginx, which combines Lua and Nginx. Unless you are planning to use Lua, there will be no benefit of choosing OpenResty over Nginx. Since you are running Laravel based website, there will be no benefits.

Interlocutrix answered 8/8, 2020 at 20:14 Comment(1)
Absolute right OpenResty not useful for python or PHP, I notice Miro.com use OpenResty, means they use Lua architectureHathaway
H
5

OpenResty can be seen as an addon to Nginx turning it into a fully-fledged web application server. It integrates the standard Nginx core with Lua Just-In-Time (LuaJIT) compiler enabling the utilization of the Lua programming language and Lua modules to develop logic within your nginx configuration.

OpenResty is designed to help developers build scalable web applications, web services, and dynamic web gateways on top of nginx. OpenResty therefore includes many useful Lua libraries out of the box to do add things Oauth2 on top of nginx.

Switching from nginx to OpenResty is not such a paradigm shift as OpenResty is built around the standard nginx core but only if you want to have those additional features.

As @Neo pointed out, in your use case there doesn’t seem to be a reason to move.

Both nginx and OpenResty are open-source tools.

The link in OpenResty has a very good explanation.

Hinshaw answered 8/11, 2022 at 19:27 Comment(1)
One thing to note is nginx has removed any sane way of monitoring your upstreams without moving to nginx plux which makes it close to worthless.Ruvalcaba

© 2022 - 2024 — McMap. All rights reserved.