Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CloudflareとAWSの素敵な組み合わせ / Cloudflare with AWS

CloudflareとAWSの素敵な組み合わせ / Cloudflare with AWS

Cloudflare Meet-up Online!! #2
https://cfm-cts.connpass.com/event/292785/
で発表したスライドです。

Takuya Tachibana

October 17, 2023
Tweet

More Decks by Takuya Tachibana

Other Decks in Technology

Transcript

  1. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    $MPVEqBSFͱ"84ͷૉఢͳ૊Έ߹Θͤ
    $MPVEqBSF.FFUVQ0OMJOF
    ཱՖ୓໵
    ⼩規模案件でも使える

    View full-size slide

  2. ࣗݾ঺հ
    ཱՖ ୓໵ (39)
    @biatunky
    ੨৿ݝੜ·Εઋ୆ܦ༝੨৿ݝ
    גࣜձࣾϔϓλΰϯ୅දऔక໾
    גࣜձࣾσδλϧΩϡʔϒऔక໾
    Cloudflare Meet-up Sendai
    AWS Ambassador (2021,2022)
    APN AWS Top Engineer (2021,2022)
    ޷͖ͳCDNɿCloudflare (2015೥͔Β࢖ͬͯ·͢)

    View full-size slide

  3. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    ձࣾ֓ཁ

    ໊ࣾ גࣜձࣾϔϓλΰϯ IFQUBHPOJOD

    ཧ೦
    إΛ஌Βͳ͍ສਓͷ޾ͤΑΓ΋
    ࣗ෼ͨͪͷ਎ۙͳਓΛςΫϊϩδʔͰ޾ͤʹ
    ࣄۀ಺༰
    Ϋϥ΢υͷߏஙอकӡ༻
    Ϋϥ΢υωΠςΟϒͳ։ൃ
    Ϋϥ΢υಋೖʹؔ͢ΔίϯαϧςΟϯά
    ಺੡Խࢧԉ
    αΠτ IUUQTIFQUBHPODPKQ
    Ҋ݅ϕʔεͰׂҎ্͕౦๺ͷϓϩ
    δΣΫτ
    ࣾϓϩδΣΫτΛ௒͑Δϓ
    ϩδΣΫτΛ"84্΁ߏஙՔಇ
    ϔϓλΰϯ͸
    ϕΨϧλઋ୆/ϰΝϯϥʔϨീށ
    /γϯτʹτϩΠσϯVV
    ΛԠԉ͍ͯ͠·͢ɻ

    View full-size slide

  4. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    ஍ํதখاۀͰͷ8αΠτӡ༻ͷ՝୊

    ɾ݄ʑͷ༧ࢉ͕5000ԁ͔͠ͳ͍Αʂ
    ɾΞΫηε͸݄1000PV΋͋ΔΑʂ
    ɾαʔόམͱͪ͠ΌμϝͩΑ
    ɾͨ·ʔʹϝσΟΞʹͰΔΑ
    ɾվ͟Μͱ͔ා͍͔ΒηΩϡϦςΟͪΌΜͱ΍ͬͯͶ
    ίετ΍τϥϑΟοΫҎ֎ʹٻΊΒΕΔΫΦϦςΟ͸ن໛ʹ͋Μ·Γؔ܎ͳ͍
    Ͱ΋͓ۚ͸ͳ͍

    View full-size slide

  5. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    $MPVEqBSF$%/ͷ࢖͍ํ

    Amazon
    EC2
    t3.micro
    - సૹྔΛCloudflare΁Φϑϩʔυ͢Δ͜ͱͰ
    AWSͷసૹྔΛένΔ࡟ݮ͢Δ
    - EC2͸খ͞ͳεϖοΫͰ΋ͦΕͳΓͷΞΫη
    εʹ଱͑͏Δ
    - WAF΍SSL͕ແྉͰར༻Ͱ͖Δ

    View full-size slide

  6. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    $MPVEqBSFΛ׆༻ͨ͠౦๺ͷࣄྫ

    https://www.j-streetjazz.com/

    View full-size slide

  7. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    $MPVEqBSFΛ׆༻ͨ͠౦๺ͷࣄྫ

    https://cogycogy.com/

    View full-size slide

  8. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    ࣮ࡍͷಋೖޮՌ

    View full-size slide

  9. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    ಋೖ࣌ͷϙΠϯτ
    - Ωϟογϡର৅ͷϑΝΠϧ͕σϑΥϧτͰܾ·͍ͬͯΔ
    - ֦ுࢠͰ൑ఆ͞ΕΔ
    - CloudflareଆͰΩϟογϡର৅ΛมߋՄೳ
    - ΩϟογϡϔομͰ΋੍ޚՄೳ
    - API͔ΒΩϟογϡΫϦΞ΋Մೳ

    View full-size slide

  10. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    ಋೖ࣌ͷϙΠϯτ
    - CDNͰϓϩΩγ͞ΕΔͷͰΦϦδϯαʔό͔ΒΤϯυϢʔβʔͷ৘ใऔಘ͸Ұ޻෉
    - ΞϓϦέʔγϣϯ͔Β͸HTTPϔομΛX-Forwarded-Proto΍X-Forwarded-ForΛࢀর
    - Cloudflare͔ΒΦϦδϯ΁ͷ઀ଓํ๏͸બ୒Ͱ͖Δ
    - σϑΥϧτઃఆͷϩάΛݟͯCloudflareͷIPͷΞΫηεΛࢭΊΔͱେมͳ͜ͱ͕…

    View full-size slide

  11. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    ಋೖ࣌ͷϙΠϯτ
    - ഑৴଎౓޲্ͷͨΊʹϓϩτίϧ΍ѹॖͳͲͷ࠷దԽͷػೳ͕๛෋
    - Auto MinifyͰද่ࣔΕͨ͜ͱ͕͋ͬͨͷͰςετͭͭ͠࢖͍·͠ΐ͏
    - ඪ४ͰWAF͕࢖͑Δ (ߴػೳ൛͸༗ྉ)
    -ɹܦݧ্ɺFalse Positiveʹͳͬͨ͜ͱ͕ͳ͍

    View full-size slide

  12. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    ஍ํதখاۀͰͷ8αΠτӡ༻ͷ՝୊͕$MPVEqBSFͰղܾʂ

    ɾ݄ʑͷ༧ࢉ͕5000ԁ͔͠ͳ͍Αʂ
    ɾΞΫηε͸݄1000PV΋͋ΔΑʂ
    ɾαʔόམͱͪ͠ΌμϝͩΑ
    ɾͨ·ʔʹϝσΟΞʹͰΔΑ
    ɾվ͟Μͱ͔ා͍͔ΒηΩϡϦςΟͪΌΜͱ΍ͬͯͶ

    View full-size slide

  13. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    $MPVEqBSF͸͍͍ͧʂ

    View full-size slide

  14. ˜IFQUBHPOJOD"MM3JHIUT3FTFSWFE
    ͓஌Βͤ

    ϔϓλΰϯͷϖʔδͷηϛφʔϖʔδ͔Βਃ͠ࠐΈ͍ͩ͘͞

    View full-size slide