Load Balancing

Web-service requests to the front end can be load balanced, using any standard reverse proxy. The example provided in Proxying CUE Zipline shows a proxy configuration for a single instance CUE Zipline installation.

For nginx, the only required change is to create an upstream definition for the CUE Zipline instances and then reference those back ends in the proxy_pass statement. For example:

upstream backends {
    server zipline01:12791;
    server zipline02:12791;
  }

  server {
    ...
    location ~ ^/cue-print-zipline/(index.xml|escenic/text|escenic/convert/default) {
      ...
      proxy_pass http://backends;
      ...
    }
  }

The upstream configuration should list the web service addresses for each instance in the CUE Zipline cluster. This address is the one configured in the server configuration object. The default is port 12791 on the server the instance is running on.

This default configuration will spread the load between your CUE Zipline instances using a round-robin algorithm. nginx does however, offer alternative load distribution algorithms.

The protocol scheme specified in the proxy_pass declaration must be http as shown above, since CUE Zipline only supports HTTP.