Hacker News new | past | comments | ask | show | jobs | submit login
An Introduction to OpenResty (openmymind.net)
62 points by fcambus on Dec 24, 2015 | hide | past | favorite | 10 comments

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...

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

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.

We use it a lot at Mashape, since 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.

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.


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

I've been playing with OpenResty + MoonScript (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.

I find lua+nginx really useful for auth checking.

lapis is another framework. http://leafo.net/lapis/

Why lua/ngx is better than Go app?

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.

Applications are open for YC Summer 2021

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact