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
Fargateで夢は見られるのか
Search
hatappi
August 31, 2018
Programming
2.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Fargateで夢は見られるのか
#Speee_TGIF
hatappi
August 31, 2018
More Decks by hatappi
See All by hatappi
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
340
AlloyDB 奮闘記
hatappi
0
510
Cloudflare を活用して変わったメルカリの開発体験 / How Cloudflare Changed Mercari's Development Experience
hatappi
1
950
RubyではじめるGraphQL
hatappi
0
980
RubyでChainerつくってます!!
hatappi
2
1.5k
TDDな個人開発
hatappi
0
390
できるだけ楽して楽しくRails開発しよう
hatappi
2
390
EKSにRailsをのせた
hatappi
1
1.3k
RubyとApache Arrow
hatappi
0
2.7k
Other Decks in Programming
See All in Programming
FreeBSDでZabbixを動かす
kenkino
0
360
Java 27新機能 / Java 27 new features
kishida
2
200
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
7.5k
Simple Storage Service(S3) is not simple
iwatsukayura
0
210
残高管理から台帳サービスへの進化
artoy
0
170
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
120
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
300
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
260
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
390
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
CodeRabbitの効果検証と過ごしてみた3ヶ月
armondando
0
160
Featured
See All Featured
Bash Introduction
62gerente
615
220k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
350
Embracing the Ebb and Flow
colly
88
5.2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
610
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
550
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
540
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Transcript
Fargateで 夢は⾒られるのか? Speee エンジニアTGIF UZOU事業部 畑中 悠作
About me • Yusaku Hatanaka (@hatappi) • Speee, Inc •
Ruby, Go, TypeScript, etc. • 煎り⼤⾖が好き
今⽇の主役
ECSとは? • Amazon Elastic Container Service • コンテナを良い感じに管理してくれ る
ECSでの登場⼈物 • task definition • どのcontainerを⽴てるかやボリュームの追加などを⾏う docker-compose.ymlを作るイメージに近い • task •
タスク定義のインスタンス化したもの • service • 指定した数のタスクを実⾏、管理する • cluster • taskを配置できるインスタンスの集まり
ECS最適化されたAMIを指定した AutoScalingGroupのDesiredCapacityをあげる タスクを実⾏ AutoScalingGroupのDesiredCapacityを0にする バッチの実⾏開始
タスクが起動する下回りのインス タンスを管理しないといけない
AutoScalingGroupで起動する AMIをメンテナンスしていかないと
None
更新されない
出来るだけメンテナンス するものは減らしたい
None
Fargateとは? • 新しいサービスというよりはECSのEC2と並ぶ新し い起動タイプという捉え⽅がよいかも • ECSにて下回りのインスタンス群の管理を⾃分でし なくてもよくなる
Fargate IUUQTBXTBNB[PODPNKQCMPHTOFXTBXTGBSHBUFBQSPEVDUPWFSWJFX • ユーザーが意識して管理するのはタスクの 管理 • クラスター管理や使⽤時の最適化も必要な い • ⾃分の使いたいメモリ、vCPUの組み合わ
せを指定するだけ • Fargate⾃体はECSに組み込まれているの で新しくAPIを覚えていくみたいな必要は ない
ECS最適化されたAMIを指定した AutoScalingGroupのDesiredCapacityをあげる コンテナを⽴ち上げてタスクを実⾏ AutoScalingGroupのDesiredCapacityを0にする バッチの実⾏開始
ECS最適化されたAMIを指定した AutoScalingGroupのDesiredCapacityをあげる コンテナを⽴ち上げてタスクを実⾏ AutoScalingGroupのDesiredCapacityを0にする バッチの実⾏開始
価格は? • 1vCPUごとで1時間あたり0.0632 USD 1GBごとでメモリは1時間あたり0.0158 USD • 1秒あたりの最低1分 docker pullの開始からタスクの終了までが計算さ
れる
CPUとメモリの組み合わせ CPU メモリの値 0.25 vCPU 0.5 GB、1 GB、および 2 GB
0.5 vCPU 1 GB、2 GB、および 3 GB 1 vCPU 最低 2 GB および最⼤8 GB (1 GB 単位) 2 vCPU 最低 4 GB および最⼤16 GB (1 GB 単位) 4 vCPU 最低 8 GB および最⼤30 GB (1 GB 単位)
監視周り • Service単位ではCPU, メモリ使⽤率はCloudWatch メトリクスからとることは出来る • 実⾏しているコンテナごとにメトリクスを取りた い!
監視周り • Datadog (https://www.datadoghq.com/) • IntegrationによってCloudWatchで取得できるメトリク スを収集できる • コンテナ単位はタスクメタデータを介して取得すること が出来る
• お⾦はかかる IUUQTBXTBNB[PODPNKQBCPVUBXTXIBUTOFXBXTGBSHBUFQMBUGPSNWFSTJPO
タスク定義
最近のFargate
まとめ • Fargateについて紹介しました • Fargateを使うことで実⾏されるタスクに集中できる • 今稼働しているインスタンスのスペックをそのままもって くると割⾼かも • コンテナに割り当てるリソースだけを意識すれば良いの
スペックの⾒直しをしても良いかも • 夢を⾒る前に現実を⾒るのも⼤事