Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
新卒で始めるパフォーマンス改善【OpenSearchで苦労した話】
Search
kandalog
February 24, 2025
Programming
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
新卒で始めるパフォーマンス改善【OpenSearchで苦労した話】
kandalog
February 24, 2025
More Decks by kandalog
See All by kandalog
must can willで振り返る新卒1年目とこれから
kandalog
0
150
失敗から学ぶチームコミュニケーション
kandalog
0
110
Other Decks in Programming
See All in Programming
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
390
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.9k
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
200
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
12
11k
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
210
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.1k
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
130
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
290
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
160
AI-Powered Domain-Driven Design
ziobrando
0
350
Groovy as a human and AI friendly programming language
paulk
0
130
Featured
See All Featured
Mind Mapping
helmedeiros
1
410
sira's awesome portfolio website redesign presentation
elsirapls
0
470
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
370
We Are The Robots
honzajavorek
0
410
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
310
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
The Curious Case for Waylosing
cassininazir
1
590
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
530
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
430
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
The Cult of Friendly URLs
andyhume
79
7k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
Transcript
©2024 Metaps Holdings, Inc. 新卒で始めるパフォーマンス改善 【OpenSearchで苦労した話】 株式会社メタップスホールディングス 新卒エンジニア 神⽥ 崇彰
©2024 Metaps Holdings, Inc. ⾃⼰紹介 神⽥ 崇彰 株式会社メタップスホールディングス 新卒エンジニア Takaaki
Kanda @tee_develop 2020年からWebアプリケーション開発を独学で学習。イタンジ株式会社に てPythonエンジニアとして経験を積んだ後、Simple株式会社にてフロン トエンドのリプレスを技術選定から担当し、開発に従事。 ⼤学卒業後は株式会社メタップスホールディングス、プラットフォーム戦 略部にて、srestの開発に従事 2
©2024 Metaps Holdings, Inc. srestはAWSファンデーショナルテクニカルレビュー (FTR)認証を取得しています
©2024 Metaps Holdings, Inc. 無料トライアル実施中!詳しくはお声がけください。
©2024 Metaps Holdings, Inc. OpenSearch
©2024 Metaps Holdings, Inc. OpenSearch 検索 集約 ログ分析 サイト検索 アプリのモニタリング
⾼速な検索エンジン 爆速
©2024 Metaps Holdings, Inc. OpenSearch srestでの使い⽅ AWSのイベントデータ コスト情報
©2024 Metaps Holdings, Inc. OpenSearch 検索条件 集計条件 作業⼿順 ▶ indexを作成
▶ データを投⼊ ▶ 検索条件の記述 ▶ 集計条件の記述
©2024 Metaps Holdings, Inc. OpenSearch 付属のDashBoardが便利
©2024 Metaps Holdings, Inc. 課題(パフォーマンス改善が必要だった理由) 30秒もユーザーを待たせたくない レスポンスが遅すぎてタイムアウトが発⽣する AWSの料⾦を可視化する機能 1年分のAWS Service毎のコスト情報を詳しく取得
AWS Lambdaで利⽤しているAPI GateWayの制限に引っかかる(30秒)
©2024 Metaps Holdings, Inc. そもそもなんで遅かったのか データの集計処理を全てRubyでやっていた ▶ 万単位データ集計をRubyで頑張ってた ▶ Rubyはそんなに速くない
▶ nested loopを含む関数を複数通す必要がある
©2024 Metaps Holdings, Inc. 私のレベル感
©2024 Metaps Holdings, Inc. 私のレベル感 検索エンジン?
©2024 Metaps Holdings, Inc. ブラウザの話?
©2024 Metaps Holdings, Inc. ⼀旦遊んでみる OpenSearchを好きに動かしてみる ▶ Docker環境の⽤意 ▶ 公式ドキュメントを読む
▶ Qiitaの記事読みながら好きにさわってみる ▶ ⽣成系AIを先⽣に壁打ち 初めての技術領域で右も左もわからない状態なので、まずは感覚を掴む
©2024 Metaps Holdings, Inc. 苦労した話
©2024 Metaps Holdings, Inc. 苦労した話 1 投⼊すべきデータの整形 ▶ タスクを進めるにあたって投⼊すべきデータを整形する必要があった ▶
何万⾏のデータに圧倒される ▶ ./jqコマンドが便利
©2024 Metaps Holdings, Inc. 苦労した話 1 投⼊すべきデータの整形 ▶ 不要なJSONを取り除く ▶
JSONの改⾏を取り除く ▶ {“index”: {}}{データ}の順で1⾏ずつ繰り返す
©2024 Metaps Holdings, Inc. 苦労した話 2 index構造が定まらない ▶ indexは既に作られていて検索と集計を担当してた ▶
途中でこの構造だと無理だと悟る ▶ 何度が構造を変更しながら試⾏錯誤が続く
©2024 Metaps Holdings, Inc. 苦労した話 3 仕様の漏れ ▶ 仕様の考慮漏れにより、index構造の再定義とクエリの再考が必要になった ▶
振り出しへ
©2024 Metaps Holdings, Inc. 苦労した話 3 仕様の漏れ ▶ 仕様の考慮漏れにより、index構造の再定義とクエリの再考が必要になった ▶
振り出しへ index構造を単純化
©2024 Metaps Holdings, Inc. 結果どうなった?
©2024 Metaps Holdings, Inc. 結果 タイムアウト 5.23秒 タイムアウト問題の解決 Web検証ツール 10秒以上
0.1秒 処理部分
©2024 Metaps Holdings, Inc. 結果 集計を⽬的とした関数:10 集計処理の関数: 0 ⼤量の集計処理の削除 移⾏後
©2024 Metaps Holdings, Inc. 感想
©2024 Metaps Holdings, Inc. 感想 ⼤変だったけど良い学びになった ▶ クリティカルなバグを含む重要なタスクを⼀任されてうれしい ▶ 仕様はちゃんと把握しよう
▶ 最後はやり切るぞという気合いが重要 ▶ OpenSearchの⾼速ドキュメント検索は多くの企業で需要ありそう
©2024 Metaps Holdings, Inc. 初LT登壇でした ありがとうございました