Salesforce

Loading Workers or Engines Dynamically (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Loading Workers or Engines Dynamically (Magic xpa 4.x)

The Space middleware can automatically load a new Magic xpa server when receiving a request and there are no available servers to serve that request.

If a request is not served within a certain timeout (by default 10 seconds: -Dcom.magicsoftware.xpa.LoadOnDemandTimeout=10), an additional Magic xpa server will be started. This Magic xpa server will be started on one of the servers defined in the projectsStartup.xml if the server was defined with AdditionalOnDemand > 0 and the number of Magic xpa servers currently running on this server did not exceed the sum of NumberOfInstances+AdditionalOnDemand.

Currently the server creates 'NumberOfWorkers' on startup. The new behavior is: <NumberOfWorkers AdditionalOnDemand="N2">N1</NumberOfWorkers> Since version: 3.3e and 4.6 (not available in any version between 4.0 and 4.5a, including both)

Stopping Projects with On Demand Servers

When stopping a project (GigaSpaces-xpa\bin\ShutdownProjects.bat) or stopping a specific server, the servers that were already started will be stopped. However, servers waiting to be started on demand will still be started if requests are inserted into the space before restarting the project (GigaSpaces-xpa\bin\StartProjects.bat).

When restarting a project, the number of Magic xpa servers waiting to be started on demand will be deducted from the number of instances that will be made ready to be started on demand.

For example:

  1. Project GSTest started with 1 instance + 2 allowed on demand.

  2. Project GSTest stopped.

  3. A request is inserted for GSTest ==> 1 server will be started (out of the 2 instances allowed on demand).

  4. Project GSTest started (again with 1 instance + 2 allowed on demand) ==> 1 instance will be started immediately, and only 1 instance will be added to be started on demand (since 1 remained to be started on demand).

Since version: 3.1

Reference
Attachment 
Attachment