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

Ask Your Question

How to make deterministic deployment more robust?


we are using deterministic deployment as described in https://docs.gigaspaces.com/xap120adm.... We use a primary-backup deployment with 1 partition. Primary and Backup instances are running on hosts which are in different locations, and we prefer the Primary instance to run in one particular location to be co-located with the primary DB instance in a normal case, if all hosts are available (this is the reason for using deterministic deployment).

The deterministic deployment works as expected in approximately 80% - 85% of all cases, but it fails in 15% - 20% of cases, even though all hosts are available. It looks like the wrong case (when Primary and Backup are chosen not as preferred, but the other way around) is like this:

  • Both GSCs are instantiated
  • GSC which is the preferred location for Primary instance starts to download PU jar file from GSM
  • 10 seconds later the GSC which is the preferred location for Backup instance starts to download PU jar file from GSM
  • In approx. 15% - 20% of all cases the second GSC downloads the jar file from GSM 1-2 seconds faster than the first GSC. In such case the second GSC is chosen as the Primary instance, contrary to the configured deterministic deployment.

It looks like the deterministic deployment relies on a timing: the GSM which is a preferred backup starts to download the PU jar file 10 seconds later in a hope that it will finish downloading later and thus be selected as a Backup instance. If this is not the case, it is selected as the Primary instance.

I believe we could significantly improve deterministic deployment (well, make it more deterministic) if we may slightly increase the delay of the second GSC instance. In most cases when the deterministic deployment fails, the first GSC was just 1-2 seconds slower than the second GSC, so if we would delay the second GSC by 20 seconds instead of 10 seconds, this will help.

Is there a configuration property which determines for how long the second GSC is delayed?

asked 2017-05-18 05:45:35 -0500

Alexey Serdyuk gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

Hi, The property you are looking for is: com.gs.grid.gsm.provision.maxBackupDelay Set it as follows in the GSM JVM using the EXT_JAVA_OPTIONS environment variable: -Dcom.gs.grid.gsm.provision.maxBackupDelay=20s

By default it is configured to 10s

-I will update the docs accordingly. Thank you.

answered 2017-05-23 01:01:34 -0500

edit flag offensive delete link more


Thank you, Meron! This is a perfect answer I had hoped for :)

Alexey Serdyuk gravatar imageAlexey Serdyuk ( 2017-05-23 01:44:06 -0500 )edit

Hi, You can start only 1/2 amount of gscs , see that the primaries are deployed and start the other 1/2. Starting 12.1 we added rest api to make admin easy see: https://docs.gigaspaces.com/xap121adm... we plan to further improve deployment robustness and possibilities in our next 12.2 version.

Regards. Ester.

answered 2017-05-21 04:01:42 -0500

Ester gravatar image
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


Asked: 2017-05-18 05:45:35 -0500

Seen: 1,734 times

Last updated: May 23 '17