Skip to Content
CockroachDB: The Definitive Guide, 2nd Edition
book

CockroachDB: The Definitive Guide, 2nd Edition

by Guy Harrison, Jesse Seldess, Ben Darnell, Rob Reid
March 2025
Intermediate to advanced
542 pages
8h 50m
Japanese
O'Reilly Media, Inc.
Content preview from CockroachDB: The Definitive Guide, 2nd Edition

第11章. マルチリージョンデプロイ

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

多地域デプロイにより、CockroachDBデータベースは複数の地域にまたがることができる。マルチリージョンのデプロイの構成は、クラスタのフォールトトレランスと地域のパフォーマンスに影響を与える。一般的には、CockroachDBクラスタを地域に構成して、次の1つ以上のオブジェクトを達成する:

  • クラスタのリージョンの1つのコンピューティングリソースが利用できなくなったときに、クラスタがリクエストへの対応を継続できるようにする。

  • 地理的に分散したデータベースのユーザが低遅延のデータベース操作を享受できるようにする。

  • 地域のデータ規制への準拠を達成する。

これらのオブジェクトは完全に相容れないものではないが、両者の間にはいくつかのトレードオフがある。遅延と高可用性のバランスをどのようにとるか、自社の状況に合った方法を理解することが重要だ。

マルチリージョンの概念

CockroachDBのマルチリージョン機能は、CockroachDBの最もユニークなアーキテクチャ機能のいくつかを行使する。基礎となるアルゴリズムには難しいものもある。しかし、多領域CockroachDBの中核概念は、その多くを地域、ゾーン、生存目標などの単純な概念に抽象化するのに役立つ。

地域とゾーン

リージョンとは、その中にデプロイされたCockroachDBノードのセットを持つ広範な地理的 地域である。地域はノードの起動時に--locality フラグで定義され、どのようなものでも構わないが、ある種のネットワーク隣接、明確なワークロードまたはユーザの特性、または法的要件のいずれかを持つ地域全体で地域を定義することだけが本当に理にかなっている。

データベースのリージョンのひとつがプライマリ・リージョンである。プライマリ・リージョンはデータベース内のすべてのテーブルのデフォルトのリージョンである。

リージョン内では、1つ以上のゾーンを定義する。リージョンと同様に、ゾーンはノードの起動時に--locality フラグによって任意に定義されるが、通常はリージョン内のデータセンターに合わせて定義される(ただし、高度に冗長化されたデータセンター内のラックとして定義されることもある)。

他の文脈では、ゾーンをアベイラビリティゾーンと呼ぶこともある。ゾーンはある種の単一障害点を表すという考え方である。ゾーンをデータセンターとして定義した場合、データセンターに障害が発生した場合、そのゾーン内の全ノードに障害が発生すると考えることができる。データセンターに共通の障害点がない限り(例えば、同じ発電所に依存している)、データセンターにまたがってゾーンを定義することはあまり意味がない。

図11-1は、各リージョンに3つのゾーンを持つ、3リージョンのグローバルデプロイの例である。

RegionsAndZones
図 11-1. グローバルCockroachDBデプロイにおけるリージョンとゾーンの例

各リージョンは、CockroachDBアプリケーションにとって何らかの重要性があると想定される広範な地理的地域を表している。地域の各ゾーンは、1つ以上のCockroachDBノードが稼働している都市で表される。 ...

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

CockroachDB: The Definitive Guide, 2nd Edition

CockroachDB: The Definitive Guide, 2nd Edition

Guy Harrison, Jesse Seldess, Ben Darnell, Rob Reid
CockroachDB: The Definitive Guide

CockroachDB: The Definitive Guide

Guy Harrison, Jesse Seldess, Ben Darnell

Publisher Resources

ISBN: 9798341634695