Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Deterministic deployment once more

We are using deterministic deployment as described in "XAP Administrators Guide", but it does not work exactly as we would like. We would like to have the following run-time behaviour:

(1) When the system starts and space is successfully started on both hosts A and B, than the Primary instance must be allocated on host A, and Backup on host B. (2) If the space instance on host A fails, the backup instance on host B must take over as a new Primary. (3) When the space instance on host A recovers, it should become a Backup. We do not want to relocate Primary back from B to A when A is started after the failure.

Currnently it looks like the requirement (3) is not satisfied. Whenever the primary instance on A fails, the following happens:

  • The Backup instance on B takes over as a new Primary.
  • GSA restarts the space instance on host A.
  • GSC on host A complains that host B is a Primary now:

2017-08-21 10:34:13,498 fortune-core.1 [1] WARNING [org.openspaces.pu.sla.PrimaryZoneController] - Primary instance of PU fortune-core.1 [2] located on machine [forcoi09:10.143.29.251] is not running on primary zone [Core_A]. It will be restarted.

  • GSC on host B is restarted.
  • Space instance on host A takes over as a Primary, GSC on host B becomes a Backup again.

As a result, each time when space instance on the host A fails, we have one unnecessary switch between Primary and Backup (the switch back from B to A). Is there a way to prevent this second switch, but keep the rule "use A as a Primary, if possible, during startup"?

asked 2017-08-21 03:47:46 -0600

Alexey Serdyuk gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

Alexey, org.openspaces.pu.sla.PrimaryZoneController works as you specified. If you wish for a different behavior, you will need to write your own controller and reference it instead in the pu.xml

<bean id="primaryZoneController" class="org.openspaces.pu.sla.PrimaryZoneController" >

Another option (without the need for PrimaryZoneController) is to first load all GSCs on host A and set max-instances-per-machine to 1. Then when all primaries are loaded on host A, load GSCs on host B. You can also look at the max-instances-per-zone property.

Hope this helps, Meron

answered 2017-08-21 06:47:30 -0600

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-08-21 03:47:46 -0600

Seen: 77 times

Last updated: Aug 21