Pro version overview pro

AnyCable-Go Pro aims to bring AnyCable to the next level of efficient resources usage and developer experience happiness.

Read also AnyCable Goes Pro: Fast WebSockets for Ruby, at scale.

Features

Memory usage

Pro version uses a different memory model under the hood, which gives you yet another 30-50% RAM usage reduction.

Here is the results of running websocket-bench broadcast and connect benchmarks and measuring RAM used:

version broadcast 5k connect 10k connect 15k
1.3.0-pro 142MB 280MB 351MB
1.3.0-pro (w/o poll)* 207MB 343MB 480MB
1.3.0 217MB 430MB 613MB

* AnyCable-Go Pro uses epoll/kqueue to react on incoming messages by default. In most cases, that should work the same way as with non-Pro version; however, if you have a really high rate of incoming messages, you might want to fallback to the actor-per-connection model (you can do this by specifying --netpoll_enabled=false).

NOTE: Currently, using net polling is not compatible with WebSocket per-message compression and the built-in TLS support.

More features

Installation

AnyCable Pro is distributed in two forms: a Docker image and pre-built binaries.

NOTE: All distribution methods, currently, relies on GitHub personal access tokens. We can either grant an access to the packages/projects to your users or generate a token for you. You MUST enable the following permissions: read:packages to download Docker images and/or repo (full access) to download binary releases.

Docker

We use GitHub Container Registry to host images.

See the official documentation on how to authenticate Docker to pull images from GHCR.

Once authenticated, you can pull images using the following identifier: ghcr.io/anycable/anycable-go-pro. For example:

# docker-compose.yml
services:
  ws:
    image: ghcr.io/anycable/anycable-go-pro:1.3
    ports:
      - '8080:8080'
    environment:
      ANYCABLE_HOST: "0.0.0.0"

Pre-built binaries

We use a dedicated GitHub repo to host pre-built binaries via GitHub Releases: github.com/anycable/anycable-go-pro-releases.

We recommend using fetch to download releases via command line:

fetch --repo=https://github.com/anycable/anycable-go-pro-releases --tag="v1.3.0" --release-asset="anycable-go-linux-amd64" --github-oauth-token="<access-token>" /tmp

Heroku

Our heroku buildpack supports downloading binaries from the private GitHub releases repo. You need to provide the following configuration parameters:

  • HEROKU_ANYCABLE_GO_REPO=https://github.com/anycable/anycable-go-pro-releases
  • HEROKU_ANYCABLE_GO_GITHUB_TOKEN=<access-token>

Currently, you also need to specify the version as well: HEROKU_ANYCABLE_GO_VERSION=1.3.0.

Make sure you're not using cached anycable-go binary by purging the Heroku cache: heroku builds:cache:purge -a <your-app-name>.