ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Команду block SSI можно использовать только как stub в virtual?


  • To: nginx-ru@xxxxxxxxx
  • Subject: Команду block SSI можно использовать только как stub в virtual?
  • From: "Демченко Вячеслав" <word2electronics@xxxxxxxxxxxxxx>
  • Date: Sun, 9 Dec 2007 02:01:29 +0600
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=/bKxA9zXwruv0wwfDlmxyjIi7QbrO/fjSWyDR8DW7OU=; b=MlPnfugNjtM0wzyOcsXe2hxfFXLbXoMQi9G1ox5a0qxPNnR3MVyOBd8GSgkGgscGqanyec7+fDT/t7jMC2u8vsXdnV5SV2yPKbSXUq4Pl7kiRY0FhmbC4tomwYmdLPqwFjECPSRZZfFb8m+Ry0GG57Nq9eF9l7vTm98VwOztK8Q=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=f9B1DNwNPvmOfeZudLDhEdEww3eetwODj0RL8+U4/fZ4o3BO3LirUHXY2D9ZYfhMuULT+so1fz8+y+AmwN56mWnCHyPvaD7bV3fGtiBYjV04dx6K3beuClaV+lvn2N3RS3xlWvjc9t3vSK2m8eiwlEALBqZSzTOu9Haxnrlb3xg=

Здравствуйте!

Вопрос:
В текущей реализации команду block SSI можно использовать только как заглушку stub в virtual.

Есть ли какой либо другой варинт вывести block без использования virtual, по моему
скромному мнению, это было бы очень удобно, плюс расширяются возможности в
построении логики формирования ответа на уровне nginx, не в ущерб проиводительности,
даже наооброт повышения.

Приведу результаты моих тестов.

Имеем шаблон SSI: 1.html.
Блок который используется в 1.html, также вручную помещается в memcache.

И следующий конфиг:

        location /dynamic     {
            internal;
            return 404;
        }
       
        #location /dynamic     {
        #    internal;
        #    set             $memcached_key   "keymemcashe";
        #    memcached_pass  192.168.1.1:11211;
        #}

Тестировал ab следующим образом: ab -c 100 -n 500.

Р
езультаты
когда ответ формировался на уровне nginx без memcache:

Server Software:        nginx/0.5.33
Server Hostname:        xxxx
Server Port:            80

Document Path:          /ssi/1.html
Document Length:        177837 bytes

Concurrency Level:      100
Time taken for tests:   3.088 seconds
Complete requests:      500
Failed requests:        0
Broken pipe errors:     0
Total transferred:      97458740 bytes
HTML transferred:       97379006 bytes
Requests per second:    161.92 [#/sec] (mean)
Time per request:       617.60 [ms] (mean)
Time per request:       6.18 [ms] (mean, across all concurrent requests)
Transfer rate:          31560.47 [Kbytes/sec] received

Результаты когда ответ формировался на уровне nginx с memcache:

Server Software:        nginx/0.5.33
Server Hostname:        100lives-dev.kg
Server Port:            80

Document Path:          /ssi/1.html
Document Length:        177837 bytes

Concurrency Level:      100
Time taken for tests:   20.145 seconds
Complete requests:      500
Failed requests:        431
   (Connect: 0, Length: 431, Exceptions: 0)
Broken pipe errors:     0
Total transferred:      99889055 bytes
HTML transferred:       99811513 bytes
Requests per second:    24.82 [#/sec] (mean)
Time per request:       4029.00 [ms] (mean)
Time per request:       40.29 [ms] (mean, across all concurrent requests)
Transfer rate:          4958.50 [Kbytes/sec] received

Результаты на лицо, тестировал всё на одной машине.
Если еще убрать ненужные итерации связанные с block и virtual, наверняка производительность повысится.

Хотелось бы услышать ваше мнение по этим результатам, Игорь?

C Уважением Вячеслав.
Hello! Second var! If youd take a look at any web site, you will notice, that almost all of the pages on this given site are pretty static in their nature. Or course, this site could have some dynamic elements like login field or link in the header, some customized menu elements and some other things But entire page could be considered static in many cases. When I started thinking about my sites from this point of view, I understood, how great it would be to be able to cache entire page somewhere (in memcache for example) and be able to send it to the user without any requests to my applications, which are pretty slow (comparing to memcache ;-) ) in content generation. Then I came up with a pretty simple and really powerful idea Il describe in this article. An idea of caching entire pages of the site and using my application only to generate small partials of the page. This idea allows me to handle hundreds of queries with one server running pretty slow (yeah! it is slow even after all optimizations on MySQL side and lots of tweaks in sites code) Ruby on Rails application. Of course, the idea is kind of universal and could be used with any back-end languages, technologies or frameworks because all of them are slower then memcache in content generation So, first of all, let me describe tools I use in my solution (but it does not mean, that you must use the same software - it is just for example): If youd take a look at any web site, you will notice, that almost all of the pages on this given site are pretty static in their nature. Or course, this site could have some dynamic elements like login field or link in the header, some customized menu elements and some other things But entire page could be considered static in many cases. When I started thinking about my sites from this point of view, I understood, how great it would be to be able to cache entire page somewhere (in memcache for example) and be able to send it to the user without any requests to my applications, which are pretty slow (comparing to memcache ;-) ) in content generation. Then I came up with a pretty simple and really powerful idea Il describe in this article. An idea of caching entire pages of the site and using my application only to generate small parti als of the page. This idea allows me to handle hundreds of queries with one server running pr etty slow (yeah! it is slow even after all optimizations on MySQL side and lots of tweaks in si tes code) Ruby on Rails application. Of course, the idea is kind of universal and could be used with any back-end languages, technologies or frameworks because all of them are slower then memca che in content generation So, first of all, let me describe tools I use in my solution (but it does not mean, that you must use the same software - it is just for example): If youd take a look at any web site, you will notice, that almost all of the pages on this given site are pretty static in their nature. Or course, this site could have some dynamic elements like login field or link in the header, so me customized menu elements and some other things But entire page could be considered static in many cases . When I started thinking about my sites from this point of view, I understood, how great it would be to be able to cache entire page somewhere (in memcache for example) and be able to send it to the user without any requests to my applications, which are pretty slow (comparing to memcache ;-) ) in content generation. Then I came up with a pretty simple and really powerful idea Il describe in this article. An idea of caching en tire pages of the site and using my application only to generate small partials of the page. This idea allows me to handle hundreds of queries with one server running pretty slow (yeah! it is slow even after all optimi zations on MySQL side and lots of tweaks in sites code) Ruby on Rails application. Of course, the idea is ki nd of universal and could be used with any back-end languages, technologies or frameworks because all of the m are slower then memcache in content generation So, first of all, let me describe tools I use in my solution (but it does not mean, that you must use the same software - it is just for example):

 




Copyright © Lexa Software, 1996-2009.