Hi Emmanuel,

Thanks very much for your detailed reply.

The problem is we have two controllers, and the configuration is:

controller [EMAIL PROTECTED] has its own postgresql backend  and the url is
"jdbc:postgresql://192.168.5.1:5432/test"
controller [EMAIL PROTECTED] has its own postgresql backend  and the url is
"jdbc:postgresql://192.168.5.1:5432/test"

As you've pointed out that if I shutdown the backend posgresql @192.168.5.1,
the requests are still being forwarded to controller [EMAIL PROTECTED],
unless I shutdown controleer [EMAIL PROTECTED], am I right?  If that's the
case, I believe that's problem,  initially I thought all the requrests will
be forwarded to controller two automatically once I disable controller one's
backend.

i.e., I have to dupliate the test [EMAIL PROTECTED] and rename it in
odered to be connected to controller one as well?


PS: here are the configuration files I used.

------------ Controller.xml -----------

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SEQUOIA-CONTROLLER PUBLIC "-//Continuent//DTD SEQUOIA-CONTROLLER
2.10.10//EN"  "
http://sequoia.continuent.org/dtds/sequoia-controller-2.10.10.dtd";>
<SEQUOIA-CONTROLLER>
    <Controller ipAddress="192.168.5.2" port="25322">
        <JmxSettings>
            <RmiJmxAdaptor port="1090"/>
        </JmxSettings>

        <VirtualDatabase configFile="postgresl-cluster.xml"
virtualDatabaseName="test" autoEnableBackends="true"/>
    </Controller>
</SEQUOIA-CONTROLLER>

-------------------   postgresl-cluster.xml -----------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE SEQUOIA PUBLIC "-//Continuent//DTD SEQUOIA 2.10.10//EN" "
http://sequoia.continuent.org/dtds/sequoia-2.10.10.dtd";>

<SEQUOIA>

  <VirtualDatabase name="test">

   <Distribution hederaPropertiesFile="/hedera_appia.properties">
        <MessageTimeouts/>
   </Distribution>

  <Backup>
        <Backuper backuperName="postgres"
className="org.continuent.sequoia.controller.backup.backupers.PostgreSQLSplitPlainTextBackuper"
         options="dumpServer=192.168.5.1,encoding=UTF8,splitSize=500m"/>
  </Backup>

  <AuthenticationManager>
      <Admin>
        <User username="admin" password=""/>
      </Admin>
      <VirtualUsers>
        <VirtualLogin vLogin=" " vPassword=" "/>
      </VirtualUsers>
    </AuthenticationManager>

   <DatabaseBackend name="postgresql-prod0-test"
driver="org.postgresql.Driver" url="jdbc:postgresql://
192.168.5.1:5432/jmangotest" connectionTestStatement="select now()">
          <DatabaseSchema dynamicPrecision="table"/>
      <ConnectionManager vLogin=" " rLogin=" " rPassword=" ">
        <VariablePoolConnectionManager initPoolSize="20" minPoolSize="5"
maxPoolSize="0" idleTimeout="180" waitTimeout="0"/>
      </ConnectionManager>
    </DatabaseBackend>

   <RequestManager>
     <RequestScheduler>
          <RAIDb-1Scheduler level="passThrough"/>
     </RequestScheduler>


      <RequestCache>
         <MetadataCache/>
         <ParsingCache/>
         <ResultCache granularity="table" />
      </RequestCache>

      <LoadBalancer>
          <RAIDb-1>
            <WaitForCompletion policy="first"/>
            <RAIDb-1-LeastPendingRequestsFirst/>
          </RAIDb-1>
      </LoadBalancer>

      <RecoveryLog driver="org.postgresql.Driver" url="jdbc:postgresql://
192.168.5.1:5432/recovery" login=" " password=" ">
        <RecoveryLogTable/>
        <CheckpointTable/>
        <BackendTable/>
        <DumpTable/>
      </RecoveryLog>

    </RequestManager>

  </VirtualDatabase>

</SEQUOIA>


On Sat, Oct 11, 2008 at 12:24 AM, Emmanuel Cecchet <[EMAIL PROTECTED]>wrote:

> Hi Bin,
>
>> I've configuration two distributed sequoia controllers, each connecting to
>> a postgresql backend.
>>
>> The actual Sequoia URL is defined as:
>>
>> jdbc:sequoia://192.168.5.1 <http://192.168.5.1>,
>> 192.168.5.2/test?preferredController=roundRobin <
>> http://192.168.5.2/test?preferredController=roundRobin>
>>
>> when i shutdown any of the controller or any virtualdatabase, the failover
>> work fine and Sequoia has no problem of detecting either case of failures.
>> However, when i shutdown the backend postgresql, the failover doesn't work,
>> just wondering is there any parameter that I can tune for the failover
>> timeout or is there anything i can do?
>>
> If you shutdown the virtual database then the failover should happen. If
> you simply disable the backend, the controller is still active and will
> forward the requests to the other controller. Note that a controller without
> backend still logs all write requests to its recovery log to be able to
> recover/restart its backends at any time. If you want to force a failover,
> you will have to shutdown the virtual database and not just disable the
> backend.
>
> Thanks for your interest in Sequoia,
> Emmanuel
>
> --
> Emmanuel Cecchet
> FTO @ Frog Thinker Open Source Development & Consulting
> --
> Web: http://www.frogthinker.org
> email: [EMAIL PROTECTED]
> Skype: emmanuel_cecchet
>
> _______________________________________________
> Sequoia mailing list
> [email protected]
> https://forge.continuent.org/mailman/listinfo/sequoia
>
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to