Elasticsearch
-
엘라스틱서치 update by query 성능 최적화Elasticsearch 2022. 7. 21. 17:44
환경 현재 Elasticsearch의 환경은 다음과 같다. Coordinates node : 2대 Data node : 14대 준비된 index의 조건은 다음과 같다. shard 개수 : 14개 replica 개수 : 1개 총 문서 개수 : 약 6억 8천만개 쿼리 조건 약 6억 8천만개의 전체 문서를 대상으로 4,400만건의 문서를 update by query로 업데이트 하려고 한다. 이 검증을 통하여 위와 같은 처리가 운영 환경에서 사용 가능할 지 판단해 보는 것이 목표였다. 일단 문서를 업데이트 하는 데에 얼마나 시간이 소요되는지 확인하는 것이 중요했다. 첫번째 시도 : 일단 요청해보기 테스트를 위해서 다음과 같은 Kotlin API 함수를 정의했다. @PostMapping("/api/test/upd..
-
엘라스틱서치 - Ubuntu 서버에 데이터 노드 추가하기Elasticsearch 2022. 1. 12. 08:32
Ubuntu 서버 장비에 엘라스틱서치 데이터 노드를 추가해보자. 데이터 노드는 이미 운용되고 있는 마스터 노드 서버가 있을 때, 마스터 노드를 데이터 저장 용도로 사용하지 않도록 하여 인덱스 생성, 저장 등의 운용 환경과 데이터 저장 환경을 분리하고자 할 때 추가한다. Ubuntu 서버 장비 준비 Cloud service 등을 이용하여 Ubuntu 환경의 서버 장비를 준비한다. ES 설치 준비된 서버 환경에 엘라스틱서치를 설치한다. 마스터 노드가 이미 준비되어 있는 상황이기 때문에, 기존 마스터 노드로 운용하고 있는 ES와 동일한 스펙으로 준비한다. 기존의 마스터 노드는 엘라스틱서치 6.4 버전으로 운용되고 있다. 설치 링크는 여기 Elasticsearch PGP Key 가져오기 엘라스틱서치에서 제공하는..