Computer System Lab Mongo DB Cluster University 12
Computer System Lab. Mongo. DB Cluster University 순천향대학교 컴퓨터시스템연구실 윤여일 12월 4일 금요일
Computer System Lab. University Sharding https: //docs. mongodb. com/manual/sharding/ 2
Computer System Lab. University Sharding https: //docs. mongodb. com/manual/sharding/ 3
Computer System Lab. 구성 Config Server Shard Config-1 (192. 168. 0. 110: 27018) Config-2 (192. 168. 0. 111: 27018) Config-2 (192. 168. 0. 112: 27018) University Router (192. 168. 0. 110: 27017) Data Shard Data-1 (192. 168. 0. 110: 27019) Data-2 (192. 168. 0. 111: 27019) 4
Computer System Lab. 설정 - Router University config Sharding 정보 입력 5
University Computer System Lab. 설정 – Config Server 6
University Computer System Lab. 설정 – Data Shard Node 7
u 아무 노드에 접속 한 후, rs. status()실행 결과를 확인 University Computer System Lab. Sharding 점검 9
Computer System Lab. 개별 Sharding 설정 u db 샤딩 설정 ü sh. enable. Sharding(<dbname>) u collection 샤딩 설정 ü sh. shard. Collection(“<db>. <collection>”, {shard_key: 분산 방법}) University u Shard Key ü 데이터 분산의 기준이 되는 키 Ø 1: 범위 기반 Ø hashed : 해시 함수 10
Computer System Lab. University Ranged Sharding https: //docs. mongodb. com/manual/core/ranged-sharding/ 11
Computer System Lab. University Hashed Sharding https: //docs. mongodb. com/manual/core/hashed-sharding/ 12
u use <dbname> u db. <collection>. get. Shard. Distribution() University Computer System Lab. 분배 상태 확인 13
Computer System Lab. Question? Please contact : 윤여일 순천향대학교 컴퓨터학부 멀티미디어관 M 606 University Email : dudlf 016@gmail. com 14
- Slides: 14