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
Django with AWS native services.
Search
Kosei Kitahara
January 12, 2018
Technology
77
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Django with AWS native services.
Django AWS native なサービスとして開発する
Kosei Kitahara
January 12, 2018
More Decks by Kosei Kitahara
See All by Kosei Kitahara
Twelve-Factor Python (Django) Application with Docker
surgo
0
490
Other Decks in Technology
See All in Technology
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
WasmをRustにする
sansantech
PRO
0
250
夫婦で子育てするための育児標準化
codmoninc
PRO
0
340
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
330
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.4k
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
280
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
730
Optunaの最新リリースv5.0について
pfn
PRO
0
120
パッチ更新でterraform initが落ちた日
grimoh
1
140
How to Design Configuration for Rails Applications
willnet
1
780
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
170
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.8k
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Code Review Best Practice
trishagee
74
20k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Six Lessons from altMBA
skipperchong
29
4.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Test your architecture with Archunit
thirion
2
2.4k
First, design no harm
axbom
PRO
2
1.3k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Designing for Timeless Needs
cassininazir
1
530
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
490
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 のオー トスケー ルが追いつかない ( スパイク) スケジュー ルで頑張るのと母数を増やす ( みんな頑張って~)