# Server workload distribution

LightAct uses dynamic workload distribution where most objects and asset have a property called Run on. This property determines on which server this object, be it a Viewport object, a Layer, a Device or an Asset, is running on. This property gets set depending on how outputs are mapped.

How does this work? It all starts in the OutputMaps

1. When you assign a Virtual output to a Physical output of one of the servers in a LightNet cluster, LightAct checks which Viewport objects (such as Video screen etc.) are mapped to this Virtual output. Then it assigns those Viewport objects to the same server(s).
2. Then it checks which Layers are rendering to those Viewport objects and assigns them to the same servers.
3. Then it checks which Assets are used in those layers and assigns them to those servers as well.

That's how all the objects and assets (except for Devices) have their Run on property set based on the setup in the Output Maps window.

## Run on setting

<div align="left"><figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2FytXUBQruJRsJEpYFQp0H%2Fimage.png?alt=media&#x26;token=1204f98f-883c-47b0-9a8f-44bf6192619e" alt=""><figcaption></figcaption></figure></div>

Run on setting can be found in a lot of places around the software. In most cases it is set to Automatic.

{% hint style="info" %}
**Good to know**: if Run on setting is set to Automatic, it is determined based on the logic above. However, you can always switch to Manual, if you want.
{% endhint %}

### Run on for Viewport objects and Canvases

<div align="left"><figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Ftwuu0GUxKDF6dMs6IzjJ%2Fimage.png?alt=media&#x26;token=75879f5d-3592-471c-81e6-55e0d9eb644a" alt=""><figcaption></figcaption></figure></div>

To see where each object is running, open its **Preferences** and find **Run on** section. You'll be able to see the machines it is running on.

<figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2FKcxWbWpHiQRLofF8ZATm%2Fimage.png?alt=media&#x26;token=642c9144-fb36-4455-b086-7b02f0843626" alt=""><figcaption></figcaption></figure>

If an object is not running on the machine you are currently on, you will see that its texture is downscaled and that the object has a WiFi icon on it.

{% hint style="info" %}
**Good to know**: the amount of downscaling is determined with **Preview downsampling** setting in the **Project settings** in the **General** tab.
{% endhint %}

### Run on for Layers

Every layer runs on every server, however the main implication of Run on setting is how a layer is playing back video files or Notch blocks. Here's how it works:

1. **Primary and editor servers:**
   1. play original video files and render non-downscaled Notch blocks if the layer is assigned to them
   2. play the lowest (most downscaled) proxy video file and downscaled Notch block if the layer is not assigned to them
2. **Secondary servers:**
   1. play original files if the layer is assigned to them
   2. don't play anything if the layer is not assigned to them.

{% hint style="info" %}
**Good to know**: The amount of Notch block downscaling is also determined by the *Preview downsampling* setting (see above). If you want this setting to apply to the Notch blocks, make sure that **Apply to Notch blocks** is checked.
{% endhint %}

### Run on for Assets

<div align="left"><figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fw87EatMdoTFAkyLTtqwe%2Fimage.png?alt=media&#x26;token=24a6531f-cd25-4402-9bfd-bef7165c88bd" alt=""><figcaption></figcaption></figure> <figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2FVDW5XiAWUAEBa6n0km7f%2Fimage.png?alt=media&#x26;token=9583ada4-86b7-4f49-a5ec-5afe7f0df989" alt=""><figcaption></figcaption></figure></div>

For Assets, Run on setting is visible both in the Assets window as well as in Properties window.

### Run on for Devices

<div align="left"><figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2FWLH02N2D5fMNnJa7AuwS%2Fimage.png?alt=media&#x26;token=eb6a7df9-3a22-4df3-9113-623ccaffc49d" alt=""><figcaption></figcaption></figure></div>

Run on for Devices is visible in the Properties of the Device node where you have to manually determine on which machine this device should be running.

### LightNet Workload window

<div align="left"><figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2FIuv9k4ZRwmDdWSyWPLvE%2Fimage.png?alt=media&#x26;token=9573dc01-7aa6-4eae-8e2c-747b98f6b7ba" alt=""><figcaption></figcaption></figure></div>

To see the Run on setting for all the objects you may want to open the **LightNet Workload** window.
