22.01.2015 Views

Replication Server Presentation - Sybase

Replication Server Presentation - Sybase

Replication Server Presentation - Sybase

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Why Replicate<br />

• High Availability of data<br />

• Planned, Unplanned downtime and Disaster Recovery<br />

• Data Distribution<br />

• Decentralizations<br />

• Consolidations<br />

• Load balancing<br />

• Live decision support<br />

• Separation of OLTP and DSS


<strong>Replication</strong> and High Availability<br />

Philadelphia Operations<br />

ASE<br />

PRIMARY DATACENTER<br />

Denver Operations<br />

ASE<br />

<strong>Replication</strong><br />

<strong>Server</strong><br />

<strong>Replication</strong><br />

<strong>Server</strong><br />

SECONDARY DATACENTER<br />

Warm Standby<br />

•Minimize/eliminate user impact<br />

•Protect against unplanned<br />

outages<br />

•Software, Hardware,<br />

Application failure<br />

•Unforeseen circumstances like<br />

data corruption<br />

•Protect against planned outages<br />

•Software, Hardware,<br />

Application upgrades<br />

•Enable ops to perform<br />

maintenance activities<br />

•Recover from natural disaster<br />

•Without geographic restrictions


<strong>Replication</strong> System Architecture: Warm Standby<br />

Active DB<br />

Add’l routes/<br />

connections<br />

Logical DB<br />

Standby DB<br />

RS<br />

• Special Configuration: One Active,<br />

One Standby Database managed by<br />

One Rep <strong>Server</strong><br />

• May be configured to replicate the<br />

entire database – Complete Mirror!<br />

(publish-subscribe mechanism not<br />

required)<br />

• DDL/Schema Change replication!<br />

• Direction of <strong>Replication</strong> can be<br />

switched<br />

• Performs failover and failback<br />

• Ease of Administration, Low latency<br />

• Active-Standby pair viewed as a<br />

single logical DB at other replicate<br />

sites


<strong>Replication</strong> and Data Distribution<br />

• Continuous Secure<br />

<strong>Replication</strong> of<br />

changed data<br />

CRM-sales, customer<br />

Financial Information<br />

Dealers<br />

Dealers<br />

• Guaranteed<br />

Delivery<br />

ASE<br />

Rep <strong>Server</strong><br />

ASE<br />

Rep <strong>Server</strong><br />

For<br />

• Decentralization<br />

• Consolidation<br />

• Load Balancing<br />

ASE<br />

Rep <strong>Server</strong><br />

New York Consolidation<br />

ASE<br />

Rep <strong>Server</strong><br />

ASE<br />

Rep <strong>Server</strong>


<strong>Replication</strong> and Live Decision Support<br />

• Separate Operational data from Decision Support<br />

• Run intensive queries without effecting the<br />

performance of transaction processing system<br />

• Real-time alternative to Data Warehousing<br />

OLTP<br />

DSS<br />

ASE Rep <strong>Server</strong> Rep <strong>Server</strong> ASE


Requirements for e-Business Data Movement<br />

• Increasing demand for assurance of privacy<br />

• Solution: Secure, guaranteed replication for data<br />

distribution<br />

• Flexibility in moving data around the enterprise<br />

• Solution: Support replication of e-business data across<br />

heterogeneous databases<br />

• 24/7 system availability<br />

• Solution: High Performance Data <strong>Replication</strong> through<br />

<strong>Replication</strong> <strong>Server</strong> Warm Standby


<strong>Replication</strong> <strong>Server</strong> 12.5: New Features<br />

New Features<br />

• Security<br />

• Advanced Security Option – SSL Support<br />

• Flexibility<br />

• Unicode Support<br />

• LDAP Support<br />

• Extended Limits Data Support<br />

• Multi-Vendor <strong>Replication</strong><br />

• Performance<br />

• Configurable Transaction Partitioning for Parallel DSI<br />

• SMP Support<br />

• Commit Sequencing Enhancements for Parallel DSI


Security - SSL Support<br />

Background<br />

• SSL – Secure Socket Layer – is an industry standard for<br />

sending socket-level encrypted data over network<br />

connections<br />

• Different Encryption algorithms can be used for data<br />

security<br />

• Data integrity is guaranteed through Digital Signatures for<br />

tamper protection and non-repudiation<br />

• Mutual authentication of servers and clients through Digital<br />

Certificates<br />

• Typically for communications over a wide area network<br />

• The computing overhead of encryption limits its use in LAN<br />

environments behind the firewall


Security - Advanced Security Option – SSL<br />

• <strong>Replication</strong> <strong>Server</strong> provides advanced security for data<br />

communications through SSL Support<br />

• All data exchanges with other servers (ASE or RS) can<br />

use SSL for data encryption<br />

• SSL can be used selectively on specific connections or<br />

routes<br />

• SSL Support is a separately license-able option<br />

Route<br />

DSI<br />

RepAgent<br />

RS<br />

SSL SSL SSL


Security - SSL Support<br />

• <strong>Replication</strong> <strong>Server</strong> can act as a client and a server for<br />

SSL communication<br />

• Acts as a client when connecting to ASE (DSI<br />

connections) or to other <strong>Replication</strong> <strong>Server</strong>s (routes)<br />

• Acts as a server when accepting connections from<br />

<strong>Replication</strong> Agent or from other <strong>Replication</strong> <strong>Server</strong>s<br />

(routes)<br />

• A configuration parameter determines whether<br />

<strong>Replication</strong> <strong>Server</strong> can accept SSL connections<br />

• The parameter determines its behavior as a server, not<br />

as a client<br />

• configure replication server set use_ssl to {on | off}


Security - SSL Support<br />

• The interfaces file entry indicates to the client that the<br />

server requires SSL connections<br />

• If the target (ASE or RS) requires SSL communication<br />

(through the interface entries), the client automatically<br />

uses SSL to connect<br />

• Different clients can use or not use SSL to connect to the<br />

same server using different interface files<br />

• SSL incurs considerable overhead at connection setup<br />

WAN/Internet<br />

SSL<br />

SSL<br />

London RS<br />

Route<br />

Interface file with SSL Entry<br />

for NYRS<br />

NYRS<br />

NJRS<br />

Interface file with plain<br />

Entry for NYRS


Security - SSL Support<br />

Prevent interception of sensitive information<br />

• SSL Encryption protects from both accidental<br />

disclosure as well as wire taps<br />

• PKI-certificates authenticate servers to clients<br />

• Fully embedded in product, reducing complexity to<br />

client applications<br />

• Complete end-to-end security services support for ASE<br />

replication environment


Flexibility - Unicode Support<br />

• <strong>Replication</strong> <strong>Server</strong> 12.5 supports utf8 character set as<br />

a default character set for the server<br />

• Greatly benefits global environments with multiple<br />

languages and character sets<br />

• By running all <strong>Replication</strong> <strong>Server</strong>s in the environment<br />

with utf8 character set, you minimize data conversions<br />

and thereby, minimize data loss<br />

Japan<br />

operations<br />

ASE RS ASE RS<br />

No data conversion, no data loss<br />

German<br />

operations<br />

ASE RS<br />

New York Consolidation


Flexibility - Unicode Support<br />

• Supports replication of Unicode data (UCS-2)<br />

• Supports replication of two new ASE 12.5 data types: unichar,<br />

univarchar<br />

• Unichar is a fixed-width non-nullable data type<br />

• Univarchar is a variable width, nullable data type<br />

• Both use UTF-16, a fixed two-byte encoding of Unicode<br />

• Support includes:<br />

• <strong>Replication</strong> to Standby databases<br />

• <strong>Replication</strong> to Replicate databases<br />

• Data types can be included in replication definitions<br />

• As searchable columns (subscriptions can use them in<br />

where clauses)


Flexibility - Unicode Support<br />

• <strong>Replication</strong> of Unicode data<br />

• Different sort order used for Unicode data (unichar,<br />

univarchar columns), defined by the new<br />

RS_unicode_sortorder parameter in the configuration file<br />

(default: binary)<br />

• RS_subcmp supports the unicode data types<br />

• Mixed Version Support<br />

• <strong>Replication</strong> Definition that includes unicode data types is<br />

not propagated to pre-12.5 servers (dropped from pre-<br />

12.5 servers if it already exists)<br />

• <strong>Replication</strong> Definition that is subscribed by pre-12.5<br />

servers can not be altered to include unicode data types


Flexibility - LDAP Support<br />

• Allows <strong>Replication</strong> <strong>Server</strong> to retrieve <strong>Server</strong> connection<br />

information from an LDAP server<br />

• Ease of administration in distributed, enterprise-wide<br />

environments with heterogeneous platforms<br />

• A standard, central way<br />

of managing directory<br />

information can<br />

be supported in<br />

replication<br />

environments<br />

LDAP Directory<br />

ASE RS ASE RS<br />

ASE<br />

RS


Flexibility - Extended Limits Data Support<br />

• Complete support for replication of extended limits data<br />

– wide columns, wide tables, wide stored procedures<br />

etc.<br />

• Column widths up to 32K bytes<br />

• Tables up to 1024 columns<br />

• Stored Procedures up to 1024 parameters<br />

• Internal limitation of replication message length of 16K<br />

bytes eliminated<br />

• Support for larger page sizes in ASE (2K, 4K, 8K or 16K)


Flexibility - Extended Limits Data Support<br />

• <strong>Replication</strong> Definition can include<br />

• Wider columns (up to 32K bytes) and up to 1024 cols<br />

• Can be marked as primary columns or searchable cols<br />

• No limit (up to 1024) on the number of columns in<br />

primary key or searchable list<br />

• Only propagated to 12.5 sites if new limits are used<br />

• Before 12.5, <strong>Replication</strong> Message length (length of<br />

each message passed between ASE-RS and RS-RS)<br />

had to be below 16K bytes (fit within a Stable Queue<br />

block)<br />

• Starting with 12.5, replication messages can span<br />

multiple blocks<br />

• <strong>Replication</strong> of wider column data is likely to result in<br />

wider replication messages


Flexibility - Extended Limits Data Support<br />

Mixed Version Support<br />

• ASE <strong>Replication</strong> Agent will detect if the <strong>Replication</strong><br />

<strong>Server</strong> can handle wide data<br />

• If not, <strong>Replication</strong> Agent will truncate or skip the data (as<br />

configured) before sending it over to <strong>Replication</strong> <strong>Server</strong><br />

• “Route Version” will determine if wide data can be<br />

handled by <strong>Replication</strong> <strong>Server</strong>s at either end of the<br />

route<br />

• <strong>Replication</strong> <strong>Server</strong> will skip over any messages that are<br />

larger than the 16K limit before sending data over to<br />

other <strong>Replication</strong> <strong>Server</strong>s that can’t handle wide data<br />

• <strong>Replication</strong> Definitions that contain wide columns are not<br />

propagated to sites that can’t handle wide data, hence<br />

replication to older sites is limited to older limits


Flexibility - Extended Limits Data Support<br />

Migration<br />

• <strong>Replication</strong> <strong>Server</strong> can be used in conjunction with the<br />

ASE Migration Tool to migrate between databases of<br />

different page sizes over a period of time<br />

• Migration Tool can be used to setup the secondary<br />

copy, while <strong>Replication</strong> <strong>Server</strong> can keep the copies in<br />

synch, such that migration occurs over a period of time<br />

and applications can be fully tested<br />

• The same technique (with dump/load) can be used to<br />

migrate from one server version to another (or a<br />

combination of version and page size change) with<br />

almost no downtime


Flexibility - Multi-Vendor <strong>Replication</strong><br />

Primary DB<br />

(Oracle)<br />

RS<br />

Add’l routes/<br />

connections<br />

Rep Agent<br />

for Oracle<br />

• <strong>Replication</strong> Agents pull data<br />

out of non-<strong>Sybase</strong> sources<br />

• DirectConnects are used as<br />

gateways to replicate into<br />

non-<strong>Sybase</strong> targets<br />

• Support for vendor-specific<br />

datatypes, translations etc.<br />

Replicate DB<br />

(MS SQL)<br />

DirectConnect<br />

for MS SQL<br />

• Some <strong>Replication</strong> Agents<br />

read the transaction log<br />

(DB2), some build a virtual<br />

log with triggers (Oracle,<br />

MS SQL)


Flexibility - Heterogeneous <strong>Replication</strong><br />

• Extended Limits Data<br />

• Wide data (columns, tables and stored procedures) can<br />

be replicated between multi-vendor databases – ASE,<br />

Oracle, DB2 etc.<br />

• <strong>Replication</strong> Agent, DirectConnect supports replication of<br />

wide data<br />

• LOB (Text/Image) Data<br />

• <strong>Replication</strong> Agent now supports LOB replication out of<br />

DB2 UDB<br />

• LOB support by Direct Connect for Oracle allows end-toend<br />

replication of text/image data for Oracle<br />

environments


Flexibility - Heterogeneous <strong>Replication</strong><br />

• Unicode<br />

• Unicode data can be replicated between multi-vendor<br />

databases<br />

• <strong>Replication</strong> Agent and Direct Connect for Oracle support<br />

replication of unicode data and UTF-8 character set<br />

• Platform Support<br />

• Oracle 8.1.7 and 9i (<strong>Replication</strong> Agent, Direct Connect)<br />

• IBM DB2 UDB 6.1, 7.1 and 7.2 (RA, DC)<br />

• SQL <strong>Server</strong> 7.0 and 2000 (aka 8.0) (RA, DC):<br />

<strong>Replication</strong> Agent is now available on Unix and Windows<br />

2000<br />

• Informix 7.3 and 9.2 (RA, DC)


<strong>Replication</strong> <strong>Server</strong> Packaging<br />

<strong>Replication</strong><br />

<strong>Server</strong><br />

Base<br />

Package<br />

<strong>Replication</strong> <strong>Server</strong> Base <strong>Server</strong> License<br />

<strong>Replication</strong> <strong>Server</strong> Manager<br />

<strong>Sybase</strong> Central Plug-in for<br />

<strong>Replication</strong> <strong>Server</strong><br />

<strong>Replication</strong> <strong>Server</strong> - Advanced Security Option<br />

Option for<br />

Oracle<br />

Option for<br />

Informix<br />

Option for<br />

Microsoft<br />

Option for<br />

DB2/UDB<br />

RA<br />

RA<br />

RA<br />

RA<br />

<strong>Replication</strong><br />

<strong>Server</strong><br />

Options<br />

Package<br />

DC<br />

DC<br />

DC<br />

DC<br />

ASE<br />

ASE<br />

ASE<br />

ASE


<strong>Replication</strong> <strong>Server</strong> 12.5<br />

Performance Enhancements<br />

• Configurable Transaction Partitioning for Parallel DSI<br />

• SMP Support – Will be released in an EBF 3-4 months<br />

• Commit Sequencing Enhancements for Parallel DSI –<br />

Will be released in an EBF 3-4 months


Performance Enhancements<br />

Configurable Transaction Partitioning<br />

Background<br />

• Parallel DSI threads in RS attempt to apply transactions in<br />

the queue to the replicate DB in parallel<br />

• Each DSI thread opens a connection to the replicate DB<br />

• Commit order is still maintained – only the “body” of the<br />

transactions are applied in parallel<br />

• Transactions can also be grouped together to apply “more”<br />

in each unit of work – grouping rules decide which<br />

transactions can be grouped<br />

• Not all transaction “bodies” can be applied in parallel<br />

• Some of them may deal with the same tables/rows<br />

• Resulting in deadlocks and rollbacks, reducing<br />

throughput<br />

• Transaction grouping increases the chance of contention


Performance Enhancements<br />

Configurable Transaction Partitioning<br />

• Traditional Transaction Partitioning<br />

• The transactions (transaction groups) are partitioned<br />

across DSI threads in a round robin fashion<br />

Queue<br />

T3<br />

T2<br />

T1<br />

T1<br />

T2<br />

T3<br />

• Possibility of deadlocks or contention if transactions<br />

(groups) assigned to different threads work on the same<br />

tables or rows<br />

• Both transactions are rolled back and applied serially if a<br />

deadlock is detected


Performance Enhancements<br />

Configurable Transaction Partitioning<br />

• Configurable Transaction Partitioning<br />

• The transactions are grouped and partitioned across DSI<br />

threads intelligently based on transaction attributes<br />

(configurable)<br />

• The goal is to reduce contention by recognizing which<br />

transactions can be applied in parallel and which<br />

transactions can be grouped<br />

• Transaction commit time, Transaction name and User<br />

name are used to determine how transactions can be<br />

partitioned<br />

Queue<br />

T3<br />

T2<br />

T1<br />

T1, T2<br />

T4, T5<br />

T3<br />

Tran Partitioning Rules Engine


Performance Enhancements<br />

Configurable Transaction Partitioning<br />

• Username Based Transaction Partitioning<br />

• Transactions owned by the same user are forced to execute<br />

serially (possibly in the same transaction group) since they<br />

were probably executed one after the other at the primary by<br />

the same user<br />

• Transaction Name Based Transaction Partitioning<br />

• Transactions with the same name are forced to execute<br />

serially (possibly in the same transaction group) since they<br />

probably represent operations on related data and might lead<br />

to contention if attempted in parallel<br />

• Commit Time based Transaction Partitioning<br />

• Transactions that have overlapping execution times are<br />

assigned to (different groups and) parallel threads since they<br />

were applied concurrently at the primary – less chance for<br />

contention


Performance Enhancements<br />

Configurable Transaction Partitioning<br />

• <strong>Replication</strong> <strong>Server</strong> attempts to mimic users at primary<br />

DB<br />

• Brings replicate throughput closer to primary DB<br />

throughput<br />

• Reduces contention among multiple RS threads (DSI)<br />

applying transactions at the replicate DB<br />

• Optimal resource utilization by minimizing deadlocks and<br />

rollbacks<br />

• Parallel DSI Processing is made more efficient by<br />

reducing the contention and deadlocks in the replicate<br />

DB


Performance Enhancements<br />

SMP Support<br />

• Takes advantage of SMP architecture and improves<br />

scalability<br />

• Parallelizing internal <strong>Replication</strong> <strong>Server</strong> processing<br />

decreases latency and increases throughput<br />

• Scales well for replication of multiple sources and<br />

targets within the same server


Performance Enhancements<br />

SMP Support<br />

• <strong>Replication</strong> <strong>Server</strong> will utilize multiple processors on the<br />

machine<br />

• Built on SMP Open <strong>Server</strong><br />

• Based on a threading model rather than an engine model<br />

• Uses OS Native threads in pre-emptive mode<br />

• <strong>Server</strong> spawns numerous cooperating threads that run<br />

concurrently<br />

• Number of CPUs used by the server can be controlled by<br />

binding the CPUs to the server using OS-specific<br />

mechanisms<br />

• e.g., psrset/pbind on Solaris<br />

• <strong>Server</strong> can be forced into a single processor mode using<br />

a switch<br />

• configure replication server set smp_enable to {on | off}


Performance Enhancements<br />

Commit Sequencing Enhancements<br />

Background<br />

• Parallel DSI threads in RS attempt to apply<br />

transactions in the queue to the replicate DB in parallel<br />

• Commit order is still maintained – only the “body” of the<br />

transactions are applied in parallel<br />

• <strong>Replication</strong> <strong>Server</strong> relies on a table in the replicate DB<br />

(rs_threads) to detect deadlocks and help sequence<br />

commits<br />

• Additional overhead on the replicate DB<br />

• Additional network roundtrips (between RS and replicate<br />

DB) for each transaction (group)<br />

• Limits the usability of Parallel DSI to ASE environments


Performance Enhancements<br />

Commit Sequencing Enhancements<br />

Internal Commit Sequencing<br />

• Deadlock detection for transactions distributed across<br />

Parallel DSI threads is now done internally in<br />

<strong>Replication</strong> <strong>Server</strong><br />

• Commit sequencing is now completely internal to RS<br />

• Eliminates a network roundtrip for each transaction –<br />

reduced I/O<br />

• Less overhead for each transaction (group) – faster<br />

commit processing<br />

• Removes the reliance on replicate DB<br />

• Eliminates a bottleneck (rs_threads) in the replicate DB<br />

• Allows non-ASE environments to take advantage of the<br />

Parallel DSI feature


Summary<br />

• The e-Business data management platform<br />

• <strong>Sybase</strong> fundamentals: open, flexible, secure,<br />

high-performance, high availability<br />

• New enhancements to support evolution to e-Business<br />

• e-Business Security<br />

• Protecting valuable information<br />

• High Availability<br />

• Ensures data is available when needed<br />

• Dynamic Performance<br />

• Ensuring your mission-critical information is available<br />

where needed

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!