Skip to content

replace host options with endpoint client option - #462

Merged
ttypic merged 1 commit into
integration/v2from
integration/add-endpoint
Oct 13, 2026
Merged

ttypic merged 1 commit into
integration/v2from
integration/add-endpoint

Conversation

@ttypic

@ttypic ttypic commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Version 2 adopts the endpoint routing model from the spec (REC1/REC2),
so clients connect to *.realtime.ably.net, with fallbacks on
*.fallback.ably-realtime.com, instead of the rest/realtime.ably.io
domains.

  • Add the :endpoint option (default 'main'). It accepts a routing
    policy name ('acme'), a non-production policy ('nonprod:sandbox') or
    a hostname. REST and realtime now share one primary domain
  • Remove :environment, :rest_host, :realtime_host, :ws_host and
    :fallback_hosts_use_default
  • Derive default fallback hosts from the endpoint: none for a
    hostname, and explicit :fallback_hosts still override them. A custom
    port no longer disables fallbacks
  • client.endpoint now returns the option value, the connection URI
    moves to client.uri, and client.primary_domain replaces
    environment/custom_host and the DOMAIN constants
  • Move endpoint resolution into Ably::Internal
  • Connect the WebSocket using the unbracketed hostname so IPv6 literal
    endpoints work
  • Point specs at ABLY_ENDPOINT (default nonprod:sandbox) and cover the
    endpoint and fallback resolution cases
  • Document the migration in UPDATING.md

@maratal
maratal self-requested a review October 12, 2026 03:30

@maratal maratal left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but needs a rebase

Version 2 adopts the endpoint routing model from the spec (REC1/REC2),
so clients connect to *.realtime.ably.net, with fallbacks on
*.fallback.ably-realtime.com, instead of the rest/realtime.ably.io
domains.

- Add the :endpoint option (default 'main'). It accepts a routing
  policy name ('acme'), a non-production policy ('nonprod:sandbox') or
  a hostname. REST and realtime now share one primary domain
- Remove :environment, :rest_host, :realtime_host, :ws_host and
  :fallback_hosts_use_default
- Derive default fallback hosts from the endpoint: none for a
  hostname, and explicit :fallback_hosts still override them. A custom
  port no longer disables fallbacks
- client.endpoint now returns the option value, the connection URI
  moves to client.uri, and client.primary_domain replaces
  environment/custom_host and the DOMAIN constants
- Move endpoint resolution into Ably::Internal
- Connect the WebSocket using the unbracketed hostname so IPv6 literal
  endpoints work
- Point specs at ABLY_ENDPOINT (default nonprod:sandbox) and cover the
  endpoint and fallback resolution cases
- Document the migration in UPDATING.md

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ttypic
ttypic force-pushed the integration/add-endpoint branch from 664f10b to 88946e0 Compare October 13, 2026 15:03
@ttypic
ttypic merged commit c3c4f4c into integration/v2 Oct 13, 2026
19 of 23 checks passed
@ttypic
ttypic deleted the integration/add-endpoint branch October 13, 2026 15:10

This branch was successfully deployed

2 active deployments
staging/pull/462/docs — 88946e07 Deployed Oct 13, 2026 by github-actions[bot]
staging/pull/462/features — 88946e07 Deployed Oct 13, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants