Skip to Content
Neo4j: The Definitive Guide
book

Neo4j: The Definitive Guide

by Luanne Misquitta, Christophe Willemsen
July 2025
Beginner to intermediate
410 pages
6h 27m
Korean
O'Reilly Media, Inc.
Content preview from Neo4j: The Definitive Guide

10장. 클러스터링과 샤딩

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

ElectricHarmony의 그래프의 크기와 가치가 커짐에 따라 안정성에 대한 기대치도 커졌습니다. 한때는 견딜 수 있었던 중단이 용납할 수 없는 상황이 되었습니다. 피크 이벤트 중에 쓰기가 실패하면 수익 손실이 발생하거나 사용자의 청취 습관이 손상될 수 있습니다. 팀은 이제 단일 노드 설정을 넘어설 때가 되었다는 것을 알았습니다.

이 장에서는 고가용성 그래프 배포를 구축하기 위한 기반인 Neo4j의 클러스터링에 대해 소개합니다. Neo4j의 아키텍처가 어떻게 결함 허용을 지원하는지, 리더 선출과 복제가 어떻게 작동하는지, 복원력을 위해 확장할 때 어떤 트레이드오프가 발생하는지 살펴봅니다.

기본 클러스터 설정부터 구성원 간에 읽기 및 쓰기가 어떻게 작동하는지 이해하는 것까지, ElectricHarmony가 어떻게 단일 장애 지점에서 성장과 예측 불가능성을 모두 처리할 수 있는 강력한 클러스터로 전환했는지 배우게 됩니다.

고가용성은 단순한 기능이 아니라 필수입니다. 자세히 알아보겠습니다.

고가용성을 위한 클러스터링

성능과 가동 시간이 중요한 경우, Neo4j를 독립형 인스턴스로 실행하는 것만으로는 더 이상 충분하지 않습니다.

Neo4j의 클러스터링 모델은 하드웨어 장애, 유지보수 기간 또는 트래픽 급증 시에도 데이터베이스를 계속 사용할 수 있도록 설계되었습니다. 클러스터링은 복원력을 향상시킬 뿐만 아니라 시스템이 여러 시스템에 걸쳐 읽기 용량을 확장할 수 있게 해줍니다.

그림 10-1은 클러스터링 개념의 일부를 소개하기 위해 아주 기본적인 클러스터로 시작합니다.

그림 10-1. 세 개의 프라이머리가 있는 기본 Neo4j 클러스터

Neo4j 서버는 기본 서버와 보조 서버의 두 가지 모드로 작동할 수 있습니다. 기본 서버(흔히 기본 서버라고도 함)는 호스팅하는 데이터베이스에 대한 읽기 및 쓰기 작업을 모두 처리할 수 있습니다. 보조 서버(또는 그냥 보조 서버)는 읽기 작업만 처리합니다.

데이터베이스는 클러스터 전체에 걸쳐 복제될 수 있으며, 인스턴스라고도 하는 각 복제본은 기본 또는 보조 서버가 될 수도 있습니다. 고가용성을 달성하기 위해 시스템은 동일한 데이터베이스의 기본 인스턴스를 여러 개 배포합니다. 데이터베이스에 여러 개의 프라이머리가 있는 경우, 그 중 하나가 자동으로 리더 ( 작성자라고도 함)로 선택됩니다. 리더는 모든 쓰기 작업을 조정하고, 다른 프라이머리는 팔로워 역할을 하며, 보조 인스턴스는 리더 역할을 합니다.

래프트 프로토콜

고가용성을 달성하기 위해 Neo4j는 모든 트랜잭션이 안전하게 복제되도록 하기 위해 로그 복제를 관리하고 클러스터 전체에서 일관성을 유지하기 위해 리더를 선출하는 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Neo4j: The Definitive Guide

Neo4j: The Definitive Guide

Luanne Misquitta, Christophe Willemsen
Apache Iceberg: The Definitive Guide

Apache Iceberg: The Definitive Guide

Tomer Shiran, Jason Hughes, Alex Merced
Kafka: The Definitive Guide, 2nd Edition

Kafka: The Definitive Guide, 2nd Edition

Gwen Shapira, Todd Palino, Rajini Sivaram, Krit Petty

Publisher Resources

ISBN: 9798341664869