# Is ngx\_http\_perl\_module stable enough to use in high traffic production environment?

**URL:** <https://www.ruby-forum.com/t/is-ngx-http-perl-module-stable-enough-to-use-in-high-traffic-production-environment/243900>\
**Category:** NGINX\
**Created:** [January 23, 2016, 3:43pm UTC](https://www.ruby-forum.com/t/is-ngx-http-perl-module-stable-enough-to-use-in-high-traffic-production-environment/243900 "2016-01-23T15:43:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [January 23, 2016, 3:43pm UTC](https://www.ruby-forum.com/t/is-ngx-http-perl-module-stable-enough-to-use-in-high-traffic-production-environment/243900/1 "2016-01-23T15:43:28Z")

</div>

I use perl a lot,  
and I noticed  
[http://nginx.org/en/docs/http/ngx\_http\_perl\_module.html](http://nginx.org/en/docs/http/ngx_http_perl_module.html)  
for several years has been documented as  
“The module is experimental, caveat emptor applies.”  
So I have been somewhat avoiding testing its use.

Does anyone know if this is suitable to use in high traffic production  
environments?  
Would it often leak memory even if the perl code was deleting/undefining  
all variable and no circular references?

Also, how does this work with yum rpm. If I update the perl on the  
system  
using yum update, will the nginx perl also update or will I have to  
recompile nginx?

Thank you.

---

<div class="post-metadata">

**Author:** ![highclass99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f05b48/32.png) [@highclass99](https://www.ruby-forum.com/u/highclass99)\
**Post date:** [January 23, 2016, 11:09pm UTC](https://www.ruby-forum.com/t/is-ngx-http-perl-module-stable-enough-to-use-in-high-traffic-production-environment/243900/2 "2016-01-23T23:09:45Z")

</div>

Hello!

On Sat, Jan 23, 2016 at 6:42 AM, highclass99 wrote:

> I use perl a lot,  
> and I noticed  
> [Module ngx\_http\_perl\_module](http://nginx.org/en/docs/http/ngx_http_perl_module.html)  
> for several years has been documented as  
> “The module is experimental, caveat emptor applies.”  
> So I have been somewhat avoiding testing its use.
> 
> Does anyone know if this is suitable to use in high traffic production  
> environments?

We used to use this perl module in production about 3 years ago for  
relatively heavy production traffic (we have way more traffic today)  
but it was slow, unscalable, and blocking on I/O. We switched to the  
ngx\_http\_lua\_module since then and it has been much faster and  
guarantees 100% nonblocking network I/O. Disclaimer: I am the  
maintainer of the ngx\_http\_lua\_module.

See [GitHub - openresty/lua-nginx-module: Embed the Power of Lua into NGINX HTTP servers · GitHub](https://github.com/openresty/lua-nginx-module#readme)

We still use Perl for many offline work like automated testing (based  
on the CPAN module Test::Nginx [1]) and WAF’s Lua code generation (the  
modsecurity rules to Lua translator is written in Perl). I’ve also  
been working on the Lemplate compiler [2] in Perl that compiles Perl’s  
TT2 templates down to standalone Lua code runnable atop the  
ngx\_http\_lua\_module.

Hope it helps.

Best regards,  
-agentzh

[1] [Test::Nginx - Data-driven test scaffold for Nginx C module and Nginx/OpenResty-based libraries and applications - metacpan.org](https://metacpan.org/pod/Test::Nginx)  
[2] [https://metacpan.org/pod/Lemplate](https://metacpan.org/pod/Lemplate)
