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
トレタを支える技術(インフラ編)
Search
wind-up-bird
August 02, 2019
Technology
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
トレタを支える技術(インフラ編)
wind-up-bird
August 02, 2019
Transcript
29 slides
トレタを支える技術(インフラ編) 〜過去・現在・未来〜 1
Introduction 柳楽瑛(@_windupbird_) 2018 年末にトレタに Join SRE チーム所属 トレタのインフラ全般を担当 前職: メール配信/
セキュリティサービス 2
Agenda 過去 インフラの変遷 現在 アーキテクチャ 開発フロー/ 開発ツール 現状の課題 未来 今後やっていきたいこと
まとめ 3
過去 : インフラの変遷 4
インフラの変遷 創業(2013 年) 〜 2015 年 EngineYard, Heroku, AWS, GCP
( 主にBQ) 2016 年 EY => AWS へ全面的に移行 2017 年 〜 2018 年 Kubernetes (GKE) の採用 2019 年 〜 Kubernetes (EKS) の採用と移行 5
インフラの変遷 2015 年 2019 年 6
現在 : 利用サービス 7
利用しているクラウドサービス AWS EC2, Aurora, S3, ELB, SQS, SNS, Route53, Lambda,
Codebuild, ApiGateway, EKS ... トレタの主要サービス GCP BigQuery, Compute Engine, EKS, CloudFunction, StackDriver, GKE ... データ/ ログ解析, 一部toC 向けサービス, Backup ... Heroku 既存サービス, Feasibility Study ... 8
現在: アーキテクチャ 9
アーキテクチャ 思想: シンプルで高可用性が設計の基本。 既存サービスA 代表例 LB (ALB, NLB) Nginx (EC2)
= キャッシュ&R プロキシ Rails (EC2) = アプリケーション Redis (EC2) = Sidekiq 非同期処理 DB (Aurora) = Writer + Reader * 2 10
全体像 構成: コアAPI を主軸にスター型のサブシステム構成 11
現在: 開発フロー/ ツール 12
開発フロー Github GitFlow による開発 CI/CD 各 Branch への merge による自動化
CircleCI 2.1 Feature: Build, Test, DryRun develop/master: staging/production deploy 13
開発ツール ( の一部) Packer + Ansible + Serverspec 各システム毎に定義 OS(ubuntu),
MW(nginx, monit, mackerelagent), *env, tdagent, Newrelic etc... Terraform 各システム毎に *.tf を定義 NW, LB, EC2 (Target Group, Listener, AutoScaling) etc... RoadWorker 作成したリソースに対して、DNS を設定。 14
現在 : 稼働率 15
稼働率 サービスの稼働は安定 16
現在: 無問題 17
なわけがなく。。。 18
課題 OS まわり EOL => アップデート 各サブシステム毎にそれそれVUP 大小含め約 10 サービス
事前検証 + staging でリハーサル + 本番 すべてシステム無停止で実施(済) 今後もアップデートし続けなければならない。 19
Packer まわり Packer の複雑化 使われていないコードが、たまによくある。 20
Packer 実行時間 1 回の実行で40 分超も。。。 明らかに詰め込み過ぎた 段階的な build の仕組み 根本的に見直す必要が出てきた
21
EC2 まわり EC2 インスタンスの起動時間 AutoScaling で起動までに7 分 突発的なアクセスだと間に合わない可能性も 特に toC
向けのサービスではクリティカル XXX on EC2 Managed サービスへの段階的な移行 EY 時代の名残もある。 これも今後移行していく(予定)。 22
DB まわり 肥大化 ユーザ数、システム拡大に伴うトラフィックの増加 [App] switch_point の導入 [Infra] スケールアップで対応 ETL
の処理時間 10 時間程度かかる 並列度あげる このままだと、いずれ頭打ちとなる可能性 DB の分割などアーキテクチャの見直し 23
未来: やっていきたいこと 24
やっていきたいこと XXX on EC2 からの脱却 マネージドサービスへの移行を加速 MicroService 化 kubernetes の導入
Auto Scaling, Auto Healing 障害の局所化 開発速度の向上 DB やそれ以外にも色々。。。 25
まとめ 26
過去 トレタのインフラの変遷 現在 シンプルで高可用性 サービスの拡大やユーザの増加に伴い、どんどん課題も 出てきた 未来 開発速度の向上 安定かつ快適なサービスの継続的な提供 27
最後に 28
https://corp.toreta.in/recruit/engineer/ 29
More Decks by wind-up-bird
See All by wind-up-bird
いつもみてるよ、エラーもその先も
w1ndupb1rd
0
150
CDNの自動割当ドメインをすべて独自ドメインに移行したよ
w1ndupb1rd
0
35
Teachme Biz で利用するドメインを統合して安心安全に静的コンテンツを取得する
w1ndupb1rd
0
190
studist tech talk #1
w1ndupb1rd
1
220
トレタの大規模バックエンドを移行するまでの道のりと舞台裏
w1ndupb1rd
1
130
Other Decks in Technology
See All in Technology
技術書典で本を売る流れ
yoshimura_datam
0
200
統制されたID・権限をどう利用するか : DPoP/FAPIによるAPIセキュリティ強化
oidfj
2
350
AWS Well-Arhitected Frameworkセキュリティの柱 について
miu_crescent
PRO
2
270
PR 生成AIガバナンスの全体像がわかる本
yoshimura_datam
0
130
VTuberになってみた話
yoshimura_datam
0
130
Well, that’s weird…
csswizardry
3
260
gradle-best-practices 使ってみた
mikanichinose
0
240
データから見る AI時代のエンジニア転職と採用
junya_okura
4
1.4k
Metadata - Section 4 : MODS (Metadata Object Description Schema )
mohab1
0
190
kubellの最新データ分析環境
kubell_hr
2
290
Fukurou Labo_Engineer_Deck
fukuroulabo
0
120
Is the Website Dying?
miriamschwab
0
260
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
570
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Writing Fast Ruby
sferik
630
63k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
600
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
49k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
680
A Modern Web Designer's Workflow
chriscoyier
699
190k
HDC tutorial
michielstock
2
1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.6k