top | item 23310143

OpenResty: A Swiss Army Proxy for Serverless

96 points| tlarkworthy | 5 years ago |futurice.com | reply

10 comments

order
[+] mrkurt|5 years ago|reply
OpenResty is pretty great, I think people would abuse the heck out of it it weren't so heavily Lua but when people do find it they build some amazing stuff (like Kong).

We have a fair number of people running OpenResty on Fly.io. It's a pretty good fit. I'd _love_ to have an OpenResty based on v8/JavaScript that wasn't so heavily tied to nginx events, I could build so many neat apps.

[+] fosk|5 years ago|reply
For what is worth, OpenResty has proven to be a very solid foundation for Kong. We did have to build some foundations for when it comes to setting up testing and project management in the early days, but the flexibility and performance we are able to achieve (especially when running on top of LuaJIT) is just best in class.

If you want to take a look at a fairly large (maybe the largest?) OpenResty application you can take a look at https://github.com/Kong/kong

Disclaimer: I am CTO at Kong

[+] imprettycool|5 years ago|reply
I'm glad it's Lua since it gives me a leg up over all the other companies with devs who don't want to learn a new language. OpenResty is slept on so hard.
[+] tlarkworthy|5 years ago|reply
Yeah, this was my first time with Lua, but previous experience with nginx and it was one of those times when an experiment exceeded expectations. It's a bit annoying Lua comments are -- and nginx are #. I got those mixed up so many times and wasted a cycle. I wish there was a syntax highlighter for this hybrid language.
[+] tiffanyh|5 years ago|reply
Isn’t cloudflare largely built on OpenResty.

Also, why for the desire to have JavaScript built in. There’s a number of language features of Lua that make openresty possible that I’m not certain JavaScript could provide.

[+] favorited|5 years ago|reply
I did a POC with OpenResty probably 6-7 years ago, and it was fantastic. A performant alternative to writing your Nginx modules in C (restricted to Nginx's memory management) is sorely needed.

In the end though, it's a tough sell because it markets itself as a full web platform built atop Nginx, rather than being stock Nginx + a Lua engine.

[+] cordite|5 years ago|reply
I have an app running in the field, but it’s not friendly for what I’d like, which includes background jobs that run on a schedule, and only on one process.

I have to do some sort of race to shared memory for who initialized it first.

[+] Tombar|5 years ago|reply
if you like openresty, dont miss https://leafo.net/lapis/

Lapis is a framework for building web applications using MoonScript or Lua that runs inside of a customized version of Nginx called OpenResty.