SlideShare uma empresa Scribd logo
1 de 53
1©2014 TransLattice, Inc. All Rights Reserved. 11
Geographically Distributed PostgreSQL
PGConf NYC
April 3, 2014
Mason Sharp, Chief Architect
msharp@translattice.com
2©2014 TransLattice, Inc. All Rights Reserved.
Agenda
n  Why geographically distribute your data?
n  General replication background
n  PostgreSQL options
n  Custom PostgreSQL configurations
n  Upcoming solutions
3©2014 TransLattice, Inc. All Rights Reserved.
Why geographically distribute your data?
n  Improved Availability
n  Better performance (in some cases…)
–  Read vs Write
–  Data closer applications and users
n  Regulatory or Corporate Compliance
–  Data placement concerns
4©2014 TransLattice, Inc. All Rights Reserved.
Availability Issues Remain Headline News
5©2014 TransLattice, Inc. All Rights Reserved.
1  Survey by Zerto, July 2013, 356 IT professionals from 10 industries
Primary causes of data center outage1:
n  Hardware failure 34.4%
n  Power loss/interruption 31.5%
n  Natural disaster 13.3%
79.2%
Most recent unplanned data center outage1:
n  Last 6 months 42%
n  Last year 34%
76% experienced in last year
Data Center Outages – Causes and
Frequency
6©2014 TransLattice, Inc. All Rights Reserved.
Data Center Outage Costs Increasing
1 
2  2013 Cost of Data Center Outages, Ponemon Institute, December 2013
3 Bringing Continuous Availability to Oracle Environments, 2013 Mission-Critical Application Availability Survey,
Unisphere Research
Average cost of an outage is increasing2:
n  2010 $5,617/minute
n  2013 $7,908/minute 41% increase
Length of unplanned outage:
n  Average: 86 minutes2
n  25%+ of Oracle users had 8+ hours of unplanned downtime in last year3
7©2014 TransLattice, Inc. All Rights Reserved.
Current State of Data Replication
Top data management issues for IT executives:4
n  Providing business continuity at a reasonable cost
n  Deploying applications in multiple geographies consistently
n  The continued ability to use SQL
4 DBMS Evaluation Criteria, IDG Research Services, October 2013
5 Bringing Continuous Availability to Oracle Environments, 2013 Mission-Critical Application Availability Survey,
Unisphere Research
“Among respondents with at least two data centers and
rapid replication solutions, 46% indicate they are
less than satisfied with their current strategies.” 5
8©2014 TransLattice, Inc. All Rights Reserved.
Replication
n  Master-Slave
–  One Master, One or more Slaves
n  Multi-master
–  Multiple Masters
n  Multi-source fan-in
–  Example: consolidate multiple sites
n  Fan-out
9©2014 TransLattice, Inc. All Rights Reserved.
Master-Slave
Master Slave Slave Slave
10©2014 TransLattice, Inc. All Rights Reserved.
Master-Slave
n  All writes go to one master
n  Hot Standby reads can be done from any node
n  Synchronous / Asynchronous
n  Slaves get transactions via either
–  Native streaming replication
–  Statement based
•  Could be synchronous, could be via 2PC
•  Could be a replay mechanism via queues or triggers
11©2014 TransLattice, Inc. All Rights Reserved.
Multi-master
12©2014 TransLattice, Inc. All Rights Reserved.
Multi-master
n  Write can occur at any location
n  Synchronous 2PC
–  MVCC concerns
–  May make sense to first always write at one location,
acquiring lock
n  Asynchronous
n  Conflict Resolution
n  Conflict Avoidance through commit ordering
–  Paxos
–  Raft
13©2014 TransLattice, Inc. All Rights Reserved.
Multi-source fan-in
CentralLoc1
Loc2
Loc3
n  Consolidated centrally for reporting
14©2014 TransLattice, Inc. All Rights Reserved.
Multi-source fan-out
CentralLoc1
Loc2
Loc3
n  Subset sent to remote locations
15©2014 TransLattice, Inc. All Rights Reserved.
Understand Your Requirements
n  Availability
–  Read-only access of some data ok in downgraded state?
n  Immediacy of Data
–  Nightly refresh? Immediate? 2 second lag?
n  Performance & Latency
–  Read vs. Write
n  Correctness versus Performance
n  Conflicts: Prevent or Resolve
16©2014 TransLattice, Inc. All Rights Reserved.
Understand Your Requirements (continued)
n  Data Segregation
n  Data Ownership
–  Can each location be the “master” to a subset of data?
–  Example: regional customers
–  Expressed either as a subtable, or expression on a table
•  region_code = ‘US’
–  Different availability requirements?
n  “Staticity” Classification
–  Static tables that rarely change
–  Frequently updated tables
17©2014 TransLattice, Inc. All Rights Reserved.
Static Tables
n  Less concerned about write performance
n  Writing to table
–  BEGIN;
–  Execute DML statement on agreed “master”
–  On success, we have acquired all of the row locks
–  Safely execute on other nodes without risk of deadlock
–  PREPARE TRANSACTION;
–  COMMIT;
18©2014 TransLattice, Inc. All Rights Reserved.
Careful with reflexive UPDATES
UPDATE inventory SET qty = qty – 1 WHERE ….;
n  What if happens on multiple nodes?
n  If conflict resolution policy is last one wins,
inventory is reduced only by 1, not 2
n  May expect inventory that is not there
May want to handle some tables specially.
•  SELECT FOR UPDATE on a master
–  Will block if another transaction modifying
–  Locks won’t propagate to other nodes
19©2014 TransLattice, Inc. All Rights Reserved.
Looking in the PostgreSQL Toolbox –
Master-Slave
n  Native Streaming Replication
–  All databases in instance are replicated
–  Synchronous and Asynchronous options
–  Hot queryable standby option
n  Slony
–  Trigger based, asynchronous replication
–  Flexibility for a subset of data
–  More complex administration
n  Londiste
20©2014 TransLattice, Inc. All Rights Reserved.
Looking in the PostgreSQL Toolbox –
pgpool-II
n  Middle Layer
n  Synchronous Statement-Based Replication
–  Can instead be combined with other replication incl.
native streaming replication
n  Load Balancer
–  Can be All writes must go through master node
21©2014 TransLattice, Inc. All Rights Reserved.
Looking in the PostgreSQL Toolbox –
Postgres-XC
n  Can connect to one of multiple nodes
n  Good push-down join and operation handling
n  Ensures cluster-wide consistency
BUT
n  Requires access to Global Transaction Manager from
each node
n  Nodes are a modified version of PostgreSQL
n  Not currently suited for use case
22©2014 TransLattice, Inc. All Rights Reserved.
Looking in the PostgreSQL Toolbox –
PL/Proxy
n  Everything is a stored function
–  More cumbersome, but flexible
23©2014 TransLattice, Inc. All Rights Reserved.
Looking in the PostgreSQL Toolbox –
Multi-master
n  Bucardo
–  Perl-based
–  Limited to two masters
–  Custom conflict resolution possible
n  RubyRep
–  Ruby-based
–  Limited to two masters
–  Custom conflict resolution possible
n  Postgres-R
–  Modified PostgreSQL 9.0
24©2014 TransLattice, Inc. All Rights Reserved.
Looking in the PostgreSQL Toolbox –
Custom
n  Triggers
n  Foreign Data Wrappers
n  Subtable Partitioning
n  Two Phase Commit
25©2014 TransLattice, Inc. All Rights Reserved.
Looking in the PostgreSQL Toolbox –
Considerations
n  Connections and MVCC across multiple instances
n  Sequence/Serial
–  UUID as alternative
n  Timestamps
–  Use timestamp with timezone
–  Network Time Protocol NTP
–  Custom functions for time lag
26©2014 TransLattice, Inc. All Rights Reserved.
Custom Example
n  Multiple Locations
n  Locations largely independent
n  Most of the writes will occur locally
–  Each site is the “master” for local data
n  Want to be able to write data on a remote site
n  Want local read performance for remote
originating data
n  If remote site is down, local read-only access is
acceptable
n  Occasional updates to static data requires all
nodes online
27©2014 TransLattice, Inc. All Rights Reserved.
Custom Example
DC2
Hot
Standby
DC1
Master
DC2
Master
DC1
Hot
Standby
DC1 DC2
28©2014 TransLattice, Inc. All Rights Reserved.
Custom Example
DC2
Hot
Standby
DC1
Master
DC2
Master
DC1
Hot
Standby
DC1 DC2
customer_dc1
customer_dc2
29©2014 TransLattice, Inc. All Rights Reserved.
View: customer
Custom Example
DC2
Hot
Standby
DC1
Master
DC2
Master
DC1
Hot
Standby
DC1 DC2
customer_dc1
FDW
customer_dc2
30©2014 TransLattice, Inc. All Rights Reserved.
Configuration
n  configure --with-ossp-uuid
n  CREATE EXTENSION "uuid-ossp"
n  CREATE EXTENSION "postgres_fdw”
31©2014 TransLattice, Inc. All Rights Reserved.
Configuration
n  From dc1:
CREATE SERVER dc2_master
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'dc2_host', dbname 'dc2', port '5434');
CREATE SERVER dc2_slave
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'localhost', dbname 'dc2', port '5434');
32©2014 TransLattice, Inc. All Rights Reserved.
Configuration
n  From dc2:
CREATE SERVER dc1_master
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'dc1_host', dbname 'dc1', port '5433');
CREATE SERVER dc1_slave
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'localhost', dbname 'dc1', port '5433');
33©2014 TransLattice, Inc. All Rights Reserved.
Configuration
CREATE USER MAPPING
FOR user1 SERVER dc2_master
OPTIONS (user ’user1');
CREATE USER MAPPING
FOR user1 SERVER dc2_slave
OPTIONS (user ’user1');
34©2014 TransLattice, Inc. All Rights Reserved.
Configuration
CREATE TABLE customer_dc1
(cust_id UUID,
cust_name varchar,
cust_loc char(5));
35©2014 TransLattice, Inc. All Rights Reserved.
Configuration
On dc1:
CREATE FOREIGN TABLE customer_dc2_master
(cust_id UUID,
cust_name varchar,
cust_loc char(5))
SERVER dc2_master;
CREATE FOREIGN TABLE customer_dc2_slave
(cust_id UUID,
cust_name varchar,
cust_loc char(5))
SERVER dc2_slave;
36©2014 TransLattice, Inc. All Rights Reserved.
View Handling
n  Create a customer view, a union of local data and
local slave
n  Include cust_loc condition
CREATE VIEW customer AS
SELECT *
FROM customer_dc1
WHERE cust_loc = ‘DC1’
UNION ALL
SELECT * FROM customer_dc2_slave
WHERE cust_loc = ‘DC2’;
37©2014 TransLattice, Inc. All Rights Reserved.
View Handling
# explain select * from customer;
QUERY PLAN
-----------------------------------------------------------------------
---
Append (cost=0.00..140.82 rows=8 width=72)
-> Seq Scan on customer_dc1
Filter: (cust_loc = 'DC1'::bpchar)
-> Foreign Scan on customer_dc2_slave
38©2014 TransLattice, Inc. All Rights Reserved.
Configuration
n  PostgreSQL takes qualifications into account for better plans!
# explain select * from customer where cust_loc = 'DC1';
QUERY PLAN
----------------------------------------------------------------
Append (cost=0.00..20.04 rows=4 width=72)
-> Seq Scan on customer_dc1 (cost=…..)
Filter: (cust_loc = 'DC1'::bpchar)
n  Smart enough to know to use just one part of the UNION
–  Leaves off foreign table part
–  Consider in design of application
39©2014 TransLattice, Inc. All Rights Reserved.
Triggers
CREATE TRIGGER tr_customer
INSTEAD OF
INSERT OR UPDATE OR DELETE ON customer
FOR EACH ROW
EXECUTE PROCEDURE update_customer();
40©2014 TransLattice, Inc. All Rights Reserved.
Trigger Function
CREATE OR REPLACE FUNCTION update_customer()
RETURNS TRIGGER AS $$
BEGIN
-- TODO: Handle updating cust_loc
IF (TG_OP = 'UPDATE') THEN
IF OLD.cust_loc = 'DC1' THEN
UPDATE customer_dc1
SET cust_name = NEW.cust_name
WHERE cust_id = OLD.cust_id;
ELSEIF OLD.cust_loc = 'DC2' THEN
UPDATE customer_dc2_master
SET cust_name = NEW.cust_name
WHERE cust_id = OLD.cust_id;
END IF;
RETURN NEW;
:
$$ LANGUAGE plpgsql;
41©2014 TransLattice, Inc. All Rights Reserved.
Caveats
n  Performance will be poor for some queries
–  Join push-down
n  Two Phase Commit is not used by FDW
–  No consistency guarantees!
–  FWIW, will commit remotely before locally
n  Repeatable Read is used by the FDW
–  Keeps results the same for foreign table scanned multiple times
n  Differing locale settings may cause problems
42©2014 TransLattice, Inc. All Rights Reserved.
Custom Example – Further Enhancement
n  Want to reduce loss of ability to write new data
n  Add local table for local inserts when remote side
is down
–  Especially helpful for append-only workloads
n  Change trigger functions to use the local table
when the remote side is down
n  Allow updates and deletes on these as well
n  When the remote side is available again, apply
changes to remote side, truncate local table
43©2014 TransLattice, Inc. All Rights Reserved.
Custom Example – Additional try
n  Tried using table inheritance and adding a rule on
a subtable to instead query a remote table, but
encountered issues
44©2014 TransLattice, Inc. All Rights Reserved.
Another Custom Example
n  All tables in just one database on each node
n  No streaming replication
n  Changes applied at both locations
–  Either via 2PC
–  Or asynchronously via triggers
45©2014 TransLattice, Inc. All Rights Reserved.
Upcoming PostgreSQL Multi-master
Replication
n  Logical Log Streaming Replication (LLSR) in
PostgreSQL 9.4
n  WAL is read to determine logical commits
n  Can be decoded to SQL
n  Less overhead than other projects
n  Will allow for a subset of data to be replicated, not
entire instance unlike existing SR
46©2014 TransLattice, Inc. All Rights Reserved.
Upcoming PostgreSQL Multi-master
Replication
n  A goal in a future PostgreSQL release is multi-
master replication with last-one wins conflict
resolution (9.5?)
n  Possible 9.4 extension for apply side in future
n  Improvements over subsequent releases
–  Improved DDL support may be phased in over time
47©2014 TransLattice, Inc. All Rights Reserved.
Bucardo Example
createdb db1
createdb –p 5433 db1
psql –c “CREATE TABLE tab1
(col1 int, col2 int, PRIMARY KEY(col1))”
Db1
psql –c “CREATE TABLE tab1
(col1 int, col2 int, PRIMARY KEY(col1))”
-p 5433 db1
48©2014 TransLattice, Inc. All Rights Reserved.
Bucardo Example
bucardo_ctl install
bucardo_ctl add database db1 name=db1a
bucardo_ctl add database db1 name=db1b
port=5433
bucardo_ctl add all tables db=db1a
psql bucardo:
update bucardo.goat
set standard_conflict = 'latest'
where tablename = 'tab1';
49©2014 TransLattice, Inc. All Rights Reserved.
Bucardo Example
bucardo_ctl add sync sync_tab1 type=swap
source=db1a targetdb=db1b tables=tab1
bucardo_ctl stop
bucardo_ctl start
-> Updates to tab1 now visible on both servers
50©2014 TransLattice, Inc. All Rights Reserved.
Bucardo Notes
n  If having trouble, try “bucardo_ctl install” again
n  Also try bucardo_ctl stop and bucardo_ctl start
n  It seemed to get confused with table names the
same in multiple databases
51©2014 TransLattice, Inc. All Rights Reserved.
Alternative:
TransLattice Elastic Database (TED)
n  PostgreSQL-based
n  Geo-distributed multi-master RDBMS with sharding
n  Policy Configurable
–  Degree of redundancy
–  Data location
n  Uses Fast Generalized Paxos for global commit ordering
n  Easily add nodes
–  New locations
–  Existing locations for scalability
n  Nodes recover automatically
n  Easy transition
–  Can operates in conjunction with
existing database systems
52©2014 TransLattice, Inc. All Rights Reserved.
Each TransLattice Node Delivers Capabilities
That Replace Numerous Disparate Technologies
A single node type simplifies scaling and management
TL
Replication
Storage
Management
Cluster
Management
Compliance Tools
Fully Relational
Database
Management Tools
Data
Integration
Tools
53©2014 TransLattice, Inc. All Rights Reserved. 5353
Thank You!
msharp@translattice.com
@mason_db
@TransLattice

Mais conteúdo relacionado

Mais procurados

How you can contribute to Apache Cassandra
How you can contribute to Apache CassandraHow you can contribute to Apache Cassandra
How you can contribute to Apache CassandraYuki Morishita
 
Kubernetes meetup-tokyo-13-customizing-kubernetes-for-ml-cluster
Kubernetes meetup-tokyo-13-customizing-kubernetes-for-ml-clusterKubernetes meetup-tokyo-13-customizing-kubernetes-for-ml-cluster
Kubernetes meetup-tokyo-13-customizing-kubernetes-for-ml-clusterPreferred Networks
 
信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf
信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf
信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf株式会社MonotaRO Tech Team
 
PostgreSQL 15 開発最新情報
PostgreSQL 15 開発最新情報PostgreSQL 15 開発最新情報
PostgreSQL 15 開発最新情報Masahiko Sawada
 
忙しい人の5分で分かるDocker 2017年春Ver
忙しい人の5分で分かるDocker 2017年春Ver忙しい人の5分で分かるDocker 2017年春Ver
忙しい人の5分で分かるDocker 2017年春VerMasahito Zembutsu
 
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~NTT Communications Technology Development
 
押さえておきたい、PostgreSQL 13 の新機能!!(Open Source Conference 2021 Online/Hokkaido 発表資料)
押さえておきたい、PostgreSQL 13 の新機能!!(Open Source Conference 2021 Online/Hokkaido 発表資料)押さえておきたい、PostgreSQL 13 の新機能!!(Open Source Conference 2021 Online/Hokkaido 発表資料)
押さえておきたい、PostgreSQL 13 の新機能!!(Open Source Conference 2021 Online/Hokkaido 発表資料)NTT DATA Technology & Innovation
 
What's New in MySQL 5.7 InnoDB
What's New in MySQL 5.7 InnoDBWhat's New in MySQL 5.7 InnoDB
What's New in MySQL 5.7 InnoDBMikiya Okuno
 
Prometheus on EKS
Prometheus on EKSPrometheus on EKS
Prometheus on EKSJo Hoon
 
Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -
Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -
Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -Yoshiyasu SAEKI
 
フックを使ったPostgreSQLの拡張機能を作ってみよう!(第33回PostgreSQLアンカンファレンス@オンライン 発表資料)
フックを使ったPostgreSQLの拡張機能を作ってみよう!(第33回PostgreSQLアンカンファレンス@オンライン 発表資料)フックを使ったPostgreSQLの拡張機能を作ってみよう!(第33回PostgreSQLアンカンファレンス@オンライン 発表資料)
フックを使ったPostgreSQLの拡張機能を作ってみよう!(第33回PostgreSQLアンカンファレンス@オンライン 発表資料)NTT DATA Technology & Innovation
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder
 
PostGreSQL Performance Tuning
PostGreSQL Performance TuningPostGreSQL Performance Tuning
PostGreSQL Performance TuningMaven Logix
 
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...NTT DATA Technology & Innovation
 
MySQLとPostgreSQLの基本的なレプリケーション設定比較
MySQLとPostgreSQLの基本的なレプリケーション設定比較MySQLとPostgreSQLの基本的なレプリケーション設定比較
MySQLとPostgreSQLの基本的なレプリケーション設定比較Shinya Sugiyama
 
地理分散DBについて
地理分散DBについて地理分散DBについて
地理分散DBについてKumazaki Hiroki
 
Live traffic capture and replay in cassandra 4.0
Live traffic capture and replay in cassandra 4.0Live traffic capture and replay in cassandra 4.0
Live traffic capture and replay in cassandra 4.0Vinay Kumar Chella
 
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)NTT DATA Technology & Innovation
 

Mais procurados (20)

How you can contribute to Apache Cassandra
How you can contribute to Apache CassandraHow you can contribute to Apache Cassandra
How you can contribute to Apache Cassandra
 
Kubernetes meetup-tokyo-13-customizing-kubernetes-for-ml-cluster
Kubernetes meetup-tokyo-13-customizing-kubernetes-for-ml-clusterKubernetes meetup-tokyo-13-customizing-kubernetes-for-ml-cluster
Kubernetes meetup-tokyo-13-customizing-kubernetes-for-ml-cluster
 
信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf
信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf
信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf
 
PostgreSQL 15 開発最新情報
PostgreSQL 15 開発最新情報PostgreSQL 15 開発最新情報
PostgreSQL 15 開発最新情報
 
忙しい人の5分で分かるDocker 2017年春Ver
忙しい人の5分で分かるDocker 2017年春Ver忙しい人の5分で分かるDocker 2017年春Ver
忙しい人の5分で分かるDocker 2017年春Ver
 
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~
 
xrdpで変える!社内のPC環境
xrdpで変える!社内のPC環境xrdpで変える!社内のPC環境
xrdpで変える!社内のPC環境
 
押さえておきたい、PostgreSQL 13 の新機能!!(Open Source Conference 2021 Online/Hokkaido 発表資料)
押さえておきたい、PostgreSQL 13 の新機能!!(Open Source Conference 2021 Online/Hokkaido 発表資料)押さえておきたい、PostgreSQL 13 の新機能!!(Open Source Conference 2021 Online/Hokkaido 発表資料)
押さえておきたい、PostgreSQL 13 の新機能!!(Open Source Conference 2021 Online/Hokkaido 発表資料)
 
What's New in MySQL 5.7 InnoDB
What's New in MySQL 5.7 InnoDBWhat's New in MySQL 5.7 InnoDB
What's New in MySQL 5.7 InnoDB
 
Prometheus on EKS
Prometheus on EKSPrometheus on EKS
Prometheus on EKS
 
Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -
Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -
Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -
 
フックを使ったPostgreSQLの拡張機能を作ってみよう!(第33回PostgreSQLアンカンファレンス@オンライン 発表資料)
フックを使ったPostgreSQLの拡張機能を作ってみよう!(第33回PostgreSQLアンカンファレンス@オンライン 発表資料)フックを使ったPostgreSQLの拡張機能を作ってみよう!(第33回PostgreSQLアンカンファレンス@オンライン 発表資料)
フックを使ったPostgreSQLの拡張機能を作ってみよう!(第33回PostgreSQLアンカンファレンス@オンライン 発表資料)
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 
PostGreSQL Performance Tuning
PostGreSQL Performance TuningPostGreSQL Performance Tuning
PostGreSQL Performance Tuning
 
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...
 
How to run P4 BMv2
How to run P4 BMv2How to run P4 BMv2
How to run P4 BMv2
 
MySQLとPostgreSQLの基本的なレプリケーション設定比較
MySQLとPostgreSQLの基本的なレプリケーション設定比較MySQLとPostgreSQLの基本的なレプリケーション設定比較
MySQLとPostgreSQLの基本的なレプリケーション設定比較
 
地理分散DBについて
地理分散DBについて地理分散DBについて
地理分散DBについて
 
Live traffic capture and replay in cassandra 4.0
Live traffic capture and replay in cassandra 4.0Live traffic capture and replay in cassandra 4.0
Live traffic capture and replay in cassandra 4.0
 
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)
 

Destaque

Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data AnalyticsSupersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analyticsmason_s
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsJignesh Shah
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALEPostgreSQL Experts, Inc.
 
Architecture for building scalable and highly available Postgres Cluster
Architecture for building scalable and highly available Postgres ClusterArchitecture for building scalable and highly available Postgres Cluster
Architecture for building scalable and highly available Postgres ClusterAshnikbiz
 
Best Practices of running PostgreSQL in Virtual Environments
Best Practices of running PostgreSQL in Virtual EnvironmentsBest Practices of running PostgreSQL in Virtual Environments
Best Practices of running PostgreSQL in Virtual EnvironmentsJignesh Shah
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performancePostgreSQL-Consulting
 
Jena University Talk 2016.03.09 -- SQL at Zalando Technology
Jena University Talk 2016.03.09 -- SQL at Zalando TechnologyJena University Talk 2016.03.09 -- SQL at Zalando Technology
Jena University Talk 2016.03.09 -- SQL at Zalando TechnologyValentine Gogichashvili
 
Presentation PgDay Paris geolllibre postgeol
Presentation PgDay Paris geolllibre postgeolPresentation PgDay Paris geolllibre postgeol
Presentation PgDay Paris geolllibre postgeolPierre Chevalier
 
sql server dba with 9+ years of exp and hands on Postgresql
sql server dba with 9+ years of exp and hands on Postgresqlsql server dba with 9+ years of exp and hands on Postgresql
sql server dba with 9+ years of exp and hands on Postgresqlsunil thumma
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverJohn Paulett
 
Adding replication protocol support for psycopg2
Adding replication protocol support for psycopg2Adding replication protocol support for psycopg2
Adding replication protocol support for psycopg2Alexander Shulgin
 
Multi-master, multi-region MySQL deployment in Amazon AWS
Multi-master, multi-region MySQL deployment in Amazon AWSMulti-master, multi-region MySQL deployment in Amazon AWS
Multi-master, multi-region MySQL deployment in Amazon AWSContinuent
 
Do postgres-dream-of-graph-database
Do postgres-dream-of-graph-databaseDo postgres-dream-of-graph-database
Do postgres-dream-of-graph-databaseToshi Harada
 
Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015Alexey Lesovsky
 
Fun Things to do with Logical Decoding
Fun Things to do with Logical DecodingFun Things to do with Logical Decoding
Fun Things to do with Logical DecodingMike Fowler
 
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 Singapore
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 SingaporePostgreSQL 9.4 and Beyond @ FOSSASIA 2015 Singapore
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 SingaporeSatoshi Nagayasu
 
Magic quadrant for data warehouse database management systems
Magic quadrant for data warehouse database management systems Magic quadrant for data warehouse database management systems
Magic quadrant for data warehouse database management systems divjeev
 

Destaque (20)

Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data AnalyticsSupersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALE
 
Architecture for building scalable and highly available Postgres Cluster
Architecture for building scalable and highly available Postgres ClusterArchitecture for building scalable and highly available Postgres Cluster
Architecture for building scalable and highly available Postgres Cluster
 
Best Practices of running PostgreSQL in Virtual Environments
Best Practices of running PostgreSQL in Virtual EnvironmentsBest Practices of running PostgreSQL in Virtual Environments
Best Practices of running PostgreSQL in Virtual Environments
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
Postgresql Federation
Postgresql FederationPostgresql Federation
Postgresql Federation
 
Flexible Replication
Flexible ReplicationFlexible Replication
Flexible Replication
 
Jena University Talk 2016.03.09 -- SQL at Zalando Technology
Jena University Talk 2016.03.09 -- SQL at Zalando TechnologyJena University Talk 2016.03.09 -- SQL at Zalando Technology
Jena University Talk 2016.03.09 -- SQL at Zalando Technology
 
Presentation PgDay Paris geolllibre postgeol
Presentation PgDay Paris geolllibre postgeolPresentation PgDay Paris geolllibre postgeol
Presentation PgDay Paris geolllibre postgeol
 
sql server dba with 9+ years of exp and hands on Postgresql
sql server dba with 9+ years of exp and hands on Postgresqlsql server dba with 9+ years of exp and hands on Postgresql
sql server dba with 9+ years of exp and hands on Postgresql
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And Failover
 
Django pres
Django presDjango pres
Django pres
 
Adding replication protocol support for psycopg2
Adding replication protocol support for psycopg2Adding replication protocol support for psycopg2
Adding replication protocol support for psycopg2
 
Multi-master, multi-region MySQL deployment in Amazon AWS
Multi-master, multi-region MySQL deployment in Amazon AWSMulti-master, multi-region MySQL deployment in Amazon AWS
Multi-master, multi-region MySQL deployment in Amazon AWS
 
Do postgres-dream-of-graph-database
Do postgres-dream-of-graph-databaseDo postgres-dream-of-graph-database
Do postgres-dream-of-graph-database
 
Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015
 
Fun Things to do with Logical Decoding
Fun Things to do with Logical DecodingFun Things to do with Logical Decoding
Fun Things to do with Logical Decoding
 
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 Singapore
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 SingaporePostgreSQL 9.4 and Beyond @ FOSSASIA 2015 Singapore
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 Singapore
 
Magic quadrant for data warehouse database management systems
Magic quadrant for data warehouse database management systems Magic quadrant for data warehouse database management systems
Magic quadrant for data warehouse database management systems
 

Semelhante a Geographically Distributed PostgreSQL

Infosys Ltd: Performance Tuning - A Key to Successful Cassandra Migration
Infosys Ltd: Performance Tuning - A Key to Successful Cassandra MigrationInfosys Ltd: Performance Tuning - A Key to Successful Cassandra Migration
Infosys Ltd: Performance Tuning - A Key to Successful Cassandra MigrationDataStax Academy
 
Benchmarking sahara based big data as a service solutions
Benchmarking sahara based big data as a service solutionsBenchmarking sahara based big data as a service solutions
Benchmarking sahara based big data as a service solutionsZhidong Yu
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2aspyker
 
Spark Driven Big Data Analytics
Spark Driven Big Data AnalyticsSpark Driven Big Data Analytics
Spark Driven Big Data Analyticsinoshg
 
Spark SQL versus Apache Drill: Different Tools with Different Rules
Spark SQL versus Apache Drill: Different Tools with Different RulesSpark SQL versus Apache Drill: Different Tools with Different Rules
Spark SQL versus Apache Drill: Different Tools with Different RulesDataWorks Summit/Hadoop Summit
 
How Optimizely (Safely) Maximizes Database Concurrency.pdf
How Optimizely (Safely) Maximizes Database Concurrency.pdfHow Optimizely (Safely) Maximizes Database Concurrency.pdf
How Optimizely (Safely) Maximizes Database Concurrency.pdfScyllaDB
 
Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)
Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)
Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)Cédrick Lunven
 
Performance tuning - A key to successful cassandra migration
Performance tuning - A key to successful cassandra migrationPerformance tuning - A key to successful cassandra migration
Performance tuning - A key to successful cassandra migrationRamkumar Nottath
 
20230511 - PGConf Nepal - Clustering in PostgreSQL_ Because one database serv...
20230511 - PGConf Nepal - Clustering in PostgreSQL_ Because one database serv...20230511 - PGConf Nepal - Clustering in PostgreSQL_ Because one database serv...
20230511 - PGConf Nepal - Clustering in PostgreSQL_ Because one database serv...Umair Shahid
 
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Ludovico Caldara
 
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...confluent
 
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...Vinay Kumar Chella
 
Stream, Stream, Stream: Different Streaming Methods with Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Spark and KafkaStream, Stream, Stream: Different Streaming Methods with Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Spark and KafkaDataWorks Summit
 
Percon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshellPercon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshellFrederic Descamps
 
Capital One: Using Cassandra In Building A Reporting Platform
Capital One: Using Cassandra In Building A Reporting PlatformCapital One: Using Cassandra In Building A Reporting Platform
Capital One: Using Cassandra In Building A Reporting PlatformDataStax Academy
 
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
DPDK summit 2015: It's kind of fun  to do the impossible with DPDKDPDK summit 2015: It's kind of fun  to do the impossible with DPDK
DPDK summit 2015: It's kind of fun to do the impossible with DPDKLagopus SDN/OpenFlow switch
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaJim St. Leger
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDKKernel TLV
 
AusNOG 2011 - Residential IPv6 CPE - What Not to Do and Other Observations
AusNOG 2011 - Residential IPv6 CPE - What Not to Do and Other ObservationsAusNOG 2011 - Residential IPv6 CPE - What Not to Do and Other Observations
AusNOG 2011 - Residential IPv6 CPE - What Not to Do and Other ObservationsMark Smith
 

Semelhante a Geographically Distributed PostgreSQL (20)

Infosys Ltd: Performance Tuning - A Key to Successful Cassandra Migration
Infosys Ltd: Performance Tuning - A Key to Successful Cassandra MigrationInfosys Ltd: Performance Tuning - A Key to Successful Cassandra Migration
Infosys Ltd: Performance Tuning - A Key to Successful Cassandra Migration
 
Benchmarking sahara based big data as a service solutions
Benchmarking sahara based big data as a service solutionsBenchmarking sahara based big data as a service solutions
Benchmarking sahara based big data as a service solutions
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
Spark Driven Big Data Analytics
Spark Driven Big Data AnalyticsSpark Driven Big Data Analytics
Spark Driven Big Data Analytics
 
Spark SQL versus Apache Drill: Different Tools with Different Rules
Spark SQL versus Apache Drill: Different Tools with Different RulesSpark SQL versus Apache Drill: Different Tools with Different Rules
Spark SQL versus Apache Drill: Different Tools with Different Rules
 
How Optimizely (Safely) Maximizes Database Concurrency.pdf
How Optimizely (Safely) Maximizes Database Concurrency.pdfHow Optimizely (Safely) Maximizes Database Concurrency.pdf
How Optimizely (Safely) Maximizes Database Concurrency.pdf
 
Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)
Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)
Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)
 
OpenDataPlane Project
OpenDataPlane ProjectOpenDataPlane Project
OpenDataPlane Project
 
Performance tuning - A key to successful cassandra migration
Performance tuning - A key to successful cassandra migrationPerformance tuning - A key to successful cassandra migration
Performance tuning - A key to successful cassandra migration
 
20230511 - PGConf Nepal - Clustering in PostgreSQL_ Because one database serv...
20230511 - PGConf Nepal - Clustering in PostgreSQL_ Because one database serv...20230511 - PGConf Nepal - Clustering in PostgreSQL_ Because one database serv...
20230511 - PGConf Nepal - Clustering in PostgreSQL_ Because one database serv...
 
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
 
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
 
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
 
Stream, Stream, Stream: Different Streaming Methods with Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Spark and KafkaStream, Stream, Stream: Different Streaming Methods with Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Spark and Kafka
 
Percon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshellPercon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshell
 
Capital One: Using Cassandra In Building A Reporting Platform
Capital One: Using Cassandra In Building A Reporting PlatformCapital One: Using Cassandra In Building A Reporting Platform
Capital One: Using Cassandra In Building A Reporting Platform
 
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
DPDK summit 2015: It's kind of fun  to do the impossible with DPDKDPDK summit 2015: It's kind of fun  to do the impossible with DPDK
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
AusNOG 2011 - Residential IPv6 CPE - What Not to Do and Other Observations
AusNOG 2011 - Residential IPv6 CPE - What Not to Do and Other ObservationsAusNOG 2011 - Residential IPv6 CPE - What Not to Do and Other Observations
AusNOG 2011 - Residential IPv6 CPE - What Not to Do and Other Observations
 

Último

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Último (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Geographically Distributed PostgreSQL

  • 1. 1©2014 TransLattice, Inc. All Rights Reserved. 11 Geographically Distributed PostgreSQL PGConf NYC April 3, 2014 Mason Sharp, Chief Architect msharp@translattice.com
  • 2. 2©2014 TransLattice, Inc. All Rights Reserved. Agenda n  Why geographically distribute your data? n  General replication background n  PostgreSQL options n  Custom PostgreSQL configurations n  Upcoming solutions
  • 3. 3©2014 TransLattice, Inc. All Rights Reserved. Why geographically distribute your data? n  Improved Availability n  Better performance (in some cases…) –  Read vs Write –  Data closer applications and users n  Regulatory or Corporate Compliance –  Data placement concerns
  • 4. 4©2014 TransLattice, Inc. All Rights Reserved. Availability Issues Remain Headline News
  • 5. 5©2014 TransLattice, Inc. All Rights Reserved. 1  Survey by Zerto, July 2013, 356 IT professionals from 10 industries Primary causes of data center outage1: n  Hardware failure 34.4% n  Power loss/interruption 31.5% n  Natural disaster 13.3% 79.2% Most recent unplanned data center outage1: n  Last 6 months 42% n  Last year 34% 76% experienced in last year Data Center Outages – Causes and Frequency
  • 6. 6©2014 TransLattice, Inc. All Rights Reserved. Data Center Outage Costs Increasing 1  2  2013 Cost of Data Center Outages, Ponemon Institute, December 2013 3 Bringing Continuous Availability to Oracle Environments, 2013 Mission-Critical Application Availability Survey, Unisphere Research Average cost of an outage is increasing2: n  2010 $5,617/minute n  2013 $7,908/minute 41% increase Length of unplanned outage: n  Average: 86 minutes2 n  25%+ of Oracle users had 8+ hours of unplanned downtime in last year3
  • 7. 7©2014 TransLattice, Inc. All Rights Reserved. Current State of Data Replication Top data management issues for IT executives:4 n  Providing business continuity at a reasonable cost n  Deploying applications in multiple geographies consistently n  The continued ability to use SQL 4 DBMS Evaluation Criteria, IDG Research Services, October 2013 5 Bringing Continuous Availability to Oracle Environments, 2013 Mission-Critical Application Availability Survey, Unisphere Research “Among respondents with at least two data centers and rapid replication solutions, 46% indicate they are less than satisfied with their current strategies.” 5
  • 8. 8©2014 TransLattice, Inc. All Rights Reserved. Replication n  Master-Slave –  One Master, One or more Slaves n  Multi-master –  Multiple Masters n  Multi-source fan-in –  Example: consolidate multiple sites n  Fan-out
  • 9. 9©2014 TransLattice, Inc. All Rights Reserved. Master-Slave Master Slave Slave Slave
  • 10. 10©2014 TransLattice, Inc. All Rights Reserved. Master-Slave n  All writes go to one master n  Hot Standby reads can be done from any node n  Synchronous / Asynchronous n  Slaves get transactions via either –  Native streaming replication –  Statement based •  Could be synchronous, could be via 2PC •  Could be a replay mechanism via queues or triggers
  • 11. 11©2014 TransLattice, Inc. All Rights Reserved. Multi-master
  • 12. 12©2014 TransLattice, Inc. All Rights Reserved. Multi-master n  Write can occur at any location n  Synchronous 2PC –  MVCC concerns –  May make sense to first always write at one location, acquiring lock n  Asynchronous n  Conflict Resolution n  Conflict Avoidance through commit ordering –  Paxos –  Raft
  • 13. 13©2014 TransLattice, Inc. All Rights Reserved. Multi-source fan-in CentralLoc1 Loc2 Loc3 n  Consolidated centrally for reporting
  • 14. 14©2014 TransLattice, Inc. All Rights Reserved. Multi-source fan-out CentralLoc1 Loc2 Loc3 n  Subset sent to remote locations
  • 15. 15©2014 TransLattice, Inc. All Rights Reserved. Understand Your Requirements n  Availability –  Read-only access of some data ok in downgraded state? n  Immediacy of Data –  Nightly refresh? Immediate? 2 second lag? n  Performance & Latency –  Read vs. Write n  Correctness versus Performance n  Conflicts: Prevent or Resolve
  • 16. 16©2014 TransLattice, Inc. All Rights Reserved. Understand Your Requirements (continued) n  Data Segregation n  Data Ownership –  Can each location be the “master” to a subset of data? –  Example: regional customers –  Expressed either as a subtable, or expression on a table •  region_code = ‘US’ –  Different availability requirements? n  “Staticity” Classification –  Static tables that rarely change –  Frequently updated tables
  • 17. 17©2014 TransLattice, Inc. All Rights Reserved. Static Tables n  Less concerned about write performance n  Writing to table –  BEGIN; –  Execute DML statement on agreed “master” –  On success, we have acquired all of the row locks –  Safely execute on other nodes without risk of deadlock –  PREPARE TRANSACTION; –  COMMIT;
  • 18. 18©2014 TransLattice, Inc. All Rights Reserved. Careful with reflexive UPDATES UPDATE inventory SET qty = qty – 1 WHERE ….; n  What if happens on multiple nodes? n  If conflict resolution policy is last one wins, inventory is reduced only by 1, not 2 n  May expect inventory that is not there May want to handle some tables specially. •  SELECT FOR UPDATE on a master –  Will block if another transaction modifying –  Locks won’t propagate to other nodes
  • 19. 19©2014 TransLattice, Inc. All Rights Reserved. Looking in the PostgreSQL Toolbox – Master-Slave n  Native Streaming Replication –  All databases in instance are replicated –  Synchronous and Asynchronous options –  Hot queryable standby option n  Slony –  Trigger based, asynchronous replication –  Flexibility for a subset of data –  More complex administration n  Londiste
  • 20. 20©2014 TransLattice, Inc. All Rights Reserved. Looking in the PostgreSQL Toolbox – pgpool-II n  Middle Layer n  Synchronous Statement-Based Replication –  Can instead be combined with other replication incl. native streaming replication n  Load Balancer –  Can be All writes must go through master node
  • 21. 21©2014 TransLattice, Inc. All Rights Reserved. Looking in the PostgreSQL Toolbox – Postgres-XC n  Can connect to one of multiple nodes n  Good push-down join and operation handling n  Ensures cluster-wide consistency BUT n  Requires access to Global Transaction Manager from each node n  Nodes are a modified version of PostgreSQL n  Not currently suited for use case
  • 22. 22©2014 TransLattice, Inc. All Rights Reserved. Looking in the PostgreSQL Toolbox – PL/Proxy n  Everything is a stored function –  More cumbersome, but flexible
  • 23. 23©2014 TransLattice, Inc. All Rights Reserved. Looking in the PostgreSQL Toolbox – Multi-master n  Bucardo –  Perl-based –  Limited to two masters –  Custom conflict resolution possible n  RubyRep –  Ruby-based –  Limited to two masters –  Custom conflict resolution possible n  Postgres-R –  Modified PostgreSQL 9.0
  • 24. 24©2014 TransLattice, Inc. All Rights Reserved. Looking in the PostgreSQL Toolbox – Custom n  Triggers n  Foreign Data Wrappers n  Subtable Partitioning n  Two Phase Commit
  • 25. 25©2014 TransLattice, Inc. All Rights Reserved. Looking in the PostgreSQL Toolbox – Considerations n  Connections and MVCC across multiple instances n  Sequence/Serial –  UUID as alternative n  Timestamps –  Use timestamp with timezone –  Network Time Protocol NTP –  Custom functions for time lag
  • 26. 26©2014 TransLattice, Inc. All Rights Reserved. Custom Example n  Multiple Locations n  Locations largely independent n  Most of the writes will occur locally –  Each site is the “master” for local data n  Want to be able to write data on a remote site n  Want local read performance for remote originating data n  If remote site is down, local read-only access is acceptable n  Occasional updates to static data requires all nodes online
  • 27. 27©2014 TransLattice, Inc. All Rights Reserved. Custom Example DC2 Hot Standby DC1 Master DC2 Master DC1 Hot Standby DC1 DC2
  • 28. 28©2014 TransLattice, Inc. All Rights Reserved. Custom Example DC2 Hot Standby DC1 Master DC2 Master DC1 Hot Standby DC1 DC2 customer_dc1 customer_dc2
  • 29. 29©2014 TransLattice, Inc. All Rights Reserved. View: customer Custom Example DC2 Hot Standby DC1 Master DC2 Master DC1 Hot Standby DC1 DC2 customer_dc1 FDW customer_dc2
  • 30. 30©2014 TransLattice, Inc. All Rights Reserved. Configuration n  configure --with-ossp-uuid n  CREATE EXTENSION "uuid-ossp" n  CREATE EXTENSION "postgres_fdw”
  • 31. 31©2014 TransLattice, Inc. All Rights Reserved. Configuration n  From dc1: CREATE SERVER dc2_master FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'dc2_host', dbname 'dc2', port '5434'); CREATE SERVER dc2_slave FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'localhost', dbname 'dc2', port '5434');
  • 32. 32©2014 TransLattice, Inc. All Rights Reserved. Configuration n  From dc2: CREATE SERVER dc1_master FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'dc1_host', dbname 'dc1', port '5433'); CREATE SERVER dc1_slave FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'localhost', dbname 'dc1', port '5433');
  • 33. 33©2014 TransLattice, Inc. All Rights Reserved. Configuration CREATE USER MAPPING FOR user1 SERVER dc2_master OPTIONS (user ’user1'); CREATE USER MAPPING FOR user1 SERVER dc2_slave OPTIONS (user ’user1');
  • 34. 34©2014 TransLattice, Inc. All Rights Reserved. Configuration CREATE TABLE customer_dc1 (cust_id UUID, cust_name varchar, cust_loc char(5));
  • 35. 35©2014 TransLattice, Inc. All Rights Reserved. Configuration On dc1: CREATE FOREIGN TABLE customer_dc2_master (cust_id UUID, cust_name varchar, cust_loc char(5)) SERVER dc2_master; CREATE FOREIGN TABLE customer_dc2_slave (cust_id UUID, cust_name varchar, cust_loc char(5)) SERVER dc2_slave;
  • 36. 36©2014 TransLattice, Inc. All Rights Reserved. View Handling n  Create a customer view, a union of local data and local slave n  Include cust_loc condition CREATE VIEW customer AS SELECT * FROM customer_dc1 WHERE cust_loc = ‘DC1’ UNION ALL SELECT * FROM customer_dc2_slave WHERE cust_loc = ‘DC2’;
  • 37. 37©2014 TransLattice, Inc. All Rights Reserved. View Handling # explain select * from customer; QUERY PLAN ----------------------------------------------------------------------- --- Append (cost=0.00..140.82 rows=8 width=72) -> Seq Scan on customer_dc1 Filter: (cust_loc = 'DC1'::bpchar) -> Foreign Scan on customer_dc2_slave
  • 38. 38©2014 TransLattice, Inc. All Rights Reserved. Configuration n  PostgreSQL takes qualifications into account for better plans! # explain select * from customer where cust_loc = 'DC1'; QUERY PLAN ---------------------------------------------------------------- Append (cost=0.00..20.04 rows=4 width=72) -> Seq Scan on customer_dc1 (cost=…..) Filter: (cust_loc = 'DC1'::bpchar) n  Smart enough to know to use just one part of the UNION –  Leaves off foreign table part –  Consider in design of application
  • 39. 39©2014 TransLattice, Inc. All Rights Reserved. Triggers CREATE TRIGGER tr_customer INSTEAD OF INSERT OR UPDATE OR DELETE ON customer FOR EACH ROW EXECUTE PROCEDURE update_customer();
  • 40. 40©2014 TransLattice, Inc. All Rights Reserved. Trigger Function CREATE OR REPLACE FUNCTION update_customer() RETURNS TRIGGER AS $$ BEGIN -- TODO: Handle updating cust_loc IF (TG_OP = 'UPDATE') THEN IF OLD.cust_loc = 'DC1' THEN UPDATE customer_dc1 SET cust_name = NEW.cust_name WHERE cust_id = OLD.cust_id; ELSEIF OLD.cust_loc = 'DC2' THEN UPDATE customer_dc2_master SET cust_name = NEW.cust_name WHERE cust_id = OLD.cust_id; END IF; RETURN NEW; : $$ LANGUAGE plpgsql;
  • 41. 41©2014 TransLattice, Inc. All Rights Reserved. Caveats n  Performance will be poor for some queries –  Join push-down n  Two Phase Commit is not used by FDW –  No consistency guarantees! –  FWIW, will commit remotely before locally n  Repeatable Read is used by the FDW –  Keeps results the same for foreign table scanned multiple times n  Differing locale settings may cause problems
  • 42. 42©2014 TransLattice, Inc. All Rights Reserved. Custom Example – Further Enhancement n  Want to reduce loss of ability to write new data n  Add local table for local inserts when remote side is down –  Especially helpful for append-only workloads n  Change trigger functions to use the local table when the remote side is down n  Allow updates and deletes on these as well n  When the remote side is available again, apply changes to remote side, truncate local table
  • 43. 43©2014 TransLattice, Inc. All Rights Reserved. Custom Example – Additional try n  Tried using table inheritance and adding a rule on a subtable to instead query a remote table, but encountered issues
  • 44. 44©2014 TransLattice, Inc. All Rights Reserved. Another Custom Example n  All tables in just one database on each node n  No streaming replication n  Changes applied at both locations –  Either via 2PC –  Or asynchronously via triggers
  • 45. 45©2014 TransLattice, Inc. All Rights Reserved. Upcoming PostgreSQL Multi-master Replication n  Logical Log Streaming Replication (LLSR) in PostgreSQL 9.4 n  WAL is read to determine logical commits n  Can be decoded to SQL n  Less overhead than other projects n  Will allow for a subset of data to be replicated, not entire instance unlike existing SR
  • 46. 46©2014 TransLattice, Inc. All Rights Reserved. Upcoming PostgreSQL Multi-master Replication n  A goal in a future PostgreSQL release is multi- master replication with last-one wins conflict resolution (9.5?) n  Possible 9.4 extension for apply side in future n  Improvements over subsequent releases –  Improved DDL support may be phased in over time
  • 47. 47©2014 TransLattice, Inc. All Rights Reserved. Bucardo Example createdb db1 createdb –p 5433 db1 psql –c “CREATE TABLE tab1 (col1 int, col2 int, PRIMARY KEY(col1))” Db1 psql –c “CREATE TABLE tab1 (col1 int, col2 int, PRIMARY KEY(col1))” -p 5433 db1
  • 48. 48©2014 TransLattice, Inc. All Rights Reserved. Bucardo Example bucardo_ctl install bucardo_ctl add database db1 name=db1a bucardo_ctl add database db1 name=db1b port=5433 bucardo_ctl add all tables db=db1a psql bucardo: update bucardo.goat set standard_conflict = 'latest' where tablename = 'tab1';
  • 49. 49©2014 TransLattice, Inc. All Rights Reserved. Bucardo Example bucardo_ctl add sync sync_tab1 type=swap source=db1a targetdb=db1b tables=tab1 bucardo_ctl stop bucardo_ctl start -> Updates to tab1 now visible on both servers
  • 50. 50©2014 TransLattice, Inc. All Rights Reserved. Bucardo Notes n  If having trouble, try “bucardo_ctl install” again n  Also try bucardo_ctl stop and bucardo_ctl start n  It seemed to get confused with table names the same in multiple databases
  • 51. 51©2014 TransLattice, Inc. All Rights Reserved. Alternative: TransLattice Elastic Database (TED) n  PostgreSQL-based n  Geo-distributed multi-master RDBMS with sharding n  Policy Configurable –  Degree of redundancy –  Data location n  Uses Fast Generalized Paxos for global commit ordering n  Easily add nodes –  New locations –  Existing locations for scalability n  Nodes recover automatically n  Easy transition –  Can operates in conjunction with existing database systems
  • 52. 52©2014 TransLattice, Inc. All Rights Reserved. Each TransLattice Node Delivers Capabilities That Replace Numerous Disparate Technologies A single node type simplifies scaling and management TL Replication Storage Management Cluster Management Compliance Tools Fully Relational Database Management Tools Data Integration Tools
  • 53. 53©2014 TransLattice, Inc. All Rights Reserved. 5353 Thank You! msharp@translattice.com @mason_db @TransLattice

Notas do Editor

  1. Even sharding within an instance