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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
100
Other Decks in Programming
See All in Programming
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
500
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
4
2.5k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
450
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
380
Are APIs Still Relevant in the AI Era?
soyuka
0
260
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
150
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
WebAssembly in Android Apps 〜 WASMはJNIの夢を見るか
keiji
1
110
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
340
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
760
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
The Language of Interfaces
destraynor
162
27k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
690
Exploring anti-patterns in Rails
aemeredith
4
510
エンジニアに許された特別な時間の終わり
watany
109
250k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
4 Signs Your Business is Dying
shpigford
187
23k
Making the Leap to Tech Lead
cromwellryan
135
10k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
550
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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登壇でした ありがとうございました