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
ポケモン1000件取得が 5.29秒から0.64秒になった
Search
keigo
October 30, 2026
13
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ポケモン1000件取得が 5.29秒から0.64秒になった
keigo
October 30, 2026
Transcript
9 slides
ポケモン1000件取得が 5.29秒から0.64秒になった
作ったもの 1000匹のポケモンを検索、表示することができます
技術スタック フロントエンド:React(TypeScript) バックエンド:Hono(TypeScript) キャッシュDB:Redis API:PokeAPI
アーキテクチャ Dockerコンテナ キャッシュがある場合 ブラウザ Dockerコンテナ → ← React (フロントエンド )
Dockerコンテナ → ← Hono(Node.js) (バックエンド ) キャッシュがない場合 Redis (キャッシュ ) 外部API PokeAPI
キャッシュの効果 # バックエンドの処理時間 キャッシュなし:5.29秒 キャッシュあり:0.64秒
なぜ速いのか - Redisがインメモリデータベースだから - 1000件まとめて保存しているから
ハマったところ 並列で1000件同時にリクエストを送ったら fetch failed になった →並列10件×100回に変更
学び・気づき 今回はRedisのセットアップから実装まで全て公式の英語ドキュメントを読んで実践し た。 今まではQiitaやZennの日本語記事に頼っていたが、公式ドキュメントへの苦手意識を なくしたかった。
まとめ ・キャッシュすれば速くなる ・頑張れば英語が読める
More Decks by keigo
See All by keigo
APIとは?
keikeigo
0
13
種族値合計600以上のポケモンを返すAPIをクリーンアーキテクチャで作成した
keikeigo
0
7
WebアプリをDockerで動かしてみた
keikeigo
0
17
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
400
GraphQLとの向き合い方2022年版
quramy
50
15k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.8k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
380
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
HDC tutorial
michielstock
2
1k
Being A Developer After 40
akosma
PRO
92
590k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350