•         id:winebarrel

•
•
•
•   LVS
•
•

➡
    msec
Web




App




DB
•
•

•
•

•
•
Web




App




DB
Web




• CentOS 5.x (VM)
• CPU x 2 Memory 2GB
• Apache 2.2.x
• mod_proxy_balancer
Web




PC
Web




munin
Web




access_log
Web




App




DB
App




• CentOS 5.x (VM)
• CPU x 4~8 Memory 4~16GB
• Mongrel 8~24 process
App




production.log
App




• munin
• FiveRuns
• New Relic
• Code reading
Web




App




DB
DB




• CentOS 5.x (1U)
• CPU x 8 Memory 16GB
• MySQL 5 (Tritonn)
DB




production.log SQL
• Web
        msec
• Web
        msec

• App
        msec
Web   App
• Passenger
• Passenger
➡App
•
•
•
•
•
➡   …
•
•
    • access_log
•
    • access_log
    • Apache
•
    • access_log
    • Apache
    •
•
    • access_log
    • Apache
    •
    •
• Ruby Enterprise Edition
• Ruby Enterprise Edition
➡                     Rails
•
•
    •
•
    •
        ‣
•
    •
        ‣
    •   Memcached
•
    •
        ‣
    •   Memcached

        ‣
•
    •
        ‣
    •   Memcached

        ‣
            ‣
•
    •
        ‣
    •   Memcached

        ‣
            ‣

➡
• mod_deflate
• mod_deflate
 ‣
•   Content-Type
• Content-Type
➡HTML
• Content-Type
➡HTML
•
• Content-Type
➡HTML
•
➡IE6 SPx Firefox
• Content-Type
➡HTML
•
➡IE6 SPx Firefox
• App
• Content-Type
➡HTML
•
➡IE6 SPx Firefox
• App
➡CPU
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/ext/apache2/
mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5
PassengerRuby /usr/local/bin/ruby

RailsEnv production
PassengerMaxPoolSize 8
PassengerHighPerformance on
PassengerUseGlobalQueue on
PassengerTempDir /var/passenger/tmp

<VirtualHost *:80>
 AddOutputFilterByType DEFLATE text/html
 BrowserMatch .* no-gzip
 BrowserMatch "bMSIE [7-9]" !no-gzip
 BrowserMatch ^Mozilla/[5-9] !no-gzip
 BrowserMatch "bMSIE 6.*bSV1b" !no-gzip

 ServerName 127.0.0.1
 DocumentRoot /foo/bar/zoo/public
</VirtualHost>
•
    ‣
        .jp


    ‣
•
    ‣
        .jp


    ‣
•
    msec
•
•

➡
Ajax
•
    ‣ Windows
    ‣ IE7
    ‣ Fiddler2
    ‣ Firebug
•
    ‣ Windows
    ‣ IE7
    ‣ Fiddler2
    ‣ Firebug
•
    ‣ Windows
    ‣ IE7
    ‣ Fiddler2
    ‣ Firebug
•   1s
•   1s

•
•        1s

•
• Ajax
•
•
• asset id   App
• Git   RAILS_ASSET_ID
• Git   RAILS_ASSET_ID
• Git   RAILS_ASSET_ID



➡
• Ajax
• Ajax
• onload
•
•
    ‣
•
•
•

➡
• BB FlashBack
• BB FlashBack
•
• BB FlashBack
•
• Ajax   msec
•
•
•
サーバー・クライアントの ボトルネック調査と高速化

サーバー・クライアントの ボトルネック調査と高速化