인디노트

BDR 1.0.7 Documentation - 1.1. Concepts 본문

개발 플랫폼 및 언어/DB 기술

BDR 1.0.7 Documentation - 1.1. Concepts

인디개발자 2018. 12. 31. 14:03

1.1. Concepts 

1.1. 개념


BDR provides asynchronous multi-master logical replication. This means that you can write to any server and the changes will, after they have been committed, be sent row-by-row to all the other servers that are part of the same BDR group[1].

BDR 은 비동기 다중 마스터 논리적 복제를 제공합니다. 즉, 임의의 서버에 쓸 수 있고 커밋 된 후 변경 사항은 동일한 BDR 그룹 [1] 의 일부인 다른 모든 서버로 행 단위로 전송됩니다.


More specifically: 

구체적인 내용 :

Multi-master

Each database ("node") participating in a BDR group both receives changes from other members and can be written to directly by the user. This is distinct from hot or warm standby, where only the single master server that all others replicate from can be written to.

BDR 그룹에 참여하는 각 데이터베이스 ("노드") 는 다른 구성원으로부터 변경 사항을 받으며 사용자가 직접 작성 할 수 있습니다. 이는 다른 모든 서버가 복제하는 단일 마스터 서버 만 쓸 수 있는 핫 또는 웜 대기와 구별됩니다.

You don't have to use multi-master with BDR, it's possible to use it for one-way replication too.

BDR 과 함께 다중 마스터를 사용 할 필요가 없으며 단방향 복제에도 이 기능을 사용할 수 있습니다.

If you're interested in BDR's multi-master features it's important to understand some of the concepts behind multi-master, both in general and as BDR implements it. Application developers must be aware that applications may need changes for multi-master BDR and cannot be written exactly as if they are talking to a standalone or single-master system.

BDR 의 멀티 마스터 기능에 관심이 있다면 일반적으로 BDR 이 구현하는 멀티 마스터의 개념을 이해하는 것이 중요합니다. 응용 프로그램 개발자는 응용 프로그램이 다중 마스터 BDR 에 대한 변경이 필요할 수 있으며 독립 실행형 또는 단일 마스터 시스템과 통신하는 것처럼 정확하게 작성 할 수 없다는 점을 알아야합니다.

See
 BDR: Weakly coupled multi-master replication.

asynchronous (
비동기)

Changes made on one BDR node are not replicated to other nodes before they are committed locally. As a result the data is not exactly the same on all nodes at any given time; some nodes will have data that has not yet arrived at other nodes. PostgreSQL's block-based replication solutions default to asynchronous replication as well.

하나의 BDR 노드에서 변경 한 내용은 로컬에서 커밋되기 전에 다른 노드에 복제되지 않습니다. 결과적으로 주어진 시간에 모든 노드에서 데이터가 정확히 동일 하지는 않습니다. 일부 노드는 아직 다른 노드에 도착하지 않은 데이터를 갖습니다. PostgreSQL 의 블록 기반 복제 솔루션은 기본적으로 비동기 복제를 기본으로 합니다.

Support for synchronous writes may be added to a future BDR release and some support for synchronous replication already exists for one-way (single-master) replication.

동기 쓰기 지원은 향후 BDR 릴리스에 추가 될 수 있으며 단방향 (단일 마스터) 복제를 위한 동기 복제 지원이 이미 존재합니다.

When combined with multi-master, asynchronous replication is often called an "eventually consistent" architecture. At any given time the data can look different when viewed from different nodes, but over time the nodes sync with each other. If writes stop then after a while all nodes will be the same. BDR ensures that constraints (unique constraints, check constraints, foreign keys, etc) are always consistent within any given node, so it's stricter than many eventually consistent designs.

다중 마스터와 결합 할 때 비동기 복제는 종종 "궁극적으로 일관성 있는 아키텍처" 라고 합니다. 주어진 시간에 다른 노드에서 볼 때 데이터가 다르게 보일 수 있지만 시간이 지남에 따라 노드는 서로 동기화 됩니다. 쓰기가 멈추면 잠시 후 모든 노드가 동일하게 됩니다. BDR 은 주어진 노드 내에서 제약 조건 (고유 제약 조건, 검사 제약 조건, 외래 키 등) 이 항상 일관성있게 유지되도록 보장 하므로 궁극적으로 일관성 있는 많은 설계보다 엄격합니다.

logical

Logical (row-based) replication is replication using individual row values. It contrasts with physical (block-based) replication where changes to data blocks are sent. Logical replication is at a different level - it's a lot like the difference between sending a set of files and sending the hard drive the files are on. Logical replication has both advantages and disadvantages compared to physical replication;

논리적 (행 기반) 복제는 개별 행 값을 사용하는 복제입니다. 이는 데이터 블록에 대한 변경 사항이 전송되는 물리적 (블록 기반) 복제와 대조됩니다. 논리적 복제는 다른 레벨에 있습니다. 파일 집합을 보내고 파일이 있는 하드 드라이브를 보내는 것과는 다른 점이 많습니다. 논리적 복제에는 물리적 복제에 비해 장점과 단점이 있습니다.

see Differences between logical and physical replication.

replication (
복제)

Replication is the process of copying data from one place to another. In BDR refers to the fact that BDR is not a shared-storage architecture; each node has its own copy of the database, including all relevant indexes etc. Nodes can satisfy queries without needing to communicate with other nodes, but must also have enough storage space to hold all the data in the database.

복제는 한 곳에서 다른 곳으로 데이터를 복사하는 과정입니다. BDR 에서 BDR 은 공유 스토리지 아키텍처가 아닙니다. 각 노드는 모든 관련 색인을 포함하여 데이터베이스의 자체 사본을 가지고 있습니다. 노드는 다른 노드와 통신할 필요없이 조회를 만족시킬 수 있지만 데이터베이스의 모든 데이터를 보유 할 수 있는 충분한 저장 영역도 가져야 합니다.

BDR is built on the logical decoding features developed by the BDR project and added to PostgreSQL 9.4. It also relies on other core PostgreSQL features that were added with BDR in mind, like background workers.

BDR 은 BDR 프로젝트에서 개발한 논리 디코딩 기능을 기반으로 하며 PostgreSQL 9.4 에 추가 되었습니다. 또한 BDR 을 염두에 두고 추가 된 다른 핵심 PostgreSQL 기능 (예 : 배경 작업자) 에 의존합니다.

Because BDR needs some features that didn't make it into PostgreSQL by the time 9.4 was released, it needs a modified PostgreSQL to run.

BDR 에는 9.4 가 출시 될 때 까지 PostgreSQL 에 포함되지 않은 일부 기능이 필요하기 때문에 실행할 PostgreSQL 을 수정해야합니다.  

See BDR requirements.

Notes

[1]

We'd say "cluster", but PostgreSQL has historically used that term for a different and confusing purpose, to mean a particular PostgreSQL instance's collection of databases.

우리는 흔히 "cluster" 라고 말합니다. 하지만, PostgreSQL 은 과거 PostgreSQL 인스턴스의 데이터베이스 모음이라는 다른 의미로 사용 하였습니다.


반응형
Comments