
An Introduction to OpenResty - fcambus
http://openmymind.net/An-Introduction-To-OpenResty-Nginx-Lua/
======
frik
I plan to try out OpenResty in the next days, it brings the great Lua language
to the web (Nginx web server). In the benchmark OpenResty is in the top part
next to C/C++/Java based frameworks:
[http://www.techempower.com/benchmarks/#section=data-r11&hw=p...](http://www.techempower.com/benchmarks/#section=data-r11&hw=peak&test=json)

OpenResty needs a new website [http://openresty.org/](http://openresty.org/) ,
confusing JS. With more examples, links to frameworks like Lapis, mention high
profile users of OpenResty, etc.

~~~
lutefisk
Yeah the website definitely needs some work. It looks like a side project with
a few articles, and then you realize agentzh is the owner of like all the
commits to make openresty useful. It's like that rundown restaurant that you
keep going back to because the food is so good.

------
sinzone
We use it a lot at Mashape, since Kong
([https://github.com/Mashape/kong](https://github.com/Mashape/kong)) is
entirely powered by OpenResty and probably by now, Kong is the most used and
adopted OpenResty software.

Without OpenResty we couldn't have built Kong or make it freely available to
everyone.

------
mitchtbaum
Turbo offers another approach, similar to Python's Tornado web framework. I
really like using a lightweight, super fast, easy-to-hack web server. Lua
strikes me as a great language for web tooling.

[https://github.com/kernelsauce/turbo](https://github.com/kernelsauce/turbo)

------
crudbug
Luvit.io - libuv + LuaJIT is also in the same space.

------
meowface
I've been playing with OpenResty + MoonScript
([http://moonscript.org](http://moonscript.org)) for various web app
middleware features, and so far it's been fantastic. The performance is pretty
much as good as you can get without a full C/C++ rewrite, and Lua/MoonScript
is better than serving dynamic content solely with nginx config directives.

------
sshb
I find lua+nginx really useful for auth checking.

------
ausjke
lapis is another framework. [http://leafo.net/lapis/](http://leafo.net/lapis/)

------
waspoza
Why lua/ngx is better than Go app?

~~~
meowface
Lower latency since nginx isn't proxying anything or even sharing memory. The
nginx worker process runs the code as soon as it receives the request. Also,
LuaJIT will outperform Go in some (many?) cases.

The performance differences are minor enough to be negligible for most use
cases, though. You'd have to be at very large scale.

