accesslog into sql

Dave Bailey dave at daveb.net
Thu Feb 5 01:00:23 MSK 2009


I think one thing to worry about would be latency in the insert
statement execution.  While it is true that average performance can be
pretty good, one might occasionally see an insert take a long time for
various reasons... so it would be important either to separate the
insertions from the main event loop (so they don't block the worker
process), or use a database API that can be worked into an
event-driven program somehow (I am not aware of such an API for any
RDBMS).  It seems like it would be simpler to have, for example, an
ngx_http_accesslog_mysql module that generates the insert statements
(perhaps batching them up using MySQL's extended insert syntax) and
writes them to a file, where they can be loaded into the DB without
the potential to disrupt the performance of nginx.

-dave

On Wed, Feb 4, 2009 at 12:23 PM, István Szukács <leccine at gmail.com> wrote:
> i regret, depends on the configuration and the sql server type you might be
> able to do 1000 - 50 000 insert/sec
>
> if there is no huge overhead in the module you write you might get the same
> performance...
>
> anyhow, the best would be for Zoltan to get the flat files into the sql wo/
> nginx modification, i belive :)
>
>
> regards,
> Istvan
>
> On Wed, Feb 4, 2009 at 8:11 PM, István Szukács <leccine at gmail.com> wrote:
>>
>> ?
>>
>> i have seen nginx serving files 50K req/s on a single node, while an sql
>> server might be able to do 200-300 query/sec or so....
>>
>>
>>
>> On Wed, Feb 4, 2009 at 6:39 PM, Ask Bjørn Hansen <ask at develooper.com>
>> wrote:
>>>
>>> On Feb 4, 2009, at 8:49, István Szukács wrote:
>>>
>>>> why would you slow down the nginx 1000 times?
>>>
>>> Woah - nginx can do 20-30 million requests a second ?!
>>>
>>>
>>>  - ask
>>>
>>> --
>>> http://develooper.com/ - http://askask.com/
>>>
>>>
>>>
>>
>>
>>
>> --
>> the sun shines for all
>
>
>
> --
> the sun shines for all
>





More information about the nginx mailing list