Ably's Enterprise customers optionally have access to custom environments, dedicated clusters and the capability to restrict all traffic, data and storage to specific regions.

Note: We also support custom CNAME domains i.e. you can use your own domain name as opposed to a *.ably.io domain. Get in touch if you would like to set this up as the setup instructions differ from custom environments.

The following steps will get you set up:

1. Get your environment set up

Please speak with your customer success manager about configuring your custom environment.  A custom environments allows one or more of the following to be provided by the Ably platform

  • Proactive traffic routing for your customers
  • Dedicated clusters (isolated from noisy neighbours)
  • Regional routing of traffic (such as limiting all traffic to within the EU or US)
  • Regional storage of messages - history  (such as limiting all traffic to within the EU or US)

Your customer success manager will provide you with one or more of the following ClientOptions (constructor options) that must be used in all your Ably client library SDKs:

  • environment
  • fallbackHostsUseDefault (optional)
  • fallbackHosts (optional)

Once you have a custom environment, you can test this by visiting the following URLs (replace [ENVIRONMENT] with your supplied environment):

  • https://[ENVIRONMENT]-rest.ably.io/time
  • https://[ENVIRONMENT]-realtime.ably.io/time

At this point, if you do have regional constraints on your traffic or storage, this will not yet be enabled as traffic arriving in the wrong regions will be rejected by our servers.  Only once all clients are confirmed to be using the new environment will regional constraints be added.

2. Modify your clients

The ClientOptions provided to you by your customer success manager must be used in all of your client library SDKs. Here is an example of a Javascript client initialized with a custom environment and set of fallback hosts:

var ably = new Ably.Realtime({
  authUrl: '/get-token', /* your token callback code, authUrl, or key */
  environment: 'environment-example',
  useFallbackHosts: ['environment-example-fallback-a.ably.io', 'environment-example-fallback-b.ably.io', 'environment-example-fallback-c.ably.io']

Whilst this is a Javascript example, all client SDKs offer the same options and should be identical apart from the language syntax and style.

You can see this in a browser at https://jsbin.ably.io/etadus/2/edit.

3. Test

We recommend you test all client SDKs can connect, publish and receive messages (where applicable) before rolling these changes out.  Additionally, where possible, please inspect your client SDK traffic to ensure it is embedding the environment setting in the endpoint i.e. instead of connections to realtime.ably.io you should see [ENVIRONMENT]-realtime.ably.io.

4. Confirm once rolled out

Once all your client library SDKs are using the new environment and on traffic is arriving at our default endpoints, then Ably now is able to actively reroute your traffic to one more of our our realtime clusters.

If you have regional constraints on your account, then please contact your customer success manager who can now enable these constraints.