MongoDB 샤딩 관련 레퍼런스

2017. 12. 8. 17:57서버 프로그래밍

Deploy a Sharded Cluster

https://docs.mongodb.com/v3.4/tutorial/deploy-shard-cluster/


Mongo Sharding 1 - shard 구성

https://fkkmemi.github.io/mongodb/mongo-sharding-1/


★[MongoDB] 3.2.9 샤딩

https://m.blog.naver.com/PostView.nhn?blogId=forioso&logNo=220806295071&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


[MongoDB] Sharding (3) - shard key

또한 한번 sharding한 collection에 shard key는 변경할 수 없다.

만약 변경하고 싶다면 새 collection을 만들어 shard key를 설정하고 collection 전체를 복사해서 새로운 collection을 만들어야 한다.

http://blog.seulgi.kim/2014/08/mongodb-sharding-3-shard-key.html


* shard의 IP 주소 변경되었을때

https://stackoverflow.com/questions/8910708/mongodb-sharding-ip-changes

from inside mongos.

simply use the following command to update the IPs of the shard servers:

db.shards.update({_id: <<"shard name">>} , {$set: {"host" : "newIP:27018"}})

Example:

db.shards.update({_id: "shard000"} , {$set: {"host" : "172.31.1.1:27018"}})

172.31.1.1 is the private ip address of your shard server in the private network. avoid using a dynamic ip address.


* 다른 하드웨어로 샤딩 시스템 마이그레이션하기

https://docs.mongodb.com/manual/tutorial/migrate-sharded-cluster-to-new-hardware/#migrate-the-shards


* 샤딩된 컬랙션을 복사하기

https://stackoverflow.com/questions/27039083/mongodb-move-documents-from-one-collection-to-another-collection

$out is use to create the new collection with data , so use $out

db.oldCollection.aggregate([{$out : "newCollection"}])

then use drop

db.oldCollection.drop()



-----------------------------------------------------


MongoDB 샤딩된 컬렉션 풀기?

http://bspfp.pe.kr/archives/826


Scaling MongoDB and setting up sharding for MongoDB on Ubuntu

http://www.oodlestechnologies.com/blogs/Scaling-MongoDB-and-setting-up-sharding-for-MongoDB-on-Ubuntu


Mongo db sharding

https://www.slideshare.net/sejoonlim/mongo-db-sharding-16741367



https://likefree.tistory.com/1


https://docs.ncloud.com/ko/database/database-10-3.html