Absolutely. For me, OpenResty combined with a custom Lua script solved an incredibly complicated business problem that I ran into a couple years ago, and now that arrangement serves thousands of complex requests per day. With Nginx and that custom code combined into a single configuration, not requiring a separate backend service, we turned a complicated problem into a very simple one!
I used OpenResty + Lua + Redis to implement a quick blacklist for an ad platform like 10 years ago. It really does make everything so simple and it's pretty fun to work with.
OpenResty is a platform with multiple advantages. It's fast (Nginx), it's async via stackless coroutines (no function coloring), it's again fast (LuaJIT), it's relatively easy to deploy, it's feature-rich (all the Lua packages available), and it integrates well with some other tech like Redis (also Lua-enabled).
On the other hand, Lua is an extension language. It's not designed to support large codebases. You can, of course, with enough discipline, make it work - just as you can, with enough grit, make Perl, JavaScript, Ruby, or older Python work, but you're on your own then. You need to invent your own code organization scheme and adhere to it religiously. You need to reinvent half of the stdlib that Python provides out of the box. The reinventing process extends to the need to create a set of helpers to define classes and inheritance between them, which are only provided as powerful but inconvenient primitives (metatables) in Lua.
It's incredible how much you can do with just 100 sloc in OpenRESTY - it's absolutely amazing as a component of a larger system. However, writing lengthy, uninspiring, yet complicated business logic in Lua under OpenResty is not a good idea.
Absolutely. For me, OpenResty combined with a custom Lua script solved an incredibly complicated business problem that I ran into a couple years ago, and now that arrangement serves thousands of complex requests per day. With Nginx and that custom code combined into a single configuration, not requiring a separate backend service, we turned a complicated problem into a very simple one!
I used OpenResty + Lua + Redis to implement a quick blacklist for an ad platform like 10 years ago. It really does make everything so simple and it's pretty fun to work with.
Yes, but.
OpenResty is a platform with multiple advantages. It's fast (Nginx), it's async via stackless coroutines (no function coloring), it's again fast (LuaJIT), it's relatively easy to deploy, it's feature-rich (all the Lua packages available), and it integrates well with some other tech like Redis (also Lua-enabled).
On the other hand, Lua is an extension language. It's not designed to support large codebases. You can, of course, with enough discipline, make it work - just as you can, with enough grit, make Perl, JavaScript, Ruby, or older Python work, but you're on your own then. You need to invent your own code organization scheme and adhere to it religiously. You need to reinvent half of the stdlib that Python provides out of the box. The reinventing process extends to the need to create a set of helpers to define classes and inheritance between them, which are only provided as powerful but inconvenient primitives (metatables) in Lua.
It's incredible how much you can do with just 100 sloc in OpenRESTY - it's absolutely amazing as a component of a larger system. However, writing lengthy, uninspiring, yet complicated business logic in Lua under OpenResty is not a good idea.