Upload
ashnikbiz
View
297
Download
2
Embed Size (px)
DESCRIPTION
Asynchronous cascading master to multiple replicas Asynchronous multi-master Can be used for: Improved performance for geographically dispersed users High availability Load distribution (OLTP vs. reporting)
Citation preview
EnterpriseDB’sxDB Replication
solution Setup and Success stories by Ashnik in ASEAN
25/8/2014
Confi
denti
al in
form
ation
, for
inte
rnal
use
on
ly
2
Confi
denti
al in
form
ation
, for
inte
rnal
use
on
ly
POSTGRESinnovation
ENTERPRISE reliability
24/7 support
Services & training
Enterprise-class features & tools
Indemnification
Product road-map
Control
Thousands of developers
Fast development
cycles
Low cost
No vendor lock-in
Advanced features
Get The Best Of Both Worlds
3
• Asynchronous cascading master to multiple replicas• Asynchronous multi-master• Can be used for:
• Improved performance for geographically dispersed users
• High availability• Load distribution (OLTP vs. reporting)
xDB Replication Server
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
4
• High Availability uses• Geographic distribution of load• For creation of Testing/staging env using snapshot replication• Segregate OLTP and reporting
xDB Replication Use Cases
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
Replication
5
xDB Replication Server (Single Master)
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
Supports EDB and Oracle near real-time heterogeneous replication
Supports Postgres to Postgres replication now
Trigger-based system with less than 10% performance impact
Applications• For customers “stuck” on an Oracle database• Offload reporting to EDB• Keep Oracle database running fast for transactions
6
xDB Single-Master Replication (SMR)
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
Table D
Table C
Table B
Table A
Table C
Table D
ProcsObjects
ReportsQueries
Continuousor Scheduled----------------
Filteredor All Rows
TransactionReplication
ImprovedOLTP
Performance
InexpensiveQuery /
Reporting
Oracle Server Postgres Plus Advanced Server
7
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
xDB Replication – Heterogeneous DB Support
Source \ Target Oracle Microsoft SQL
Server 2005/2008 PostgreSQL
Postgres Plus Advanced
Server (Oracle mode)
Postgres Plus Advanced
Server (PostgreSQL
mode)
Oracle Yes Yes Yes
Microsoft SQL Server Yes Yes Yes
PostgreSQL Yes Yes* Yes Yes*
Postgres Plus Advanced Server (Oracle mode)
Yes Yes Yes*
Postgres Plus Advanced Server (PostgreSQL mode)
Yes Yes* Yes Yes*
* Supported in Multi-Master mode
8
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
Master-to-Master Replication for 2 or more nodesTrigger-based asynchronous implementation
• Delay of a couple of seconds to possibly minutes depending on configuration and load
Automatic Conflict Detection• Uniqueness• Update• Delete
Multiple Conflict Resolution• Earliest or Latest Timestamp• Node priority – one node always wins• Manual – Administrator reviews and actions
xDB Replication Server (Multi-Master)
9
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
Ideal for Geo-dispersed ServersEach geography updates a local master faster than to a single common master
Allows failover of one geography to another geography
Provides write availability
10
• Java-based Replication Server and Replication Console• Delta changes recorded in shadow tables via post Insert/Update/Delete triggers• Data Replication through JDBC channel
xDB MMR Architecture
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
11
• Multi Master Replication – State Farms Insurance, USA
• DR Site Replication – ToT, Thailand• Reporting Server Replication- Packet1,
Malaysia
Production Implementation of xDB
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
12
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
SUCCESS STORIES in ASEAN
13
Issues in Environment- Delayed Reports- Additional Oracle Server for
reporting = Extra Cost- Extra Add-on component
needed for Replication between OLTP and Reporting DB
- Reports being pulled from two Databases- ArchiveDB and LiveDB
- No Primary Keys in database to implement change data capture
Solution Suggested- Migrate Archive DB to Postgres Plus- Do daily snapshot of changes from
Oracle to Postgres Plus- Use xDB replication for Snapshot
Implementation- Migrated 1.2TB of Archive and 700MB
of Live DB- 500MB of Differential data replicated
on daily basis- Result – Reports are generated on
time!- OLTP Performance improved due to
offloading
Packet1- A Major Telco in Malaysia improves Reporting Performance with EnterpriseDB
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
14
ToT, Thailand plans to replace Oracle Exadata-TimesTen In-memory database with HP-EnterpriseDB stack
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
Background• Largest public sector company in telecom in Thailand• Has very stringent response time SLA (20ms response time for user requests ~ 3-5 read queries)• Current setup has Oracle Exadata and four TimeTen In-memory databases
Current Challenges in Oracle Stack• Issues in sync of Exadata with
In-memory databases• Full refresh locks the tables• Current system can go upto 1500 tps• Dynamic Partitioning for huge table• Current system load is 750 TPS with
write operations• 5000 user requests (16.5K read queries)
per second with 4 servers
HP-EnterpriseDB Stack Proposed to be DR for Exadata• HP DL-980 (4 CPU * 10 cores, 256GB RAM)• 1TB VMA Disks for faster access• Simulation tests show 2800 write-TPS achieved• Flexible Partitioning scheme in PPAS (add partition on the fly for
each new date, no manual intervention)• Currently this server is being tested as DR for Exadata• Replication using xDB near-relatime replication for 1000 tps • Scalability achieved using cascaded replication and Infinite Cache• Setup can handle 5500 user requests (18K queries per second)
with 1.5-2.5ms response time per query
15
PostgreSQL – Postgres Plus Users, Globally
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
16
PostgreSQL – Postgres Plus Users, across ASEAN
CON
FID
ENTI
AL©
201
1 En
terp
riseD
B. A
ll rig
hts
rese
rved
.
Malaysia
Philippines
Singapore
Vietnam Thailand
Indonesia
17
Confi
denti
al in
form
ation
, for
inte
rnal
use
on
ly