Rewrite lookup via MySQL table

relix nginx-forum at nginx.us
Mon Aug 30 17:04:15 MSD 2010


Ah, thanks, that does make sense!

agentzh Wrote:
-------------------------------------------------------
> On Sat, Aug 28, 2010 at 8:54 PM, relix  wrote:
> > First of all, this thread contains a lot of
> information! I'm in the
> > process of implementing something similar and it
> has helped me a ton.
> >
> > I was just wondering, as long as you're using
> Lua anyway, why not do
> > away with Drizzle completely, and just make Lua
> connect to the database
> > to retrieve the correct URL?
> 
> Lua's database library will block the nginx
> process which is
> unacceptable for real world applications.
> ngx_drizzle is served as a
> non-blocking mysql driver component for Lua here
> (of cause, it can
> also work with ngx_http_js_module and others).
> 
> > Is it because Drizzle will keep one
> > connection to the database per nginx-instance,
> so there is less
> > overhead,
> 
> Actually ngx_drizzle can keep connection pools to
> mysql backends per
> nginx instance. One db connection per process is
> the suboptimal
> PHP/Perl way of doing things and it can waste a
> lot of database
> resources.
> 
> > compared to Lua which would have to connect and
> disconnect to
> > the database for every request?
> >
> 
> MUCH more than just that ;)
> 
> Cheers,
> -agentzh
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,122977,125201#msg-125201




More information about the nginx mailing list