HTTPレイヤーで行うパフォーマンスチューニング (WEBエンジニア勉強会 #05)
by
OSCA
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
04$" ᖛ Ұೋࡾ !FOHJOFFS@PTDB )551ϨΠϠʔͰߦ͏ ύϑΥʔϚϯενϡʔχϯά
Slide 2
Slide 2 text
© OSCA • ͕ࣗʹɺࣗͰ։ൃ͍ͯ͠Δ8αʔϏεͷ ύϑΥʔϚϯενϡʔχϯάΛ͔ͬͨΒɻ (PPHMF1BHF*OTJHIUT ͷείΞΞοϓ • ͳΜͰج൫ٕज़ΛΔ͜ͱ͕ॏཁͰɺ8ͷͱ ͳΔ)551ͷࣝͷڞ༗Λ͍ͨ͠ɻ • લճͷʮ8ΤϯδχΞษڧձ ʯͰɺ8PSE1SFTT ͷνϡʔχϯάͷ͕͋ͬͨͷͰɺͦΕͷิͱͯ͠ɻ ࠓ͜ͷςʔϚΛબΜͩཧ༝
Slide 3
Slide 3 text
ࣗݾհ © OSCA 04$"ᖛ Ұೋࡾ ·ͷ ͔ͣ;Έ ϓϩδΣΫτϚωʔδϟʔ ܠࣸਅՈ +BWB 1)1ϝΠϯͷ8ΤϯδχΞ ਓೳ "* ؔ࿈ͬͯΔ ݸਓͰ714आΓͯ8αʔϏεΛӡӦத ເͷࠃ ెาݍॅΈ !FOHJOFFS@PTDB !PTDBQIPUP!EJTOFZ@PTDB
Slide 4
Slide 4 text
© OSCA • ͡Ίʹ • ίϯςϯπΛϒϥβΩϟογϡͤ͞Δ ֓ཁ • )551௨৴ѹॖΛ͢Δ ֓ཁ • ίϯςϯπΛϒϥβΩϟογϡͤ͞Δ ࣮ԋ • )551௨৴ѹॖΛ͢Δ ࣮ԋ • "QBDIFIUUQE ʹ͓͚Δઃఆ • OHJOY ʹ͓͚Δઃఆ • ϓϩάϥϜ͔Βར༻͢Δ)551ΫϥΠΞϯτʹ͍ͭͯ • ·ͱΊ ࣍
Slide 5
Slide 5 text
© OSCA 8αΠτΞΫηεʹɺ)551Λར༻͍ͯ͠Δ͜ͱ0,ʁ ॳ৺ऀͷํͷͨΊͷ)551ͷ͓͞Β͍ αʔόʔ ϒϥβ ΫϥΠΞϯτ GET /index.html HTTP/1.1 Host: www.yahoo.co.jp HTTP1.1 200 OK … …
Slide 6
Slide 6 text
© OSCA ͠Β͘ߋ৽͕ͳͦ͞͏ͳಉҰίϯςϯπͷΞΫηεΛݮ Β͠ɺΩϟογϡΛར༻ͤ͞Δ͜ͱͰදࣔΛߴԽͤ͞Δɻ ίϯςϯπΛϒϥβΩϟογϡͤ͞Δ BCDQOH ͪΐ͏͍ͩʂ BCDQOH ͪΐ͏͍ͩʂ BCDQOH ͪΐ͏͍ͩʂ BCDQOH ͪΐ͏͍ͩʂ ΫϥΠΞϯτ αʔόʔ
Slide 7
Slide 7 text
© OSCA ίϯςϯπΛϒϥβΩϟογϡͤ͞Δ BCDQOH ͪΐ͏͍ͩʂ BCDQOH ͪΐ͏͍ͩʂ BCDQOH ͪΐ͏͍ͩʂ BCDQOH ͪΐ͏͍ͩʂ ݄·Ͱɺ ͜ΕΛͬͯʂ ͠Β͘ߋ৽͕ͳͦ͞͏ͳಉҰίϯςϯπͷΞΫηεΛݮ Β͠ɺΩϟογϡΛར༻ͤ͞Δ͜ͱͰදࣔΛߴԽͤ͞Δɻ ΫϥΠΞϯτ αʔόʔ
Slide 8
Slide 8 text
© OSCA ίϯςϯπΛϒϥβΩϟογϡͤ͞Δ )551Ϩεϙϯεϔομʹ &YQJSFTϔομΛ༩ͯ͠ɺί ϯςϯπͷΩϟογϡ༗ޮظݶΛΒͤΔɻ αʔόʔ ϒϥβ ΫϥΠΞϯτ GET /logo.png HTTP/1.1 Host: www.hogemoge.co.jp HTTP1.1 200 OK Expires: Wed, 24 Jan 2018 06:53:29 GMT ( )
Slide 9
Slide 9 text
© OSCA )5.- $44 +BWB4DSJQU 9.- +40/ͳͲͷςΩετ ϑΝΠϧΛѹॖͯ͠ड৴͢Δɻ ड৴σʔλྔ͕ݮΓɺߴ ʹͳΔɻ ͨͩ͠ɺΫϥΠΞϯτͱαʔόʔͷ྆ํ͕ɺಉ͡ѹॖܗࣜΛ αϙʔτ͍ͯ͠Δඞཁ͕͋Δɻ ͦ͜Ͱɺ"DDFQU&ODPEJOH ϔομͱ$POUFOU&ODPEJOH ϔομΛར༻͢Δɻ )551௨৴ѹॖΛ͢Δ
Slide 10
Slide 10 text
© OSCA )551௨৴ѹॖΛ͢Δ αʔόʔ ϒϥβ ΫϥΠΞϯτ GET /index.html HTTP/1.1 Host: www.hogemoge.co.jp Accept-Encoding: gzip, deflate HTTP1.1 200 OK Content-Encoding: gzip (HTML)
Slide 11
Slide 11 text
© OSCA ϒϥβΩϟογϡ • NPE@FYQJSFT ϞδϡʔϧͷಡࠐΈ͕ඞཁ • ྫ 1/(ը૾ͷϒϥβΩϟογϡظؒΛϲ݄ʹઃఆ "QBDIFIUUQE ʹ͓͚Δઃఆ LoadModule expires_module modules/mod_expires.so ExpiresActive On ExpiresByType image/png "access plus 1 month"
Slide 12
Slide 12 text
© OSCA )551ѹॖ • H[JQѹॖ NPE@EFGMBUF ϞδϡʔϧͷಡࠐΈ͕ඞཁ • ྫ ςΩετ )5.- $44 +BWB4DSJQUΛѹॖ͢Δ "QBDIFIUUQE ʹ͓͚Δઃఆ LoadModule deflate_module modules/mod_deflate.so AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript
Slide 13
Slide 13 text
© OSCA OHJOYʹ͓͚Δઃఆ ϒϥβΩϟογϡ • FYQJSFTͷهड़Λ͢Δ͚ͩɻ • ରΛ֦ுࢠͰߜΔ߹࣍ͷΑ͏ͳهड़ɻ expires 30d; location ~ .*¥.(html|jpg|gif|png|css|js) { expires 30d; }
Slide 14
Slide 14 text
© OSCA )551ѹॖ • H[JQ POͱ H[JQ@UZQFT ͷهड़Ͱࢦఆ͢Δɻ OHJOYʹ͓͚Δઃఆ gzip on; gzip_types text/html text/css text/javascript
Slide 15
Slide 15 text
© OSCA ϓϩάϥϜதͰ +40/ 9.-ͳͲ"1*Λݺͼग़͢͜ͱ͕ ͋Δͱࢥ͍·͢ɻ ͦͷࡍʹ)551ѹॖͬͯؾʹ͍ͯ͠·͢ ͔ʁ ݴޠඪ४ͷωοτϫʔΫܥΫϥεɾؔΛར༻͢Δ߹ɺࣗ Ͱ $POUFOU&ODPEJOHϔομΛஅͯ͠ղౚ͠ͳ͍ͱ͍ ͚ͳ͍߹͕ଟ͍͕ɺߴػೳͳ)551$MJFOUϥΠϒϥϦΛར ༻͢Εɺ)551ѹॖͷ෦Ӆṭͯͬͯ͘͠ΕΔ߹͕ ͋Δɻ ϓϩάϥϜ͔Βར༻͢Δ)551ΫϥΠΞϯτ
Slide 16
Slide 16 text
© OSCA ͓ΘΓʹ • ຊεϥΠυͷͭͷνϡʔχϯάɺ͋ͳͨͷ8αʔ Ϗεʹߩݙ͢Δ͚ͩͰͳ͘ɺΠϯλʔωοτͷύ έοτΛݮΒ͢͜ͱ͕Ͱ͖ΔΫϦʔϯͳςΫχοΫͰ͢ɻ • 8ͷলΤωɾলίετʹߩݙͷ͍͔͕Ͱ͠ΐ͏͔ɻ