4 ms·
OpenResty: A Swiss Army Proxy for Serverless
- mrkurt 6y agoOpenResty 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.
- tlarkworthy 6y agoYeah, 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.
- asguy 6y agoI found it way easier to just write lua externally, and use *_by_lua_file directives.
- imprettycool 6y agoI'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.
- fosk 6y agoFor 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 https://github.com/Kong/kong Disclaimer: I am CTO at Kong
- tiffanyh 6y agoIsn’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.
- mrkurt 6y agoI prefer TypeScript to Lua and there are a lot of interesting JavaScript libraries I would want to use.
- favorited 6y agoI 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 6y agoI 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 6y agoif you like openresty, dont miss https://leafo.net/lapis/ 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.