How Load Balancing Works (Smart 3D Admin web API Only) - Intergraph Smart 3D Web API - Installation & Upgrade - Hexagon PPM

Intergraph Smart 3D and Smart 3D Admin Web API Installation and Configuration

Language
English
Product
Intergraph Smart 3D Web API
Subproduct
Smart 3D Web APIs
Search by Category
Installation & Upgrade
Smart 3D Version
13

The Smart 3D Admin web API workload is balanced by starting and stopping service instances on each machine. The total number of instances in your environment is determined by:

  1. How many dedicated instances are required for the environment.

  2. How many general instances are configured to run on each machine.

  3. The requirements for each request.

Let's take a closer look at how each criteria determines how many instances are running at a time.

How many dedicated instances are required for the environment

A separate service instance is dedicated to each site and each plant enabled for use with the Smart 3D Admin Web API.

Each dedicated instance handles specific requests, as follows.

Requests specific to...

Are handled by the dedicated instance for...

An enabled site

Site

An enabled plant

Plant

A catalog in an enabled plant

Plant

A plant that is not enabled, but is on an enabled site

Site

A catalog in a plant that is not enabled, but is on an enabled site

Site

Dedicated service instances are not configurable.

  • There is always only one dedicated service instance for each site and each plant.

  • Each dedicated instance runs continuously.

  • Dedicated instances can be run on different machines.

  • A machine is automatically selected to run each instance as needed for load balancing.

For example, let's say you:

  • Enable Site 1 and its Plants A and B

  • Enable Site 2 and its Plants C and D

  • Do not enable Plant E in Site 2

Although there can be requests specific to either of the two sites (S1, S2) or five plants (A to E), there will only ever be six dedicated instances running in the environment. Requests specific to Plant E will be handled by the dedicated instance for Site 2.

Having dedicated instances means that:

  • On one hand, little or no time is spent switching between sites or plants.

  • But on the other hand, these requests will remain in the queue until the dedicated instance can handle them. These requests will not be handled by any other instance, even if there is an idle instance.

SHARED Tip For more information on enabling a site or plant for use with the Smart 3D Admin Web API, see EnableSite, EnablePlant, and EnablePlants in the Smart 3D Admin Web API Programmer's Guide.

How many general instances are configured to run on each machine

General (non-dedicated) service instances help handle other requests. For each machine, you must configure the:

  • Minimum Instance Count - The number of general instances that will run continuously on the machine. You can set this number to zero or greater.

  • Maximum Instance Count - The number of general instances that can be run on the machine simultaneously, including the minimum instance count. You can set this number to:

    • Equal to the minimum instance count - No additional general instances are started on the machine.

    • Greater than the minimum instance count - Additional instances are started on the machine, up to the maximum instance count, when needed to process a request. Each additional instance is stopped when it finishes processing the request.

SHARED Tip You set the minimum and maximum instance counts using the Configuration Utility's Smart 3D Service(s) Details page or the Enable Machine Configuration section of the import file.

The requirements for each request

For requests that will be processed by a general instance, load balancing takes into account:

  • Request length - Each request is considered short-running or long-running.

    All actions available in the Smart 3D Web API are considered long-running requests.

  • Request processing - Most requests can run in a 64-bit process. But some requests, such as upgrading a site or plant, must run in a 32-bit process.

Whether the general instances on a machine can process a request with specific requirements is determined by the minimum and maximum instance counts you configure for the machine, as follows.

Minimum

Maximum

How many general instances are run and how each is used

0

0

No general instances will be run on this machine.

0

1 or More

Multiple general instances can run on the machine simultaneously, up to the maximum instance count. Each instance will:

  • Start when needed and stop when it completes the request.

  • Process any request (short- or long-running, 32- or 64-bit).

1

1

One general instance will run on the machine. It will:

  • Run continuously.

  • Process only short-running, 64-bit requests.

1

2 or More

Multiple general instances can run on the machine simultaneously, up to the maximum instance count.

  • One instance will:

    • Run continuously.

    • Process only short-running, 64-bit requests.

  • Each remaining instance will:

    • Start when needed and stop when it completes the request.

    • Process only long-running requests (32- or 64-bit) or short-running, 32-bit requests.

2 or More

Same as the Minimum

The specified number of general instances will run on the machine.

  • All instances will run continuously.

  • One instance will process only short-running, 64-bit requests.

  • Each remaining instance will process only long-running, 64-bit requests.

2 or More

More than the Minimum

Multiple general instances can run on the machine simultaneously, up to the maximum instance count.

  • One instance will:

    • Run continuously.

    • Process only short-running, 64-bit requests.

  • One or more instances, up to the minimum instance count, will:

    • Run continuously.

    • Process only long-running, 64-bit requests.

  • Each remaining instance will:

    • Start when needed and stop when it completes the request.

    • Process only long-running requests (32- or 64-bit) or short-running, 32-bit requests.

Putting it all together

So, how do you know how many service instances will be running on a machine? The answer is you cannot know that. Why? Because, at any given time, the exact number of instances a machine is running is determined by:

  • How many of the dedicated instances the machine is running.

  • Whether the machine can run any general instances.

  • If the machine can run general instances, what kinds of request each instance will process (long- or short-running, 32- or 64-bit process)

However, you can know the range of instances that can ever run simultaneously on a single machine.

Let's look at an example of how many instances will run on a machine based on your settings.

Criteria

Settings

Instances Running on This Machine

Dedicated instances

You have enabled:

  • Site 1

    • Plant A

    • Plant B

  • Site 2

    • Plant C

    • Plant D

0 to 6

Minimum instance count

2

2

Maximum instance count

4

0 to 4

This machine will always be running between two and ten instances because:

  • There can be up to six dedicated instances running on the machine continuously, as determined by load-balancing requirements.

  • There will always be two continuously-running general instances, as determined by the minimum instance count.

    • One will be used to process only short-running, 64-bit requests.

    • One will be used to process only long-running, 64-bit requests.

  • There can be up to two additional general instances running, as specified by the maximum instance count. Both will be started when needed, and will process only long-running requests (32- or 64-bit) or short-running, 32-bit requests.