<commit_before>title: Controller Configuration
toc: [Documentation, Administration, Processes, Controller Configuration]

# Controller Configuration

When a Crossbar.io node starts, initially only a single process is started: the **node controller**.

The node controller is the master process of everything. At each time, there is exactly one node controller process running. When the node controller process has ended, the Crossbar.io node is down.

The node controller can be configured using the `controller` item in the node's configuration:

```json
{
   "controller": {
      "id": "mynode1",
      "options": {
         "title": "mycontroller"
      }
   }
}
```

The available parameters in the `controller` dictionary are:

option | description
---|---
**`id`** | The ID of the node (default: **hostname** of machine)
**`options`** | Controller process options - see below (default: **`{}`**).
**`manager`** | Uplink Crossbar.io management application (**upcoming**).
**`manhole`** | [Manhole](Manhole) into the controller.

The available `options` are:

option | description
---|---
**`title`** | The controller process title (default: **`"crossbar-controller"`**)

---<commit_msg>add documentation for 'shutdown' option<commit_after>title: Controller Configuration
toc: [Documentation, Administration, Processes, Controller Configuration]

# Controller Configuration

When a Crossbar.io node starts, initially only a single process is started: the **node controller**.

The node controller is the master process of everything. At each time, there is exactly one node controller process running. When the node controller process has ended, the Crossbar.io node is down.

The node controller can be configured using the `controller` item in the node's configuration:

```json
{
   "controller": {
      "id": "mynode1",
      "options": {
         "title": "mycontroller"
      }
   }
}
```

The available parameters in the `controller` dictionary are:

option         | description
---------------|--------------
**`id`**       | The ID of the node (default: **hostname** of machine)
**`options`**  | Controller process options - see below (default: **`{}`**).
**`manager`**  | Uplink Crossbar.io management application (**upcoming**).
**`manhole`**  | [Manhole](Manhole) into the controller.

The available `options` are:

option         | description
---------------|--------------
**`title`**    | The controller process title (default: **`"crossbar-controller"`**)
**`shutdown`** | Controls how and when crossbar shuts down. Permitted values are: `shutdown_on_shutdown_requested` (default for "managed" mode), `shutdown_on_worker_exit` (default), `shutdown_on_worker_exit_with_error`, `shutdown_on_last_worker_exit`.

---
{'fraction_non_alphanumeric': 0.14656432748538012, 'fraction_numerical': 0.0007309941520467836, 'mean_word_length': 4.068518518518519, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5998496', 'n_tokens_mistral': 734, 'n_tokens_neox': 718, 'n_words': 284}