MicroStrategy ONE

Load Balancer and Clustering Considerations for Library and Collaboration Server

When deploying MicroStrategy Library in a load balanced environment, there are several important points to consider:

  1. The MicroStrategy Collaboration Service can be clustered both horizontally and vertically. See Cluster the MicroStrategy Collaboration Server for instructions.

    The service can be deployed behind a load balancer, but it relies on a Redis server instance to ensure proper message distribution across all of the various instances. The load balancer must utilize "sticky sessions" to ensure that clients are directed to the instance that established the initial session. The load balancer should also support the Web Socket protocol (wss:), which relies on the HTTP 1.1 Upgrade protocol.

    SeeDeployment Topology for more information about the Redis configuration.

  2. The MicroStrategy Web and Library server applications can be clustered behind a load balancer with any number of instances. However, the load balancer must utilize "sticky sessions" to ensure that clients are directed to the instance which established the initial session.
  3. When deploying a cluster of MicroStrategy Library servers, the Collaboration servers should be configured to point to the Web load balancer, rather than a specific instance, to fully utilize the cluster.
  4. To fully utilize a cluster of MicroStrategy Collaboration servers, the MicroStrategy Library server should be configured to point to the Web load balancer, rather than a specific instance.
  5. Since both web browsers and mobile apps will connect to it directly, the MicroStrategy Collaboration server port (default :3000) must be accessible and open through the load balancer.

    The Collaboration server port can be changed from the default value by specifying it in the config.json file.

  6. Since both web browsers and mobile apps will connect to it directly, the MicroStrategy Library server (default :8443) must be accessible and open through the load balancer.

Deployment Topology

In the diagram, there is a single load balancer with an external facing DNS name, loadbalancer.acme.com which is used for both Library server and Collaboration server configuration:

  • The Library server configOverrides.properties file uses this name in the services.collaboration.baseURL property, as in: https://loadbalancer.acme.com:3000.
  • The Collaboration server config.json file uses this name in the authorizationServerUrl property, as in: https://loadbalancer.acme.com:8443/MicroStrategyLibrary/api.

In this configuration, the Collaboration server specifies horizontal scaling by setting two properties in the config.json file:

  • "scaling": "horizontal"
  • "redisServerUrl": "redis://sharedmachine.acme.com:6379"

In the diagram, there is a shared machine used by each of the instances behind the load balancer. On this machine, there are two essential services:

  • PostgreSQL Server - version 4.0.0 or higher.
  • Redis Server - version 4.0.0 or higher.

In this environment, both shared services - PostgreSQL Server and Redis Server - may themselves by replicated. In this case, you must specify the correct URL in the config.json file properties:

  • "dburl": "<PostgreSQL URL>"
  • "redisServerUrl" : "<Redis URL>"

Using the Collaboration Server Outside of a Load Balanced Environment

The Collaboration server can be run outside of a load balanced environment, on a single machine. To configure the Collaboration server to run without any form of scaling, set "scaling": "none".

The Collaboration server can also run multiple processes on the same machine with vertical scaling by setting the following config.json fields:

  • "scaling": "vertical"
  • "cpus": "<number of worker processes to launch>"