[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Active - Passive server crash use case  XML
Forum Index -> Terracotta Platform
Author Message
Anonymous



Hi:

I have a HA server configuration. What will happen in the case where say the machine in which the passive server is running crashes and cannot be restarted. My questions are :

1. Can I move the Passive server to a new machine. If so can the new Active - Passive IP configuration be updated dynamically in the configuration.

2. What is the impact on the client in this case. Am I forced to restart them to pick this new Passive server, since it does not know about it.

3. In a production setup where I have 20 JVMs connected to a terracotta server, the last thing I want to do is having to restart all the 20 JVMs. Is there any crash use case in which I will be forced to do this.

4. Can I configure only 1 Passive server or can it be > 1.

Thanks

Sriram C
kbhasin

consul

Joined: 12/04/2006 13:08:21
Messages: 340
Offline

Hello Sriram,


1. Can I move the Passive server to a new machine. If so can the new Active - Passive IP configuration be updated dynamically in the configuration.
 


You do not specifically assign active or passive servers. You just provide a list of server ips/hostnames and the first one that acquires the disk lock becomes the active (usually the server that is started first).

To avoid the situation you are describing, avoid using physical machine names/nic/ips but use configurable aliases (hostnames) instead.

You can provde multiple server definitions in the configuration like this:

Code:
 <servers>
     <server name="host1">
       <data>/usr/local/tc/data</data>
       <logs>/usr/local/tc/logs</logs>
       <dso-port>8510</dso-port>
 
       <dso>
         <persistence>
           <mode>permanent-store</mode>
         </persistence>
 
         <garbage-collection>
           <enabled>true</enabled>
           <verbose>true</verbose>
           <interval>3600</interval>
         </garbage-collection>
       </dso>
     </server>
 
     <server name="host2">
       <data>/usr/local/tc/data</data>
       <logs>/usr/local/tc/logs</logs>
       <dso-port>8510</dso-port>
 
       <dso>
         <persistence>
           <mode>permanent-store</mode>
         </persistence>
 
         <garbage-collection>
           <enabled>true</enabled>
           <verbose>true</verbose>
           <interval>3600</interval>
         </garbage-collection>
       </dso>
     </server>
 </servers>
 



2. What is the impact on the client in this case. Am I forced to restart them to pick this new Passive server, since it does not know about it.
 


No, you do not need to restart the clients. The clients automatically connect to whichever server is available, whenever it becomes available.

Just make sure that you provide the appropriate hostnames in the list of servers to each client on startup (you might want to provide an "extra" hostname to cover the scenario you mention above - even if you are not going to run a Terracotta server on this "extra" host unless such a situation arises).


3. In a production setup where I have 20 JVMs connected to a terracotta server, the last thing I want to do is having to restart all the 20 JVMs. Is there any crash use case in which I will be forced to do this.
 


I cannot think of any such scenario where you would have to restart all the client machines.


Regards,
Kunal Bhasin.

Regards,

Kunal Bhasin,
Terracotta, Inc.

Be a part of the Terracotta community: Join now!
psebby

master

Joined: 01/16/2007 13:09:26
Messages: 56
Offline

I thought I read a while ago that there could only be a single passive TC server, but I may be mistaken.

Is it ok to list 3 or 4 servers in the configuration and just one at a time will be active?

Paul
steve

ophanim

Joined: 05/24/2006 14:22:53
Messages: 619
Offline

Yep, it's perfectly ok. We've tested with up to 4 passives I believe but even that is not a hard limit.

Want to post to this forum? Join the Terracotta Community
vijay

journeyman

Joined: 03/02/2007 06:07:24
Messages: 22
Offline

Hi all,

We have a situation where we need to use the active-passive TC servers for failovers.
Can anyone guide me throgh the procedure to configure active-passive TC servers?
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

  • Install the same version of TC on multiple server machines, each sharing a common filesystem. [Or have them use a shared installation on the shared filesystem.]
  • Configure the data directory for each server such that they are all using the same shared directory.
  • Start each server using a common configuration file, listing each of the servers in the server element.

    The first server to come up will be the active or primary. The others will block on a file lock and be passives or secondaries.

    Run the AdminConsole and connect to the primary, you will see the list of servers and their status.

    Run your clients with -Dtc.config=<server1>:<dso-port>,<server2>:<dso-port>,<server3>:<dso-port>

  • Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
     
    Forum Index -> Terracotta Platform
    Go to:   
    Powered by JForum 2.1.7 © JForum Team