Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
スケールアウトできるManaged RDBMS - Azure Cosmos DB for P...
Search
Kuniteru Asami
December 01, 2022
Technology
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
スケールアウトできるManaged RDBMS - Azure Cosmos DB for PostgreSQL
2022/11/17 - 第41回 JAZUG Night
先日リリースされたAzure Cosmos DB for PostgreSQLの紹介です
Kuniteru Asami
December 01, 2022
More Decks by Kuniteru Asami
See All by Kuniteru Asami
Azure App Service / Container Apps の組み込み認証
kuniteru
0
270
Azure Load Testing と Azure用 Jmeter Plugins
kuniteru
0
36
どう買う?Azure
kuniteru
1
760
現場からみた Azure リファレンスアーキテクチャ答え合わせ | Microsoft Build 2022
kuniteru
1
86
Azure Load Testingを利用したパフォーマンステスト
kuniteru
1
91
Understanding Azure Application Gateway
kuniteru
0
70
堅牢&運用楽々な WordPress を Azure App Service で
kuniteru
0
170
Azure PaaS とのよりセキュアな接続 - 初級編
kuniteru
0
72
あらためて Azure Virtual Network
kuniteru
0
58
Other Decks in Technology
See All in Technology
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.7k
メルペイ 会計システム概要と歴史
mewuto
0
210
IoTデバイスを繋げるプロトコルMatterをAndroidで使用する方法
harutiro
0
140
Loop Engineering これくらいでいい
mikanichinose
0
210
パッチ更新でterraform initが落ちた日
grimoh
1
120
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
170
今さら理解するウェブフォントver.2026
takanorip
3
660
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
160
Jetson Orin Nanoとk3sとローカルLLMで音声文字起こしシステム作ってみた
y_sera15
0
120
OpenSharing について熱く語る〜AI アセットの共有について〜
kameitomohiro
0
260
[AWS 秋のクラウドオペレーション祭り 2026]AWS DevOps Agentで変わるリリースと運用対応 ~リリース管理機能と Directed actions のご紹介~
furuton
4
1.2k
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
390
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
GitHub's CSS Performance
jonrohan
1033
470k
Designing Powerful Visuals for Engaging Learning
tmiket
1
600
Evolving SEO for Evolving Search Engines
ryanjones
0
320
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Six Lessons from altMBA
skipperchong
29
4.5k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
ラッコキーワード サービス紹介資料
rakko
1
5.3M
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
620
Transcript
スケールアウトできる Managed RDBMS Azure Cosmos DB for PostgreSQL 2022/11/17 –
第41回 JAZUG Night 株式会社 pnop / Cloudlive 株式会社 浅見 城輝
♥BEER About me kuniteru.asami Find me Database Microsoft Azure 2012~
Microsoft Azure
株式会社pnop 株式会社 pnop は Microsoft Azure に関する課題解決のプロフェッショナル集団です。 皆様のプロジェクトに、 Azure経験豊富なエンジニアがノウハウを提供いたします。 Azure
アーキテクチャ 設計相談 Azure 運用設計 相談 Azure開発 Azure 環境構築 Azure トラブル シューティング Azure トレーニング 新規システムを Azureで稼働させしたい 既存システムを Azureに移行したい パッケージ・ソリューションをAzure に対応したい Azureを利用することで システムコストを下げたい Azureで安全・安心な システムを提供したい Azureを利用することで 運用担当者の負担を軽減したい Azureを利用しているうえで 困っていることを解決したい Azureのスキルを向上したい Azureに関するご相談・お問い合わせ:
[email protected]
https://www.pnop.co.jp
注意事項 このスライドは 2022 年 11 月 17 日 時点の情報を 基にしています
Agenda Azure Cosmos DB for PostgreSQL とは Citus のテーブル型
Azure Cosmos DB for PostgreSQL とは
分散クエリ実行や 高性能なスケールアウトを備えた フルマネージドな PostgreSQL
特徴 スケールアウトできる RDBMS 並列化による 20 倍 から 300 倍以上の 高パフォーマンス
グローバル レプリケーション 列指向ストレージ対応 Citus エクステンション フルマネージド ネイティブ PostgreSQL
ベンチマーク https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/how-to-benchmark-performance-of-citus-and-postgres-with-hammerdb/ba-p/3254918
アーキテクチャ 一つの Coordinator ノードと、複数の Worker ノードで構成される Coordinator ノード クライアントアプリケーションからの接続を受け付ける 分散テーブルや参照テーブルのメタデータと通常のテーブルやその他の
PostgreSQL オブジェクトを保持 分散テーブル、参照テーブルの要求を受けた場合は、対象の Worker ノードに SQL クエリを送信 Worker ノード 通常の PostgreSQL テーブルとして分散テーブル、参照テーブルのデータを保持 https://github.com/citusdata/citus
Citus のテーブル型 分散テーブル 参照テーブル ローカル テーブル
分散テーブル 分散テーブルは、テーブル毎にシャードキー列を指定してユーザーが作成する デフォルトでは 32 のシャードに分割され、Worker ノードに格納される シャード数が Worker ノード数の倍数ではない場合、ノードによってシャード数は異なる SELECT
create_distributed_table('table_name', 'distribution_column'); https://www.citusdata.com/product#citus-diagram
分散テーブルの併置(コロケーション) 異なる Worker ノードをまたいだ Join 操作はできない それを避けるため、異なるテーブル間で、シャードキー値が 同じ場合、同一の Worker ノードに配置させることにより、
Worker ノード内で Join を済ませることができる https://learn.microsoft.com/ja-jp/azure/cosmos-db/postgresql/quickstart-build-scalable-apps-concepts#colocation
参照テーブル すべての Worker ノードに全データが複製されるテーブル ディメンションテーブル(マスタテーブル)に向いている Worker ノードに参照テーブルを作成する SELECT create_reference_table('table_name'); ローカル
テーブル 分散テーブルにも参照テーブルにもしていないテーブルは、 Coordinator ノードで通常の PostgreSQL テーブルとなる ローカルテーブルと分散テーブルとの Join 操作は可能
スケールアウト スケールアウトして Worker ノードを増やしても、 自動では分散テーブルの再配置はされないため、 ユーザー(DB管理者)自身で再配置を実施する オンラインで再配置を実行でき、他のトランザクションが ブロックされるのはメタデータを更新する一瞬だけ SELECT rebalance_table_shards('table_name');
まとめ Azure Cosmos DB for PostgreSQL は、分散クエリ実行や 高性能なスケールアウトを備えたフルマネージドな PostgreSQL 分散クエリやスケールアウトの恩恵を受けるには、テーブル毎
に設定が必要 パフォーマンスを上げるために、分散テーブルのシャードキー を何にするかが重要 異なる Worker ノードをまたいだ Join 操作はできないため、 コロケーション(併置)をする スケールアウトしたら、分散テーブルの再配置を実施する
参考資料 Azure Cosmos DB for PostgreSQL documentation https://learn.microsoft.com/ja-jp/azure/cosmos-db/postgresql/ citusdata https://www.citusdata.com/
GitHub - citusdata / citus https://github.com/citusdata/citus Azure Cosmos DB: Liftoff https://learn.microsoft.com/en-us/events/azure-cosmos-db-liftoff/ Citus Con: An Event for Postgres 2022 https://www.citusdata.com/cituscon/2022/schedule
http://www.pnop.co.jp/