Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Django with AWS native services.
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kosei Kitahara
January 12, 2018
Technology
0
67
Django with AWS native services.
Django AWS native なサービスとして開発する
Kosei Kitahara
January 12, 2018
Tweet
Share
More Decks by Kosei Kitahara
See All by Kosei Kitahara
Twelve-Factor Python (Django) Application with Docker
surgo
0
480
Other Decks in Technology
See All in Technology
[CV勉強会@関東 World Model 読み会] Orbis: Overcoming Challenges of Long-Horizon Prediction in Driving World Models (Mousakhan+, NeurIPS 2025)
abemii
0
110
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
140
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.4k
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
230
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
130
配列に見る bash と zsh の違い
kazzpapa3
1
130
プロポーザルに込める段取り八分
shoheimitani
1
190
2026年、サーバーレスの現在地 -「制約と戦う技術」から「当たり前の実行基盤」へ- /serverless2026
slsops
2
220
IaaS/SaaS管理における SREの実践 - SRE Kaigi 2026
bbqallstars
4
1.8k
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
420
データ民主化のための LLM 活用状況と課題紹介(IVRy の場合)
wxyzzz
2
700
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
The Spectacular Lies of Maps
axbom
PRO
1
520
The Curse of the Amulet
leimatthew05
1
8.4k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
53
GitHub's CSS Performance
jonrohan
1032
470k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
89
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Transcript
Django with AWS native services Django を AWS native なサー
ビスとして開発する By Kosei Kitahara (@Surgo)
今日話すこと 前回のおさらい ‑ Twelve‑Factor App テクノロジー スタック With DynamoDB With
Kinesis Firehose With Redshift
前回のおさらい Twelve‑Factor App として作っている ロー カルで動作するサー ビスと同等のサー ビスがプロダクションで もそのまま動作する アプリケー
ション構成
アプリケー ション構成 主に以下の2 つの WebApp からなる Track: エンドユー ザー の環境、
行動情報を収集 (High latency) Report: 環境や行動情報の可視化 (Low latency) 主に以下の2 つの Worker キュー からなる Aggregate: Track の情報を Report で参照可能なデー タ形式へ 変換 (High Latency) Screenshot: スクリー ンショットの取得など (Low latency)
テクノロジー スタック ( 抜粋)
利用している AWS Native Service ( 抜粋) Application Load balancer ECS
(with Application Auto Scaling) Aurora (Auto Scaling for Replicas) ElastiCache DynamoDB (Auto Scaling) SQS (Auto scaling) Redshift with Kinesis Firehose (Auto scaling)
テクノロジー 選定基準 Auto Scaling!!1 Maintenance free (managed & auto upgrade)
Work locally Work with Django native (none customized) apps django‑rest‑framework django‑registration‑redux django‑storages etc...
Aurora/Redshift 最初からシャー ディングにより書き込みを分散 まだ Aurora Multi‑Master がプレビュー なので Redshift の同時クエリー
実行数制限 https://github.com/uncovertruth/django‑horizon/ Django のデー タベー スバックエンド Aurora: 標準の MySQL ( ちょっとカスタマイズ) Redshift: https://github.com/shimizukawa/django‑redshift‑ backend Redshift 用にクエリー をチュー ニング ( 主に DISTKEY) https://github.com/onysos/django‑composite‑foreignkey
ElastiCache しょうがないけど Auto Scaling がない Auto discovery 対応のバックエンドを利用 https://github.com/uncovertruth/django‑elastipymemcache Double
write & Double read Maintenance 時間をずらした2 クラスター で双方自動更新 カジュアルに再起動 ( しないけど) そのうち DAX に移行したい
DynamoDB Amazing! (Performance, cost, maintenace free) Object Mapper https://github.com/pynamodb/PynamoDB For
local dev & testing https://github.com/spulec/moto Factory‑boy なども _ b u i l d をカスタマイズしそのまま利用 そのうち DAX & Global region へ以降する
Kinesis Firehose django form や django‑rest‑framework serializer の validation ‑>
save 機構をカスタマイズするのみ local なら直接 sqlite へ、 本番なら firehose 経由で Redshift へ という用に切り分け https://github.com/spulec/moto を利用し、 想定する API へのリク エストと引数をテストしている 現在テスト稼働で 600Krecords/hour/shard を挿入
Lesson learned Auto scaling さまさま ( 常時監視対象が大幅に減る) APM が重要 Auto
scaling しないものは自前でなんとかする Django の枠をなるべくはみ出ない Aurora と DynamoDB は世界を救う
Future tasks boto の https リクエストのオー バー ヘッドが高い DynamoDB は
DAX を利用する SQS や DynamoDB のオー トスケー ルが追いつかない ( スパイク) スケジュー ルで頑張るのと母数を増やす ( みんな頑張って~)