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
Haze - Real time background blurring
chrisbanes
1
510
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
260
Recoilを剥がしている話
kirik
5
6.7k
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
340
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
360
Go の GC の不得意な部分を克服したい
taiyow
3
790
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
190
ドメインイベント増えすぎ問題
h0r15h0
2
330
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
340
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
790
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Six Lessons from altMBA
skipperchong
27
3.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Code Review Best Practice
trishagee
65
17k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Being A Developer After 40
akosma
87
590k
RailsConf 2023
tenderlove
29
940
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Embracing the Ebb and Flow
colly
84
4.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
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