# Modes, Roles, and States

The mode of an EMS server is determined by its configuration, and dictates how it operates in its environment. If a fault tolerant mode is selected, two EMS servers are required and each operates in a defined role. How an EMS server is operating at any given moment can be determined by viewing its fault tolerant state.

For example, an EMS server operating in fault tolerant mode can play either a primary or secondary role. Once both EMS servers in the fault tolerant pair have been started, one of the two servers will be in the active state while its peer will be in the standby state. In the event of a failover, the server that was standby becomes active.

## Modes

By default, the EMS server operates in standalone mode. However, it can also be configured to run in a fault tolerant mode:

- Standalone — the default EMS server mode.
- Classic Fault Tolerant — configured through the `ft_active` parameter.

## Roles

Each server operating in a fault tolerant mode has a distinct role: primary or secondary.

These roles are implicit for EMS servers started using tibemsd.conf files. They are explicit for EMS servers started using a JSON configuration file. For JSON-configured servers, the primary server is the EMS server started without the `-secondary` command line parameter, while the secondary server is started with it. In the `.conf` files, each server in the fault tolerant pair has a distinct `tibemsd.conf` file.

## States

The state of the EMS server tells you about its current operations.

Use the `info` or `show state` command in the administration tool to determine the state of the EMS server.

State | Description
--- | ---
`active` | The server is fully operational and ready to service clients.
`standby` | The server is in classic fault tolerant mode and is ready to take over should its peer fail.

Copyright © Cloud Software Group, Inc. All rights reserved.