Showing posts with label Oracle RAC. Show all posts
Showing posts with label Oracle RAC. Show all posts

Sunday, October 4, 2009

Not able to afford Oracle RAC - Scale out low end / cost DB with Open Source Technology Stack - Tungsten

Open-source middleware maker released a database scale-out stack called Tungsten, which support open-source databases like MySQL as well as proprietary ones from the likes of Oracle.

The stack's capabilities include a failure protection function that keeps extra database replicas in the event the master fails, and can automatically promote a slave to master status when needed. It also enables users to maintain and replicate database copies at a number of locations to aid disaster recovery.

Scale-out works by spreading data across multiple, independent database servers connected through a network. The model offers an incremental approach to solving the following database problems:

* Preventing data loss though up-to-date replica databases and coordinated backups
* Increasing overall application availability by providing rapid database failover
* Raising performance and through-put by dispatching read traffic to replicas
* Integrating data between heterogenous systems, for example to support scaling of commercial databases using low-cost open source databases.

Scale-out implementation involves a number of complexities, including creating and maintaining replicas, managing resources spread across many hosts, and working around important problems such as maintaining data consistency when databases are spread over multiple hosts.

Tungsten offers a set of components that address these problems in a systematic way.

Tungsten Replicator
Implements database-neutral, master/slave replication.

Tungsten Manager
Group-communication based framework for managing cluster resources.

Tungsten Connector
A proxy for MySQL and PostgreSQL client programs. The Connector serves as a "front door" to clustering logic implemented in JDBC drivers.

Tungsten SQL-Router
A JDBC wrapper that adds high-performance and transparent failover, load-balancing, and partitioning to native JDBC drivers.

Tungsten Monitor
A pluggable monitoring service that checks and broadcasts state of individual resources in the cluster.


Tungsten claimed it isn't trying to supplant high-end Oracle Real Application Clusters (RAC), but instead hopes to provide a potential incremental scale-out offering for customers using low-end databases and hardware that either can't afford or don't want to buy into the whole Oracle RAC architecture.

However, it did provide an alternative low end / cost open source RAC solution for potential Oracle RAC customer and attract some eyeballs over.

Some reflection is What if oracle or its well known competitor come out & buy over similar technology to bridge & guide the smooth transition from low end to high end. Who will be the winner in this arena?

Further readings:

What Is Tungsten

The Scale-Out Blog

Wednesday, October 31, 2007

Oracle TAF & FCF

Transparent Application Failover (TAF)

Transparent Application Failover (TAF) is a feature of the Java Database Connectivity (JDBC) Oracle Call Interface (OCI) driver. It enables the application to automatically reconnect to a database, if the database instance to which the connection is made fails. In this case, the active transactions roll back.

Transparent Application Failover (TAF) is a client-side feature that allows for clients to reconnect to surviving databases in the event of a failure of a database instance. Notifications are used by the server to trigger TAF callbacks on the client-side.

TAF is configured using either client-side specified TNS connect string or using server-side service attributes. However, if both methods are used to configure TAF, the server-side service attributes will supersede the client-side settings. The server-side service attributes are the preferred way to set up TAF.

TAF can operate in one of two modes, Session Failover and Select Failover. Session Failover will recreate lost connections and sessions. Select Failover will replay queries that were in progress.

Transparent Application Failover
Configuring Transparent Application Failover

Fast Connection Failover (FCF)

Fast Connection Failover offers a driver-independent way for your Java Database Connectivity (JDBC) application to take advantage of the connection failover facilities offered by Oracle Database 10g. The Fast Connection Failover mechanism depends on the implicit connection cache feature. As a result, for Fast Connection Failover to be available, implicit connection caching must be enabled.

FCF vs TAF

TAF is always active and does not have to be set, it does not work with the OCI Connection Pool.
Oracle recommends not to use TAF and Fast Connection Failover in the same application

Monday, October 22, 2007

Using Oracle RAC in OAS, Weblogic and Websphere

Oracle Application Server 10g R2 (OAS)

To enable the Fast Connection Failover mechanism, properties of "connectionCachingEnabled" and "fastConnectionFailoverEnabled" must be set to true on the (connection-factory) tag for an OracleDataSource object. the JDBC URL String must be set using the service name syntax. The service name specified on the connection URL is used to map the connection cache to the service.

Valid URL Usage

url="jdbc:oracle:oci:@TNS_ALIAS"

url="jdbc:oracle:oci:@(DESCRIPTION=
(LOAD_BALANCE=on)
(ADDRESS=(PROTOCOL=TCP)(HOST=host1) (PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=service_name)))"

url="jdbc:oracle:oci:@(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=cluster_alias) (PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=service_name)))"

url = "jdbc:oracle:thin@//host:port/service_name"

url = "jdbc:oracle:thin@//cluster-alias:port/service_name"

url="jdbc:oracle:thin:@(DESCRIPTION=
(LOAD_BALANCE=on)
(ADDRESS=(PROTOCOL=TCP)(HOST=host1) (PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=service_name)))"

url = "jdbc:oracle:thin:@(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=cluster_alias) (PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=service_name)))"


If a SID is specified on the URL, when Fast Connection Failover is enabled, then an exception is thrown.

For more inforamtion, find them from links below:

http://download.oracle.com/docs/cd/B31017_01/web.1013/b28958/datasrc.htm#CHDEHFHE
http://download.oracle.com/docs/cd/B31017_01/core.1013/b28939/j2ee.htm#ASTED006
http://download.oracle.com/docs/cd/B31017_01/core.1013/b28939/security.htm#CDDGFADE


Weblogic

For how to use Oracle RAC DB with Weblogic application server, find the detail information from links below:

http://edocs.bea.com/wls/docs81/jdbc/oracle_rac.html
http://edocs.bea.com/platform/docs81/db_mgmt/oracle_rac.html

Websphere

For how to use Oracle RAC DB with Websphere application server, find the detail information from links below:

http://www.ibm.com/developerworks/websphere/techjournal/0710_barghouthi/0710_barghouthi.html
http://www.ibm.com/developerworks/websphere/techjournal/0706_banerjee/0706_banerjee.html

´