Slide 1

Slide 1 text

͞ΑͳΒɺϨΨγʔը૾ม׵γεςϜ Diverse.tech #1 ʙϨΨγʔγεςϜΛޠΒ͏໷ʙ November 22, 2018 Daichi TOMA

Slide 2

Slide 2 text

About Me ᙛᚸ େઍ @Amothic גࣜձࣾ Diverse Poiboy ͷαʔόαΠυ΍ΠϯϑϥΛݟͨΓ ૊৫पΓͷվળΛߦͬͯ·͢

Slide 3

Slide 3 text

ϨΨγʔγεςϜͰ௚໘ͯ͠ࠔΔ͜ͱ • ো֐͕ى͖ͯ΋௚͠ํ͕෼͔Βͳ͍ɺ
 ΋͘͠͸म෮खॱ͕ෳࡶ • εέʔϧΞ΢τɺεέʔϧΠϯ͕೉͍͠ ○ εέʔϥϏϦςΟ͕ߟྀ͞Ε͓ͯΒͣɺ
 Մ༻ੑ΋௿͍

Slide 4

Slide 4 text

ϨΨγʔγεςϜ͸
 Մ༻ੑ΍৴པੑ͕௿͍

Slide 5

Slide 5 text

ϨΨγʔγεςϜΛ
 ͲͷΑ͏ʹվળ͢Δ͔

Slide 6

Slide 6 text

Մ༻ੑ΍৴པੑΛ
 ࣗલͰ௥ٻ͍ͯ͘͠ͷ͸
 ίετ͕ߴ͍

Slide 7

Slide 7 text

ͳΔ΂͘ϚωʔδυαʔϏε Λ࢖ͬͯίετΛԼ͍͛ͯ͘

Slide 8

Slide 8 text

Poiboy ͷطଘͷը૾ม׵γεςϜ nginx ϩʔυόϥϯγϯά squid Ωϟογϡ ngx_small_light ը૾ม׵ Request S3

Slide 9

Slide 9 text

طଘγεςϜͷ໰୊఺ • nginx ΁ͷઃఆ͕खॻ͖ɺނো࣌ʹखಈͰ config Λ
 ॻ͖௚ͯ͠੾Γସ͑ͳ͚Ε͹ͳΒͳ͍ ○ ϔϧενΣοΫ͸ར༻͍ͯ͠ͳ͔ͬͨ • ߏஙͷखॱ͕൥ࡶɺखಈͰαʔόͷηοτΞοϓΛ ߦ͏ඞཁ͕͋Δ • ߏஙͷखॱ͕ෳࡶͷͨΊɺεέʔϧΞ΢τ΍
 εέʔϧΠϯ͕େม

Slide 10

Slide 10 text

ͭΒ͍

Slide 11

Slide 11 text

ϨΨγʔγεςϜΛ
 Ұͭͣͭஔ͖׵͍͑ͯ͘

Slide 12

Slide 12 text

CloudFront ͷར༻ • ͓खܰ CDN • nginx ͱ squid Λ CloudFront ʹஔ͖׵͑Δ • ैྔ՝ۚͷΦʔτεέʔϧͰɺ
 େྔͷΞΫηε͕དྷΔ͜ͱʹͳͬͯ΋҆৺ • ແྉͰ SSL ূ໌ॻ΋࢖͑Δ

Slide 13

Slide 13 text

Docker ͷ׆༻ • ngx_small_light ͷηοτΞοϓͷίετΛ
 Լ͛ΔͨΊ Docker Խ͢Δ • https://github.com/diverse-inc/docker-ngx-small- light • υΩϡϝϯτΛݟͳ͕ΒߏஙΛؤுΒͳͯ͘΋ྑ͍ • Docker Hub Λ׆༻ͯ͠ɺϏϧυ΋ࣗಈԽ͢Δ

Slide 14

Slide 14 text

ECS ͷར༻ • Docker ίϯςφΛ؆୯ʹ࣮ߦɺεέʔϧ
 Ͱ͖Δ • ࠓ·ͰखಈͰεέʔϧΛߦ͏ඞཁ͕͕͋ͬͨɺ ෛՙʹԠͯ͡਺ඵͰࣗಈతʹεέʔϧ • ϩʔυόϥϯγϯά΋ͯ͘͠ΕΔ

Slide 15

Slide 15 text

Poiboy ͷ৽͍͠ը૾ม׵γεςϜ CloudFront Ωϟογϡ ECS ίϯςφΦʔέετϨʔγϣϯ ngx_small_light ը૾ม׵ Request S3

Slide 16

Slide 16 text

Poiboy ͷ৽͍͠ը૾ม׵γεςϜ • ෛՙʹԠͯ͡উखʹεέʔϧ • ো֐࣌΋ϚωʔδυαʔϏε͕ྑ͠ͳʹͯ͠ ͘ΕΔ • खಈͰ΍Δ࡞ۀ͕ഉআ͞Ε͍ͯΔ

Slide 17

Slide 17 text

࠷ߴ

Slide 18

Slide 18 text

·ͱΊ • ϨΨγʔγεςϜ͸Մ༻ੑ΍৴པੑ͕௿͍ • ϚωʔδυαʔϏεΛ࢖͍ɺίετΛ
 Լ͛ͭͭஔ͖׵͑Δ • ߏ੒؅ཧ΋ίʔυԽࣗ͠ಈԽ͢Δ

Slide 19

Slide 19 text

༨ஊ • ͦΖͦΖը૾ม׵ͯ͘͠ΕΔ
 ϚωʔδυαʔϏε͕ AWS ʹཉ͍͠ • AWS ͡Όͳ͚Ε͹ Cloudinary ͱ͔ ImageFlux ͱ͔͋Γ·͢