본문 바로가기

728x90
반응형

DB

(3)
데이터베이스 클러스터링/레플리케이션/샤딩 차이점 데이터베이스는 서버역할을 하는 Database서버와 데이터를 저장하는 저장소가 한 세트로 구성되어있다. 서비스를 제공할 때 Database Server에 장애가 나면 서비스가 멈추게 된다. 그것을 방지하기 위해서 백업전략을 사용할 수 있다. 간단한 방식으로 서비스 DB장애를 예방할 수 있는데 클러스터링이 그 방법 중 하나이다. 클러스터링 위와 같은 방식으로 구성하는 것을 클러스터 구성이라고 한다. 동일한 DB서버가 한 저장소를 바라보고, Active-Active상태로 구성이 되면 한 대가 장애가 나도 다른 한 대로 서비스 운영이 가능하다. 한 대만 부담하던 CPU나 메모리의 부담이 두 대로 나눠지기 때문에 DB서버의 부하가 줄어든다. 다만, 두 DB서버가 한 저장소를 공유하기 때문에 저장소에 병목현상이 ..
redis cluster 구성(windows) 1. Redis install https://github.com/microsoftarchive/redis/releases/tag/win-3.2.100 Release 3.2.100 · microsoftarchive/redis This is the first release of Redis on Windows 3.2. This release is based on antirez/redis/3.2.1 plus some Windows specific fixes. It has passed all the standard tests but it hasn't been tested in a... github.com 2. Ruby 설치 https://www.ruby-lang.org/ko/documentation/install..
MongoDB 명령어 정리 (createUser, DB, drop ..) MongoDB 콘솔 접속 명령어 mongo -uroot -p1234 DB 생성명령어 use test; 딱히 없고 그냥 use 명령어를 사용하면 해당 DB를 사용할 수 있다. create User/ dropUser db.createUser({user:"testUser",pwd:"1234",roles:[{role:"dbOwner", db:"test"},{role:"readWrite", db:"test"}]}); db.dropUser("testUser") 해당 DB로 이동해서 생성/삭제 해야 한다. create Collection(DB insert) / drop Collection # db.{생성할컬렉션명}.insert({"json type"}); db.test.insert({"key":"value"}); #..

728x90
반응형