Rewrite lookup via MySQL table

agentzh agentzh at gmail.com
Tue Aug 24 07:42:19 MSD 2010


On Tue, Aug 24, 2010 at 11:32 AM, agentzh <agentzh at gmail.com> wrote:
> Here's a sample configuration that has been tested on my laptop.
>
[snip]
>
> Then let's access /baz from the client side:
>
>    $ curl -i localhost:1984/baz
>    HTTP/1.1 302 Moved Temporarily
>    Server: nginx/0.8.41 (without pool)
>    Date: Tue, 24 Aug 2010 03:28:42 GMT
>    Content-Type: text/html
>    Content-Length: 176
>    Location: http://localhost:1984/foo/bar
>    Connection: keep-alive
>

Just a quick note regarding performance: on my ThinkPad T400 (Core2Duo
T9600) laptop, with only one nginx worker, and both ab and mysqld
running on the same machine, and no memcached and no result set
caching we get:

    Server Software:        nginx/0.8.41
    Server Hostname:        localhost
    Server Port:            1984

    Document Path:          /baz
    Document Length:        176 bytes

    Concurrency Level:      10
    Time taken for tests:   1.812 seconds
    Complete requests:      10000
    Failed requests:        0
    Write errors:           0
    Non-2xx responses:      10000
    Total transferred:      3900000 bytes
    HTML transferred:       1760000 bytes
    Requests per second:    5518.47 [#/sec] (mean)
    Time per request:       1.812 [ms] (mean)
    Time per request:       0.181 [ms] (mean, across all concurrent requests)
    Transfer rate:          2101.76 [Kbytes/sec] received

And with ngx_memc + ngx_srcache enabled, we can achieve 6200+ r/s with
the same settings.

Cheers,
-agentzh



More information about the nginx mailing list