Skip to content

Clustering

Clustering the Onegini Token Server is very easy. You only need to run multiple instances of the token-server-engine Docker container. The database and Redis contain all state that is used by the engine container. The engine container itself is stateless.

See the Redis chapter for details on Redis configuration.

Deploying multiple instances of the Engine simply means duplicating the Compose service that describes the engine container.

The Compose excerpt below gives a very basic idea of deploying two instances of the engine container. For a full example of an engine Compose configuration see the Installation instructions.

  engine1:
    image: release.onewelcome.com/onegini/token-server-engine:<TOKEN_SERVER_VERSION>
    restart: always
    user: onegini
    environment:
      ...

  engine2:
    image: release.onewelcome.com/onegini/token-server-engine:<TOKEN_SERVER_VERSION>
    restart: always
    user: onegini
    environment:
      ...