views:

24

answers:

3

My understanding of database cluster is less because I have not worked on them. I have the below question.

Database cluster has two instance db server 1 & server 2. Each instance will have a copy of databases, considering the database has say Table A.

Normally a query request will be done by only one of the servers which is randomly decided.

Question1: I would like to know given the access can we explicitly tell which server should process the querry?

Question2: Given the access, can a particular server say db server 2 be accessed from outside directly to query?

Either in Oracle or MySQL database.

/SR

A: 

There are many different ways to implement a cluster. Both MySQL and Oracle provide solutions out of the box - but very different ones. And there's always the option of implementing different clustering on top of the DBMS itself.

It's not possible to answer your question unless you can be specific about what cluster architecture and DBMS you are talking about.

C.

symcbean
A: 

In Oracle RAC (Real Application Clusters), the data-storage (ie the disks on which the data is stored) are shared, so it's not really true to say there is more than one copy of the data... there is only one copy of the data. The two servers just access the storage separately (albeit with some co-operation)

cagcowboy
A: 

From an Oracle perspective:

  1. cagcowboy is correct; in an Oracle RAC system, there is but one database (the set of files on disk), multiple database instances (executing programs) on different logical or physical servers access those same files.

  2. In Oracle, a query being executed in parallel can perform work using the resources of any member of the cluster.

  3. One can "logically" partition the cluster so that a particular application prefers to connect to Member 1 of the cluster instead of Member 2 through the use of service names. However, if you force an application to always connect to a particular member of the cluster, you have eliminated a primary justification to cluster - high availability. Similarly, if the application connects to a functionally random member of the cluster, different database sessions with read and/or write interest in the same Oracle rows can significantly degrade performance.

Adam Musch