'mongoDB/MMS'에 해당되는 글 2건

MMS

mongoDB/MMS 2014. 7. 3. 10:57

MongoDB Management Service)


* 이점

- Serviced by MongoDB Guys

- Super easy setup and Fancy features (Monitoring + Backup)

- Clear and Clean Dashboard

- Group Alerts (Pager, Email, Hipchat..)

- API Supported


* 유의사항
하나의 MongoDB 세트는 독립된 그룹으로 관리하도록하고 Agent가 사용하는 ApiKey는 각 그룹마다 하나씩 발급된다.
즉, 1개의 MongoDB 세트 = 1개의 그룹 = 1개의 ApiKey = 1개의 Agent (복제 목적으로 여러개 가능, 그러나 한개면 됨)


'mongoDB > MMS' 카테고리의 다른 글

Setting Backup  (0) 2014.07.03
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

Setting Backup

mongoDB/MMS 2014. 7. 3. 10:57

일단, Backup을 셋팅하기 위해서는 Backup을 저장할 instance가 하나 필요하고 이곳에는 mongod가 실행되어있어야 한다. type은 sharded 또는 replica-set으로 되어있어야 하며 standalone으로 되어있으면 mms에서 Backup용으로 감지가 안된다. 또한 MMS에서 Backup용으로 감지되기위해서는 monitoring agent와 backup agent가 설치되어있어야 한다.


정리하자면 Backup용 instance에 아래 1,2,3번이 설치되어있고 4번이 설정되어있으면됨.

1. mongod

2. monitoring agent

3. backup agent

4. db sharding or replica set 설정

(sharded 된 벡업 db를 쓴다면 각 디비 instance에 2,3번을 설치할 필요는 없고 config서버에만 설치하면된다. sharding이 안되어있고, replica set하나인 경우는 primary에만 설치되면 된다)


요 설정이 끝나면, MMS에서 Backup 탭을 눌렀을때 자동으로 감지가 된다. 이후 부터는 설정된 주기에 따라 자동으로 Backup된다.


* MMS Monitoring Agent 설치
에이전트는 MMS 서버로 주기적으로 Optlog 를 보내는 프로세스이며 하나만 설치해놓으면 모든 Mongo 관련 호스트들을 알아서 파악한다. 또한, 에이전트는 어느정도 네트워크 리소스를 먹기때문에 Mongod가 실행 중인 머신에는 설치하지 말고 Mongos나 Dedicated 서버에 띄우길 권장한다. Mongod가 5개 이하면 EC2 Micro에 띄워도 된다고 함. 그리고 복제 목적으로 에이전트를 두개를 띄울 수도 있겠으나 별로 그럴일은 없을거다라고 함.

 

1. Download the 32-bit or 64-bit deb package.

$ curl -OL https://mms.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_2.1.0.35-1_amd64.deb

2. Install the package
$ sudo dpkg -i mongodb-mms-monitoring-agent_2.1.0.35-1_amd64.deb

3. Edit /etc/mongodb-mms/monitoring-agent.config and enter your API key, as shown below
$ mmsApiKey=6d2f19515939c45d6905ef9f0d584e1c

4. Start the agent
$ sudo start mongodb-mms-monitoring-agent

5. Continue to setup @ mms console


* 호스트 추가시 팁

에이전트는 기본적으로 모든 정보를 알아서 MMS에 전송하는데(Outbound only) MMS 콘솔에서 호스트에 대한 자세한 정보를 맵핑시켜놓기 위해 호스트를 추가하는 메뉴가 있다. 그런데 이때 묻는 정보들에 당황하지 않고, 다음의 팁들을 염두하고 입력하면 수월할지어다.

- 호스트 타입은 Standalone / Shard Cluster / Replica Set / Master Slave 가 있다.

- Standalone 은 Config 서버 입력할때 쓰면 좋다.

- Shard Cluster 는 Mongos 서버 입력할떄 쓰면 좋다. (보통 이거 하면 알아서 Replica Set 다 찾아줌)

- Replica Set / Master Slave 로 구성했다면 요걸로 고르면 됨.

- 그리고 호스트네임은 수집된 정보에서 호스트 식별해내기 위한 것으로 Public IP / Private IP 구분 없다. (울 서버에 Inbound 요청하려고 하는것이 아님)


* MMS Backup Agent 설치

The Backup Agent requires network access. To avoid contention for network and CPU resources, we recommend running the Backup Agent on a separate host from your mongod instances. Performance impact on the cluster is similar to adding an additional secondary node. The Backup agent has the same performance profile impact as a secondary. For the initial backup, the load scales with the size of your data set. Once an initial backup exists, the load scales with oplog gigabytes used per hour. Within the US, MMS Backup sends snapshots at 50-100Mbps. Assuming a compression factor of 4x and transmission speeds of 50Mbps, a 250 GB snapshot will take 2.5 hours.  

 

1. Download the 32-bit or 64-bit deb package.

curl -OL https://mms.mongodb.com/download/agent/backup/mongodb-mms-backup-agent_1.4.6.43-1_amd64.deb

 

2. Install the package

sudo dpkg -i mongodb-mms-backup-agent_1.4.6.43-1_amd64.deb

 

3. Edit /etc/mongodb-mms/backup-agent.config and enter your API key, as shown below

apiKey=6d2f19515939c45d6905ef9f0d584e1c

 

4. Start the agent 

$ sudo start mongodb-mms-backup-agent



* References

https://jira.mongodb.org/secure/attachment/34148/backup-manual.txt 

'mongoDB > MMS' 카테고리의 다른 글

MMS  (0) 2014.07.03
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,