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

Amazon Elasticsearch Serviceを使ってコンテンツ検索を速くした話

Amazon Elasticsearch Serviceを使ってコンテンツ検索を速くした話

AmazonElasticsearchを使って検索処理を改善した事例の共有資料です。

Nakamura shinichirou

July 10, 2017
Tweet

More Decks by Nakamura shinichirou

Other Decks in Technology

Transcript

  1. Amazon Elasticsearch Service
    Λ࢖ͬͯίϯςϯπݕࡧΛ
    ଎ͨ͘͠࿩

    View full-size slide

  2. ࣗݾ঺հ
    w ໊લɿதଜਅҰ࿠
    w גࣜձࣾώτϝσΟΞTUBSUVQEJW
    ॴଐDMBTTJʹग़޲
    w 3VCZ3BJMTΤϯδχΞ
    w $MBTTJʹ೥݄͔Β
    w 4/4ΞΧ΢ϯτɿT@OBLBNVSB

    View full-size slide

  3. BHFOEB
    w ݕࡧͷվળΛԿނ΍Δͷ͔
    w ݕࡧվળͷͨΊʹ΍ͬͨ͜ͱ
    w ݁ՌͲ͏ͳ͔ͬͨ

    View full-size slide

  4. ݕࡧͷվળΛԿނ΍Δͷ͔

    View full-size slide

  5. ݕࡧͷվળΛԿނ΍Δͷ͔

    View full-size slide

  6. ݕࡧͷվળΛԿނ΍Δͷ͔
    w ΋ͱ΋ͱ͸NSPPOHBͰ࡞ΒΕ͍͕ͯͨɺσʔλͷ
    ૿Ճͱͱ΋ʹ౰ॳͷσʔλઃܭͷ··Ͱ͸Ϩεϙ
    ϯεྼԽ͠ɺϢʔβମݧతʹྑ͘ͳ͍
    w ࣮ࡍʮ஗͍ʯ͍͏ΫϨʔϜ΋ɻߜΓࠐΈ৚݅Λࢦ
    ఆ͠ͳͯ͘΋ɺݕࡧʹඵҎ্͔͔͍ͬͯͨ
    w αʔϏεͱͯ͠க໋తͳ໰୊ʹͳΓ͔Ͷͳ͍

    View full-size slide

  7. ݕࡧͷվળΛԿނ΍Δͷ͔

    View full-size slide

  8. ݕࡧͷվળΛԿނ΍Δͷ͔
    w վળϙΠϯτ
    w
    ݖݶσʔλ͕֊૚తʹͳ͍ͬͯΔͨΊɺݕࡧ৚݅ʹ
    Ϛονͨ͠σʔλ͕ӾཡՄೳ͔Ͳ͏͔νΣοΫ͢Δͷʹ
    ͕͔͔࣌ؒΔɻ
    w
    ଐੑ৘ใ͕ผςʔϒϧʹ֨ೲ͞Ε͍ͯͯߜΓࠐΈݕ
    ࡧ࣌ʹ͜ͷςʔϒϧΛݟͯ֘౰͢Δσʔλͷ*%ҰཡΛऔ
    Γग़͢ඞཁ͕͋Δ
    w
    NSPPOHB΁ͷσʔλ൓ө͕࣌ؒҎ্͔͔Δɻ JOEFY
    ͷ࠶ߏஙΛ͓͖࣌ؒʹ͍͕ͯͨ͠ɺऴΘΒͳ͍

    View full-size slide

  9. ݕࡧͷվળΛԿނ΍Δͷ͔
    w ֊૚తͳσʔλߏ଄ͱ͸ʁ
    ਌ϑΥϧμ ࢠϑΥϧμ
    ࢠϑΥϧμ
    ςετ
    ςετ
    ςετ
    ςετ
    ςετ
    ςετ
    6TFS"ʹಡΈࠐ
    Έݖݶ͕͋Δ
    6TFS#ʹಡΈࠐ
    Έݖݶ͕͋Δ 6TFS"ʹಡΈࠐ
    Έݖݶ͕͋Δ
    6TFS"ͱ6TFS#ݖ
    ݶ͕͋Δ
    6TFS$ʹಡΈࠐ
    Έݖݶ͕͋Δ
    6TFS"ͱ6TFS$ݖ
    ݶ͕͋Δ

    View full-size slide

  10. ݕࡧͷվળΛԿނ΍Δͷ͔
    w Մมͳଐੑ৘ใ
    ςετ
    ςετ
    ςετ
    ೉қ౓
    ڭՊ
    ΧςΰϦ
    ΧςΰϦ
    ೉қ౓
    ڭՊ
    ςετͷଐੑ৘ใ͸
    ผςʔϒϧʹͳͬͯ
    ͍ΔͨΊɺݕࡧ࣌ʹ
    ৚݅ࢦఆ͞Εͨଐੑ
    Λ͍࣋ͬͯΔςετ
    ͷJEΛநग़͠ɺͦͷ
    JEΛJOͰࢦఆͭͭ͠
    ΩʔϫʔυݕࡧͰɾɾ
    ɾɾɾɾɻ
    ݁ՌϏοΫϦ͢ΔΑ
    ͏ͳJO͕۟ग़དྷ্
    ͕ͬͨ

    View full-size slide

  11. ݕࡧվળͷͨΊʹ΍ͬͨ͜ͱ

    View full-size slide

  12. ݕࡧվળͷͨΊʹ΍ͬͨ͜ͱ
    w ͳͥ&MBTUJDTFBSDI "NB[PO
    Λબ୒ͨ͠ͷ͔
    ݕࡧର৅ͷσʔλߏ੒͕ෳࡶͳͷͰɺυΩϡϝϯτࢤ
    ޲%#ͷ&MBTUJDTFBSDIͷํ͕Ϛον͢Δ
    NSPPOHB࢖͍ͬͯͨࠒͷΑ͏ʹJOEFYͷ࠶ߏஙʹ࣌
    ؒͱ͍͏͜ͱͳ͘ɺ%PDVNFOUొ࿥ޙ͙͢ʹݕࡧͰ
    ͖Δ
    ӡ༻ෛՙΛݮΒͨ͢Ίɺ&$ʹࣗલͰݕࡧ%#Λߏங
    ͢ΔͷͰ͸ͳ͘ɺ"NB[PO&MBTUJDTFBSDI4FSWJDFΛ
    ࢖͏͜ͱʹͨ͠

    View full-size slide

  13. ݕࡧվળͷͨΊʹ΍ͬͨ͜ͱ
    w Ͳ͏͍͏͜ͱ΍ͬͨͷ͔
    ݖݶ৘ใΛ഑ྻܗࣜʹ͠ɺBUUSJCVUF৘ใΛҰͭҰͭϑΟʔϧ
    υʹͯ͠ରԠ
    ɹɹˠ༨෼ͳ42-͕ͳ͘ͳΓɺෛՙ͕ܰݮͨ͠ɻ
    JNQPSUόονɾEPDVNFOUొ࿥ߋ৽࡟আ"1*
    ɹɹˠొ࿥ߋ৽࡟আʹ͔͔࣌ؒΔ͜ͱ͕ͳ͘ͳͬͨ
    Ͳ͏͍͏EPDVNFOU͕ొ࿥͞Ε͍ͯΔͷ͔σʔλ֬ೝ͍ͨ͠
    ͱ͖͸"&4ʹ͍͍ͭͯΔLJCBOBͰݟͨ
    ݕࡧύλʔϯ෼ςετॻ͍ͯ֬ೝ

    View full-size slide

  14. ݁ՌͲ͏ͳ͔ͬͨ

    View full-size slide

  15. ݁ՌͲ͏ͳ͔ͬͨ

    View full-size slide

  16. ݁ՌͲ͏ͳ͔ͬͨ
    w NTҎ্ͩͬͨ΋ͷ͕ɺNT
    w %PDVNFOUొ࿥΋΄΅ϦΞϧλΠϜʹͳͬͨ
    w ଎͘ͳ͓ͬͨӄͰ͓٬༷͔Βͷ൓Ԡ΋ྑ͔ͬͨ
    w &MBTUJDTFBSDIͷ৽͍͠όʔδϣϯ͕ग़͍ͯΔͷ
    ͰλΠϛϯάΈͯΞοϓσʔτ͍͖͍ͯͨ͠

    View full-size slide

  17. Ҏ্Ͱ͢ɻ
    ͝੩ௌ͋Γ͕ͱ͏͍͟͝·͢ʂ

    View full-size slide