github.com/anycable/anycable-go@v1.5.1/CHANGELOG.md (about)

     1  # Change log
     2  
     3  ## master
     4  
     5  ## 1.5.1 (2024-04-16)
     6  
     7  - Add `?history_since` support for SSE connections. ([@palkan][])
     8  
     9  - Add `?stream` and `?signed_stream` support for SSE connections. ([@palkan][])
    10  
    11  ## 1.5.0 (2024-04-01)
    12  
    13  - Add _whispering_ support to pub/sub streams. ([@palkan][])
    14  
    15  Whispering is an ability for client to publish events to the subscribed stream without involving any server-side logic. Whenever a client _whispers_ an event to the channel, it's broadcasted to all other connected clients.
    16  
    17  The feature is enabled for public streams automatically. For signed streams, you must opt-in via the `--streams_whisper` (`ANYCABLE_STREAMS_WHISPER=true`) option.
    18  
    19  - HTTP broadcaster is enabled by default. ([@palkan][])
    20  
    21  HTTP broadcaster is now enabled by default in addition to Redis (backward-compatibility). It will be the primary default broadcaster in v2.
    22  
    23  - Added new top-level `--secret` configuration option. ([@palkan][])
    24  
    25  This is a one secret to rule them all! Unless specific secrets are specified, all features relying on secret keys use the global (_application_) secret either directly (signed streams, JWT) or as a secret base to generate auth tokens (HTTP broadcasting and HTTP RPC).
    26  
    27  - Added public mode (`--public`). ([@palkan][])
    28  
    29  In this mode, AnyCable doesn't enforce connection authentication, enables public streams, and disables HTTP broadcast endpoint authentication. (So, it's a combination of `--noauth` and `--public_streams`).
    30  
    31  - Added direct stream subscribing via a dedicated channel. ([@palkan][])
    32  
    33  Added a `$pubsub` reserved channel to allow subscribing to streams (signed or unsigned) without relying on channels (similar to Turbo Streams).
    34  
    35  Enable public (unsigned) streams support via the `--public_streams` (or `ANYCABLE_PUBLIC_STREAMS=1`) option or provide a secret key to verify signed streams via the `--streams_secret=<val>` (or `ANYCABLE_STREAMS_SECRET=<val>`) option.
    36  
    37  - Config options refactoring (renaming):
    38  
    39    - Deprecated (but still supported): `--turbo_rails_key` (now `--turbo_streams_secret`), `--cable_ready_key` (now `--cable_ready_secret`), `--jwt_id_key` (now `--jwt_secret`), `--jwt_id_param` (now `--jwt_param`), `--jwt_id_enforce` (now `--enforce_jwt`).
    40    - Deprecated (no longer supported): `--turbo_rails_cleartext`, `--cable_ready_cleartext` (use `--public_streams` instead).
    41  
    42  - Allowing embedding AnyCable into existing web applications. ([@palkan][])
    43  
    44  You can now set up an AnyCable instance without an HTTP server and mount AnyCable WebSocket/SSE handlers wherever you like.
    45  
    46  - Log format has changed. ([@palkan][])
    47  
    48  We've migrated to Go `slog` package and its default text handler format.
    49  
    50  ## 1.4.8 (2024-01-10)
    51  
    52  - Add `--redis_disable_cache` option to disable client-side caching (not supported by some Redis providers). ([@palkan][])
    53  
    54  - Return support for an scheme omitted IP address in RPC_HOST. ([@ardecvz][])
    55  
    56  For example, `127.0.0.1:50051/anycable`.
    57  
    58  It's missing from 1.4.6 which introduced auto RPC implementation inferring from the RPC host.
    59  
    60  ## 1.4.7 (2023-11-03)
    61  
    62  - Add NATS-based broker. ([@palkan][])
    63  
    64  ## 1.4.6 (2023-10-25)
    65  
    66  - Add `@anycable/anycable-go` NPM package to install `anycable-go` as a JS project dependency. ([@palkan][])
    67  
    68  - Infer RPC implementation from RPC host. ([@palkan][])
    69  
    70  Feel free to drop `rpc_impl` configuration parameter.
    71  
    72  - Enhance Fly configuration preset to enable embedded NATS and configure HTTP broadcaster port. ([@palkan][])
    73  
    74  ## 1.4.5 (2023-10-15)
    75  
    76  - Fix passing RPC context via headers when using HTTP RPC. ([@palkan][])
    77  
    78  - Add `exclude_socket` option support to broadcasts. ([@palkan][])
    79  
    80  - Add support for batched broadcasts. ([@palkan][])
    81  
    82  It's now possible to publish an array of broadcasting messages (e.g., `[{"stream":"a","data":"..."},"stream":"b","data":"..."}]`). The messages will be delivered in the same order as they were published (within a stream).
    83  
    84  - Add support for REDIS_URL with trailing slash hostnames. ([@ardecvz][])
    85  
    86  `rueidis` doesn't tolerate the trailing slash hostnames.
    87  
    88  - Support to use a custom database number. ([@ardecvz][])
    89  
    90  Parse `--redis_url` (`ANYCABLE_REDIS_URL` or `REDIS_URL`) using the `rueidis` standard utility.
    91  
    92  ## 1.4.4 (2023-09-07)
    93  
    94  - Add Server-Sent Events support. ([@palkan][])
    95  
    96  - Add `disconnect_backlog_size` option to control the buffer size for the disconnect queue.
    97  
    98  ## 1.4.3 (2023-08-10)
    99  
   100  - Added ability to require `pong` messages from clients (for better detection of broken connections). ([@palkan][])
   101  
   102  Use `--pong_timoout=<number of seconds to wait for ping>` option to enable this feature. **NOTE:** This option is only applied to clients using the extended Action Cable protocol.
   103  
   104  - Allow configuring ping interval and ping timestamp precision per connection. ([@palkan][])
   105  
   106  You can use URL query params to configure ping interval and timestamp precision per connection:
   107  
   108  For example, using the following URL, you can set the ping interval to 10 seconds and the timestamp precision to milliseconds:
   109  
   110  ```txt
   111  ws://localhost:8080/cable?pi=10&ptp=ms
   112  ```
   113  
   114  - Fix in-memory streams history retrieval. ([@palkan][])
   115  
   116  Keep empty streams in the cache for a longer time, so we re-use the offset. In case the stream has been disposed, we should return an error when the requested offset is out of range.
   117  
   118  ## 1.4.2 (2023-08-04)
   119  
   120  - Add `--shutdown_timeout` option to configure graceful shutdown timeout. ([@palkan][])
   121  
   122  This new option deprecates the older `--disconnect_timeout` option (which now has no effect).
   123  
   124  ## 1.4.1 (2023-07-24)
   125  
   126  - Allow to configure secure gRPC connection. ([@Envek][])
   127  
   128    Option `--rpc_tls_root_ca` allow to specify private root certificate authority certificate to verify RPC server certificate.
   129    Option `--rpc_tls_verify` allow to disable RPC server certificate verification (insecure, use only in test/development).
   130  
   131  ## 1.4.0 (2023-07-07)
   132  
   133  - Add HTTP RPC implementation. ([@palkan][])
   134  
   135  - Added telemetry data collection. ([@palkan][])
   136  
   137  - Add `--turbo_rails_cleartext` and `--cable_ready_cleartext`. ([@palkan][])
   138  
   139  In a clear-text mode, stream names are passed as-is from the client, no signing is required. This mode is meant for experimenting with Turbo Streams or Cable Ready streams in non-Rails applications.
   140  
   141  - Introduce `--disconnect_mode` and deprecate `--disable_disconnect`. ([@palkan][])
   142  
   143  You can use `--disconnect_mode=never` to achieve the same behaviour as with `--disable_disconnect`. The new (and default) `--disconnect_mode=auto` automatically detects if a Disconnect call is needed for a session (for example, Hotwire clients don't need it).
   144  
   145  - Refactor broadcasting to preserve the order of messages within a single stream. ([@palkan][])
   146  
   147  Previously, we used a Go routine pool to concurrently delivery broadcasts, which led to nondeterministic order of messages within a single stream delivered in a short period of time. Now, we preserve the order of messages within a stream—the delivered as they were accepted by the server.
   148  
   149  **NOTE:** Keep in mind that in a clustered setup with a non fan-out broadcaster (i.e., when using a broker), each broadcasted message is delivered to only a single node in the cluster (picked randomly). In this case, we cannot guarantee the resulting order.
   150  
   151  - Add `redisx` broadcast adapter. ([@palkan][])
   152  
   153  - Set HTTP broadcast to `$PORT` on Heroku by default. ([@palkan][])
   154  
   155  - Add `broker` preset to configure required components to use an in-memory broker. ([@palkan][])
   156  
   157  - New broadcasting architecture: broadcasters, subscribers and brokers. ([@palkan][])
   158  
   159  ## 1.3.1 (2023-03-22)
   160  
   161  - Add `--gateway_advertise` option for embedded NATS. ([@palkan][])
   162  
   163  ## 1.3.0 (2023-02-28)
   164  
   165  - Add configuration presets (fly, heroku). ([@palkan][])
   166  
   167  Provide sensible defaults matching current platform.
   168  
   169  - Add embedded NATS support. ([@gzigzigzeo][], [@palkan][])
   170  
   171  - Added metrics default tags support for StatsD and Prometheus.
   172  
   173  You can define global tags (added to every reported metric by default) for Prometheus (reported as labels)
   174  and StatsD. For example, we can add environment and node information:
   175  
   176  ```sh
   177  anycable-go --metrics_tags=environment:production,node_id:xyz
   178  # or via environment variables
   179  ANYCABLE_METRICS_TAGS=environment:production,node_id:xyz anycable-go
   180  ```
   181  
   182  For StatsD, you can specify tags format: "datadog" (default), "influxdb", or "graphite".
   183  Use the `statsd_tag_format` configuration parameter for that.
   184  
   185  - Added Statsd support.
   186  
   187  You can send instrumentation data to Statsd.
   188  Specify `statsd_host` and (optionally) `statsd_prefix`:
   189  
   190  ```sh
   191  anycable-go -statsd_host=localhost:8125 -statsd_prefix=anycable.
   192  ```
   193  
   194  - Add `grpc_active_conn_num` metrics. ([@palkan][])
   195  
   196  Useful when you use DNS load balancing to know, how many active gRPC connections are established.
   197  
   198  Also, added debug logs for gRPC connected/disconnected events.
   199  
   200  - Support placeholders and wildcards in `--path`. ([@palkan][])
   201  
   202  ## 1.2.3 (2022-12-01)
   203  
   204  - Add `redis_tls_verify` setting to enable validation of Redis server TLS certificate. ([@Envek][])
   205  
   206  - Add `--proxy-cookies` setting to filter cookies passed to RPC. ([@rafaelrubbioli][])
   207  
   208  ## 1.2.2 (2022-08-10)
   209  
   210  - Add NATS pub/sub adapter. ([@palkan][])
   211  
   212  ## 1.2.1 (2022-06-30)
   213  
   214  - Use [automaxprocs](https://github.com/uber-go/automaxprocs) to configure the number of OS threads. ([@palkan][])
   215  
   216  - Fix race conditions when stopping and starting streams within the same command. ([@palkan][])
   217  
   218  ## 1.2.0 (2021-12-21) 🎄
   219  
   220  - Add fastlane subscribing for Hotwire (Turbo Streams) and CableReady.
   221  
   222  Make it possible to terminate subscription requests at AnyCable Go without performing RPC calls.
   223  
   224  - Add JWT authentication/identification support.
   225  
   226  You can pass a properly structured token along the connection request to authorize the connection and set up _identifiers_ without performing an RPC call.
   227  
   228  ## 1.1.4 (2021-11-16)
   229  
   230  - Add `rpc_max_call_recv_size` and `rpc_max_call_send_size` options to allow modifying the corresponding limits for gRPC client connection. ([@palkan][])
   231  
   232  ## 1.1.3 (2021-09-16)
   233  
   234  - Fixed potential deadlocks in Hub. ([@palkan][])
   235  
   236  We noticed that Hub could become unresponsive due to a deadlock on `streamsMu` under a very high load,
   237  so we make locking more granular and removed _nested_ locking.
   238  
   239  ## 1.1.2 (2021-06-23)
   240  
   241  - Added `--rpc_enable_tls` option. ([@ryansch][])
   242  
   243  - Do not treat RPC failures as errors. ([@palkan][])
   244  
   245  Failure (e.g., subscription rejection) is an expected application behaviour and
   246  should not be treated as error (e.g., logged).
   247  
   248  ## 1.1.1 (2021-06-15)
   249  
   250  - Fixed potential concurrent read/write in hub. ([@palkan][])
   251  
   252  ## 1.1.0 🚸 (2021-06-01)
   253  
   254  - Added `--max-conn` option to limit simultaneous server connections. ([@skryukov][])
   255  
   256  - Added `data_sent_bytes_total` and `data_rcvd_bytes_total` metrics. ([@palkan][])
   257  
   258  - Add `--allowed_origins` option to enable Origin check during the WebSocket upgrade. ([@skryukov][])
   259  
   260  - Renamed `metrics_log_interval` to `metrics_rotate_interval`. ([@palkan][])
   261  
   262  ## 1.1.0.rc1 (2021-05-12)
   263  
   264  - Added `server_msg_total` and `failed_server_msg_total` metrics. ([@prburgu][])
   265  
   266  - Dropped deprecated RPC v0.6 support. ([@palkan][])
   267  
   268  - Made ping message timestamp precision configurable ([@prburgu][])
   269  
   270  - Added concurrency to broadcasting. ([@palkan][])
   271  
   272  Now new broadcast messages are handled (and re-transmitted) concurrently by a pool of workers (Go routines).
   273  You can control the size of the pool via the `hub_gopool_size` configuration parameter (defaults to 16).
   274  
   275  ## 1.0.5 (2021-03-17)
   276  
   277  - Fix interval values for counters. ([@prburgu][])
   278  
   279  See [#128](https://github.com/anycable/anycable-go/pull/128).
   280  
   281  - Make ping and stats refresh intervals configurable. ([@palkan][])
   282  
   283  Added `--ping_interval N` and `--stats_refresh_interval N` options respectively (both use seconds).
   284  
   285  ## 1.0.4 (2021-03-04)
   286  
   287  - Fix race conditions in Hub. ([@palkan][])
   288  
   289  Use a single channel for register/unregister and subscribe/unsubscribe to make order of
   290  execution deterministic. Since `select .. case` chooses channels randomly, we may hit the situation when registration is added
   291  after disconnection (_un-registration_).
   292  
   293  - Add `sid=xxx` to RPC logs. ([@palkan][])
   294  
   295  ## 1.0.3 (2021-01-05)
   296  
   297  - Handle TLS Redis connections by using VERIFY_NONE mode. ([@palkan][])
   298  
   299  - Added `rpc_pending_num` metric. ([@palkan][])
   300  
   301  ## 1.0.2 (2020-09-08)
   302  
   303  - Add channel states to `disconnect` requests. ([@palkan][])
   304  
   305  - Moved pingMessage (session), disconnectMessage (node) and Reply (hub) structs into common package. ([@gr8bit][])
   306  
   307  - Re-added git ref version to `LD_FLAGS` in Makefile. ([@gr8bit][])
   308  
   309  ## 1.0.1 (2020-07-07)
   310  
   311  - Fix subscribing to the same stream from different channels. ([@palkan][])
   312  
   313  - Support providing passwords for Redis Sentinels. ([@palkan][])
   314  
   315  Use the following format: `ANYCABLE_REDIS_SENTINELS=:password1@my.redis.sentinel.first:26380,:password2@my.redis.sentinel.second:26380`.
   316  
   317  - Fix setting `--metrics_host`. ([@palkan][])
   318  
   319  See [#107](https://github.com/anycable/anycable-go/issues/107).
   320  
   321  ## 1.0.0 (2020-06-24)
   322  
   323  - Add `--disable_disconnect` option. ([@palkan][])
   324  
   325  Allows you to avoid calling `Disconnect` RPC method completely if you don't need it.
   326  
   327  - Add channel state support. ([@palkan][])
   328  
   329  - Add stopped streams support. ([@palkan][])
   330  
   331  - Add support for remote commands. ([@palkan][])
   332  
   333  Handle remote commands sent via Pub/Sub. Currently, only remote disconnect is supported.
   334  
   335  - Add HTTP broadcasting adapter. ([@palkan][])
   336  
   337  - Add Redis Sentinel support. ([@rolandg][])
   338  
   339  - Send `disconnect` messages on server restart and authentication failures. ([@palkan][])
   340  
   341  - Add `protov` RPC metadata. ([@palkan][])
   342  
   343  - Add `rpc_retries_total` metrics. ([@palkan][])
   344  
   345  This metrics represents the number of times RPC requests were retried.
   346  The large value might indicate that the RPC server pool size doesn't correspond to the `rpc_concurrency` value.
   347  
   348  - Use single gRPC client instance instead of a pool. ([@palkan][])
   349  
   350  gRPC connection provides concurrency via H2 streams (with load balancing). Using a pool doesn't bring any performance
   351  improvements and sometimes 'cause instability (e.g., ResourceExhausted or Unavailable exceptions under the load)
   352  
   353  We still limit the number of concurrent RPC requests. Now you can configure it via `--rpc_concurrency` setting.
   354  
   355  See [PR#88](https://github.com/anycable/anycable-go/pull/88) for more.
   356  
   357  - Add `--disconnect_timeout` option to specify the timeout for graceful shutdown of the disconnect queue. ([@palkan][])
   358  
   359  - Add `mem_sys_bytes` metric. ([@palkan][])
   360  
   361  Returns the total bytes of memory obtained from the OS
   362  (according to [`runtime.MemStats.Sys`](https://golang.org/pkg/runtime/#MemStats)).
   363  
   364  - Add `--enable_ws_compression` option to enable WebSocket per message compression. ([@palkan][])
   365  
   366  Disabled by default due to the experimental status in [Gorilla](https://github.com/gorilla/websocket/blob/c3e18be99d19e6b3e8f1559eea2c161a665c4b6b/doc.go#L201-L214).
   367  
   368  - **IMPORTANT**: Docker images versioning changed from `vX.Y.Z` to `X.Y.Z`. ([@bibendi][])
   369  
   370  Now you can specify only the part of the version, e.g. `anycable-go:1.0` instead of the full `anycable-go:v1.0.0`.
   371  
   372  See [Changelog](https://github.com/anycable/anycable-go/blob/0-6-stable/CHANGELOG.md) for versions <1.0.0.
   373  
   374  [@palkan]: https://github.com/palkan
   375  [@sponomarev]: https://github.com/sponomarev
   376  [@bibendi]: https://github.com/bibendi
   377  [@rolandg]: https://github.com/rolandg
   378  [@gr8bit]: https://github.com/gr8bit
   379  [@prburgu]: https://github.com/prburgu
   380  [@skryukov]: https://github.com/skryukov
   381  [@ryansch]: https://github.com/ryansch
   382  [@Envek]: https://github.com/Envek
   383  [@rafaelrubbioli]: https://github.com/rafaelrubbioli
   384  [@gzigzigzeo]: https://github.com/gzigzigzeo
   385  [@ardecvz]: https://github.com/ardecvz