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
Deploying MongoDB on Amazon WS | Michael Karpitsky
Search
Minsk MongoDB User Group
July 05, 2012
Programming
2
110
Deploying MongoDB on Amazon WS | Michael Karpitsky
Michael Karpitsky
Meetup #5
Minsk MongoDB User Group
July 05, 2012
Tweet
Share
More Decks by Minsk MongoDB User Group
See All by Minsk MongoDB User Group
MongoDB by Chef | Yauhen Artsiukhou
bymongo
0
120
MongoDB at IronMQ | Alexander Kolesen
bymongo
0
840
Scaling MongoDB | Sergey Gavruk
bymongo
2
170
Event sourcing + CQRS + MongoDB | Alex Shkor
bymongo
1
640
How it works. Indexes | Kirill Duborenko
bymongo
5
270
Aggregation Framework | Mikhail Burtylev
bymongo
1
92
MongoDB 2.2: Release update + Roadmap | Alvin Richards
bymongo
1
91
Meetup#6 Intro | Alex Litvinok
bymongo
1
44
About the problem of DBMS choice & what to do if you have gone the wrong way | Roman Bugaev
bymongo
3
120
Other Decks in Programming
See All in Programming
return文におけるstd::moveについて
onihusube
1
1.2k
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
420
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
840
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
170
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
950
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Exploring: Partial and Independent Composables
blackbracken
0
100
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
2
120
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
220
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
3
340
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
8
1.8k
Featured
See All Featured
Designing Experiences People Love
moore
138
23k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Bash Introduction
62gerente
609
210k
Documentation Writing (for coders)
carmenintech
66
4.5k
Site-Speed That Sticks
csswizardry
2
190
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
We Have a Design System, Now What?
morganepeng
51
7.3k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Transcript
Михаил Карпицкий MaeSens.by
А нужен ли AWS? • Небольшой проект – mongolab
• Все сейчас работает и ничего не планирует расти • Хочу пробовать облака! • Не устраивает текущая производительность • Предполагаем рост
OK! Amazon!
Типы EC2-‐инстансов
Бюджетный вариант Replica Sets app mongod (primary)
mongod (secondary) mongod (arbiter)
primary/secondary mongod EBS EBS EBS
EBS EBS EBS EBS /data/db /data/db/journal /var/log Raid10 Raid1
Настройки OS • ext4, xfs • raid10, raid1
• $ blockdev -‐-‐setra 128 /dev/md0 (read-‐ahead) • выключить ayme, dirayme # cat /etc/fstab UUID=6.. /data/db ext4 noayme,nodirayme 0 0
Security group internet app mongod mongod
Port 22, 80, 443 Port 22 Port 22 Port 27017 Port 27017 Port 27017
Security group • Порт 22 из 0.0.0.0/0 •
Порты 27017, 27018 и 27019 из security group приложения • Порты 27017, 27018 и 27019 из security group mongo
> rs.status() • $ mongo • > rs.iniyate()
• > rs.add(node1) • > rs.add(node2) • > rs.status()
Backup (вариант 1) • > use admin •
> db.runCommand({fsync:1, lock:1}); • $ ec2-‐create-‐snapshot –d backup-‐date vol-‐ {1..4} • > db.$cmd.sys.unlock.findOne();
Backup (вариант 2) • $ mongodump –d database
• $ tar zcvf /backups/backup-‐date.tgz dump • $ ec2-‐create-‐snapshot –d backups-‐vol-‐date backup-‐vol-‐1
Вопросы? • Михаил Карпицкий • hŠp://maesens.by/
•
[email protected]
• skype: michael.karpitsky