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

JapanTaxiの事業を支える動態サーバー について

JapanTaxiの事業を支える動態サーバー について

ToshiyukiHirai

November 13, 2019
Tweet

More Decks by ToshiyukiHirai

Other Decks in Technology

Transcript

  1. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved ໨࣍

    2 1. ࣗݾ঺հ 2. ಈଶαʔόʔʹ͍ͭͯ • ಈଶαʔόʔͷ֓ཁઆ໌ • Πϯϑϥߏ੒֓ཁͷ঺հ 3. ӡ༻ɾอकͷ՝୊ • ՝୊/ղܾํ๏ 4. ࠓޙͷల๬Ҋ • ՝୊/ղܾํ๏
  2. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved ࣗݾ঺հ

    4 લ৬·Ͱ ιϑτ΢ΣΞΤϯδχΞͱͯ͠ɺதখͷSIerͰ਺ࣾ ܦݧͨ͠ޙɺ લ৬Ͱ͸ࣗಈൢചػͷIoTγεςϜɹ ͳͲAWS׆༻ͨ͠ɺΠϯϑϥߏஙɾΞϓϦέʔγϣ ϯ։ൃ΍ϓϩδΣΫτɾ૊৫ϚωʔδϝϯτΛܦݧ JapanTaxiͰ͸ 2019೥4݄ʹJapanTaxiʹೖࣾɻೖࣾޙ͸ɺιϑτ ΢ΣΞΤϯδχΞͱͯ͠ɺಈଶαʔόʔΛ࢝Ίͱ͢ ΔΠϯϑϥͷอकɾӡ༻΍഑ंγεςϜͷόοΫΤ ϯυ։ൃΛ୲౰
  3. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved ಈଶαʔόʔͱ͸ʁ

    6 1. Ґஔ৘ใ 2. λΫγʔͷঢ়ଶ(ྫ:ۭं΍ܴंͳͲ) 3. ࣌଎ etc. ҰݴͰݴ͑͹ɺλΫγʔʹؔ͢Δ֤छ৘ใΛऔू͢Δαʔόʔ (ଆͷॲཧ) ྫ͑͹ɺ
  4. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved ಈଶσʔλͷ׆༻ྫ

    9 ྫ3ʮJapanTaxiʯΞϓϦ͔Β஫จͨ͠ࡍͷं྆ͷݕࡧ ஫จγεςϜ εϚϗΞϓϦ ഑ंγεςϜ (ΫϥΠΞϯτ) ৐٬ ৐຿һ ഑ंγεςϜ (αʔό) ಈଶ σʔλ
  5. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved Redisͷं྆૿୆ʹΑΔෛՙରࡦ

    14 JapanTaxiʹ͸ɺچಈଶαʔόʔ(2019೥9݄ʹഇࢭ)͕͋Γɺઌ ΄Ͳ঺հͨ͠ಈଶσʔλ͸ݩʑ͸ɺͦͪΒΛར༻͍ͯͨ͠ɻ 2019೥4݄Ҏલ͸ɺձࣾશମͰͷར༻લఏͰ͸ͳ͘ɺҰ෦ϓϩ μΫτͷಈଶ͔͠RedisʹೖΕ͍ͯͳ͔ͬͨͨΊɺ࠷௿ݶͷ࢓ ૊Έ͔͠ͳ͔ͬͨɻ <എܠ>
  6. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved Redisͷं྆૿୆ʹΑΔෛՙରࡦ

    16 ݕূ؀ڥͰRedisΛεέʔϧΞοϓͨ͠Βɺ਺े෼μ΢ϯλΠϜ͕ ൃੜͨͨ͠ΊɺϏδωεʹΠϯύΫτΛ༩͑ͯ͠·͏ɻ ࠓޙɺं͕྆૿୆͢ΔதͰɺ͜ͷ··ͷ࢓૊Έͩͱݫ͍͠ͱ൑அ ͨ͠ɻ <ରԠࡦ> ΫϥελʔϞʔυͷ༗ޮԽ(RedisClusterԽ)Λߦ͍ɺෛՙ͕ߴ͘ ͳͬͨ৔߹ɺεέʔϧΞοϓͰͳ͘ɺεέʔϧΞ΢τ(γϟʔυΛ ૿΍͢)͢Δઓུ΁มߋ͠ɺμ΢ϯλΠϜΛ࠷খݶʹ཈͑Δ࢓૊Έ ͱͨ͠ɻ <՝୊>
  7. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved LambdaͷσϓϩΠͷख͕͔͔ؒΔ

    17 Lambda΁ͷσϓϩΠ͕ɺΤϯδχΞͷ৺Թ·Δख࡞ۀͩͬ ͨ… <ରԠࡦ> <՝୊> Serverless Frameworkͷར༻͠ɺઃఆͷίʔυԽ΍ɺࣗಈͰ όοΫΞοϓΛ͢ΔΑ͏ʹͨ͠ɻ ·ͨɺGitHubͷmaster/develop΁ͷϚʔδΛϑοΫʹTravis CI ͔ΒAWS؀ڥ΁ࣗಈσϓϩΠ͢Δ࢓૊ΈΛ࡞ͬͨɻ
  8. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved RedisClusterͷ͓࢓ࣄ͍ͯ͠ͳ͔ͬͨ໰୊

    18 RedisClusterͷҰ෦ͷηΧϯμϦϊʔυͰɺHGETALLͳͲ σʔλͷऔಘίϚϯυ͕࣮ߦ͞Ε͍ͯͳ͔ͬͨɻ <՝୊>
  9. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved 19

    <ରԠࡦ> go-redis(GoͷRedis SDK)ͷϥΠϒϥϦͷύϥϝʔλΛݟ௚͠ ͨɻ RedisClusterͷ͓࢓ࣄ͍ͯ͠ͳ͔ͬͨ໰୊
  10. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved DynamoDBΩϟύγςΟ໰୊

    20 ৽ಈଶαʔόʔ΁ͷҠߦதʹ͋Δ೔ಥવɺLambdaͷॲཧ଎౓ ͕ٸܹʹ஗͘ͳͬͨɾɾɾ <՝୊>
  11. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved DynamoDB͔ΒͷҠߦ

    24 <վળࡦ> Elasticsearch Service OR Amazon Timestream ʹ৐Γ׵͑Δ 1.DynamoDB͕ಛੑ্ɺΞϓϦέʔγϣϯଆͰͷߜΓࠐΈͳ ͲΞϓϦέʔγϣϯଆͷॲཧ͕ෳࡶʹͳΔ܏޲͕͋ΓɺΞϓ Ϧέʔγϣϯͷอक޻਺͕ߴ͘ͳΔ܏޲͕͋Δɻ <՝୊> 2.DynamoDBͰGSIΛ௥Ճ͢ΔͱɺDynamoDBͷίετ͕ߴ͘ ͳΔ(௨ৗͷςʔϒϧॻ͖ࠐΈྉۚ×GSI௥Ճ෼)
  12. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved KinesisʹLambdaෳ਺ͿΒԼ͕Γ໰୊

    25 1ͭͷKinesis͔Βෳ਺ͷLambda͕ͿΒԼ͕Δܗʹͳ͓ͬͯ ΓɺKinesisͷಡΈࠐΈ࣌ͷ੍ݶʹ఍৮͠΍͘͢ͳ͍ͬͯΔɻ ͦͷͨΊɺLambda͔ΒͷಡΈࠐΈ࣌ͷ଎౓௿ԼͷཁҼʹͳΔ Մೳੑ͕͋Δɻ <՝୊>
  13. Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved KinesisʹLambdaෳ਺ͿΒԼ͕Γ໰୊

    27 <վળҊ> ͦΕͧΕͷ༻్ʹԠͨ͡KinesisΛ࡞੒͢Δ OR ֦ுϑΝϯΞ΢τΛར༻ͯ͠ɺ੍ݶΛճආ͢Δ
  14. จষɾը૾౳ͷ಺༰ͷແஅసࡌٴͼෳ੡౳ͷߦҝ͸͝ԕྀ͍ͩ͘͞ɻ Proprietary and Confidential ©2017 JapanTaxi, Inc. All Rights Reserved

    ˟102-0094ɹ౦ژ౎ઍ୅ా۠لඌҪொ3-12 3-12 Kioicho Chiyoda-ku, Tokyo 102-0094 Japan TEL 03-6265-6265ɹFAX 03-3239-8115 www.japantaxi.co.jp