본문 바로가기

728x90

리눅스

MongoDB의 샤딩을 활성화(enable sharding)하고 샤딩된 클러스터에서 쿼리를 테스트하는 방법 MongoDB의 샤딩을 활성화(enable sharding)하고 샤딩된 클러스터에서 쿼리를 테스트하는 방법 MongoDB의 샤딩은 데이터베이스를 여러 서버에 분산 저장하고 대량의 데이터를 효율적으로 처리하기 위한 기술입니다. 샤딩 전략 해시 기반 샤딩(Hash-based sharding) 범위 기반 샤딩(Range-based sharding) 새 데이터베이스(exampleDB) 생성 use exampleDB db.stats() 인덱스 생성 db.exampleCollection.createIndex({ name : 1 }) show collections db.exampleCollection.getShardDistribution() mongos> db.exampleCollection.getShardDistr.. 더보기
주요 SQL과 NoSQL 데이터베이스 유형 및 특징 주요 SQL과 NoSQL 데이터베이스 유형 및 특징 SQL (관계형 데이터베이스) 데이터 모델: 테이블 형식의 관계형 데이터 모델을 사용합니다. 데이터는 정형화되며, 각 테이블에는 열과 행이 있습니다. 스키마: 정적 스키마를 사용하며, 데이터 구조가 미리 정의되어 있어야 합니다. 쿼리 언어: SQL(Structured Query Language)을 사용하여 데이터를 검색, 수정 및 관리합니다. 확장성: 수직 확장이 주로 사용되며, 성능을 향상시키려면 더 많은 리소스가 필요합니다. 사용 사례: 트랜잭션 처리, 데이터 일관성 및 정확성이 필요한 응용 프로그램에 적합합니다. NoSQL (비관계형 데이터베이스) 데이터 모델: 다양한 데이터 모델을 사용할 수 있으며, 주로 비정형 또는 반정형 데이터를 저장합니다... 더보기
[리눅스] 도커 컨테이너로 몽고디비 클러스터 구성하기(mongodb shard cluster) 도커 컨테이너로 몽고디비 클러스터 구성하기(mongodb shard cluster) MongoDB의 복제 Primary with Two Secondary Members (PSS) Primary with a Secondary and an Arbiter (PSA) 테스트 환경 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) $ docker version Client: Docker Engine - Community Version: 20.10.21 API version: 1.41 Go version: go1.18.7 Git commit: baeda1f Built: Tue Oct 25 18:04:24 2022 OS/Arch: linux/amd64 C.. 더보기
MongoDB 5.0+에는 AVX를 지원하는 CPU가 필요함 MongoDB 5.0+에는 AVX를 지원하는 CPU가 필요함WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!mongos1 | WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!mongos1 | see https://jira.mongodb.org/browse/SERVER-54407mongos1 | see also https://www.mongodb.com/community/forums/t/mongodb-5-0-.. 더보기
[리눅스] 몽고디비 클러스터 구성하기(mongodb shard cluster) 몽고디비 클러스터 구성하기(mongodb shard cluster) 테스트 환경 $ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.3 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.3 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-po.. 더보기
레디스 서버 설정(redis backup) 레디스 서버 설정(redis backup) 레디스 - AOF 오류 Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis. appendonly yes -> AOF 파일 읽음(AOF 백업) appendonly no -> RDB 파일 읽음(RDB 백업) info persistence 127.0.0.1:6379> info persistence # Persistence loading:0 async_loading:0 current_cow_peak:0 current_cow_size:0 current_cow_siz.. 더보기
HTML 리다이렉션 HTML 리다이렉션 content http-equiv 또는 name 특성의 값을 담습니다. http-equiv 프래그마 지시문을 정의합니다. 특성의 이름(http-equiv(alent))에서 알 수 있듯이, 가능한 값은 특정 HTTP 헤더입니다. content-security-policy 현재 페이지의 콘텐츠 정책 (en-US)을 정의할 수 있습니다. 대부분의 콘텐츠 정책은 허용하는 서버 출처와 스크립트 엔드포인트를 지정해 사이트 간 스크립트 공격 방어에 도움을 줍니다. content-type 지정할 경우, content 특성의 값은 반드시 "text/html; charset=utf-8"이어야 합니다. 참고: text/html MIME 유형으로 제공하는 문서에서만 사용할 수 있으며, XML MIME 유형.. 더보기
[리눅스] Anaconda 설치(conda 명령) Anaconda 설치(conda 명령) anaconda 스크립트 다운로드 및 설치 anaconda 스크립트 다운로드 사이트 : https://repo.anaconda.com/archive/ apt 리포지토리 업데이트 apt-get update wget 패키지 설치 apt-get install -y wget Anaconda3.sh 스크립트 다운로드 wget -q https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh 권한 설정 chmod +x Anaconda3-2022.10-Linux-x86_64.sh sha256sum 파일 유효성 검증 sha256sum Anaconda3-2022.10-Linux-x86_64.sh $ sha256sum An.. 더보기

728x90
반응형