Just a second...

Connecting through a load balancer

Connections between Diffusion™ clients and Diffusion servers can be routed through a load balancer. Some clients can pass additional information to a load balancer in the request path of their URL.

Supported in: JavaScript®, Android™, and Java™ APIs

An additional request path can be specified to define the connection URL context. This request path can only be specified when connecting with individual parameters and not with the URL-style string.

JavaScript
diffusion.connect({
    host : 'host_name',
    port : 'port', 
    transports : 'transport', 
    secure : false,
    path: '/path/diffusion'
}).then(function(session) { ... } );
Java and Android
final Session session = Diffusion
        .sessions()
        .serverHost("host_name")
        .serverPort(port)
        .transports(transport)
        .secureTransport(false) 
        .requestPath("/path/diffusion");
        .open();

The value of the request path must begin with / and end with /diffusion. The default value is /diffusion.

Load balancer configuration

Connections between Diffusion clients and Diffusion servers have specific requirements. If your load balancer handles Diffusion connections incorrectly, for example by routing subsequent client requests to different backend Diffusion servers, this can cause problems for your solution.

For more information about how to configure your load balancers to work with Diffusion, see Load balancers.