Releases: anycable/anycable-go
1.0.0.preview1
First preview of the upcoming v1.0.
See Changelog.
0.6.4
Features
- Added ENV support to mruby scripts.
Now it's possible to access ENV in custom log handlers written in mruby. For example:
module MetricsFormatter
def self.call(data)
parts = ["source=#{ENV["DYNO"]}"]
data.each do |key, value|
parts << "sample##{key}=#{value}"
end
parts.join(" ")
end
end
0.6.3
Features
- Set
REMOTE_ADDR
synthetic header. (PR)
It can be used on a RPC server side to access remote connection IP address.
- Use request id for session uids if available. (PR)
If a load balancer standing in front of WebSocket server assigns X-Request-ID
header,
this request ID will be used for session identification.
0.6.2
0.6.1
Features
- Added HTTP health check endpoint.
Go to /health
(you can configure the path via --health-path
) to see the health message.
You can use this endpoint as readiness/liveness check (e.g. for load balancers).
Merry X-mas! 🎅
0.6.0 "Around the World" 🗺
The main goal of 0.6.0 release was a codebase refactoring and reorganization (for better flexibility and extensibility).
tl;dr changed CLI interface and configuration options, instrumentation, better logging, graceful termination, bug fixes.
Documentation now lives at https://docs.anycable.io/#/go_getting_started.
See also upgrade notes.
Changes
- [Breaking] New configuration and CLI options.
See upgrade notes for more information.
- New logging format.
Now we use structured logging with the help if apex/log. For example:
INFO 2018-03-05T08:44:57.684Z context=main Starting AnyCable unknown
INFO 2018-03-05T08:44:57.684Z context=main Handle WebSocket connections at /cable
INFO 2018-03-05T08:44:57.684Z context=http Starting HTTP server at 0.0.0.0:8080
INFO 2018-03-05T08:44:57.685Z context=rpc RPC pool initialized: 0.0.0.0:50051
INFO 2018-03-05T08:44:57.695Z context=pubsub Subscribed to Redis channel: __anycable__
Also, json
format is supported out-of-the-box (--log_format=json
or ANYCABLE_LOG_FORMAT=json
).
Features
- Added instrumentation (metrics) support (including out-of-the-box Prometheus exporter)
See documentation.
- Added signal handling and graceful shutdown.
When receiving SIGINT
or SIGTERM
we:
- Stop the server (to not accept new connections)
- Close all registered sessions (authenticated clients)
- Wait for pending Disconnect requests to complete
- Wait for active RPC calls to finish.
Misc
- Reduced binary size (thanks to @sponomarev)
See #45.
v0.6.0.rc1
CircleCI darwin build fix.
0.6.0 (preview 6)
Features
This pre-release introduces an experimental mruby integration.
NOTE: Experimental means that the final API may (and likely will) change.
You can write custom Ruby script to implement statistics logging.
For example, to provide Librato-comatible output you can write a custom formatter like this:
# my-metrics-formatter.rb
# This MetricsFormatter name is required!
module MetricsFormatter
KEYS = %w(clients_num clients_unique_num goroutines_num)
# `data` is a Hash containing all the metrics data
def self.call(data)
parts = []
data.each do |key, value|
parts << "sample##{key}=#{value}" if KEYS.include?(key)
end
parts.join(' ')
end
end
And then use it like this:
anycable-go --metrics_log_formatter="my-metrics-formatter.rb"
>INFO 2018-04-27T14:11:59.701Z sample#clients_num=0 sample#clients_uniq_num=0 sample#goroutines_num=0
NOTE: pre-compiled binaries with mruby support are currently only available for Linux AMD64 and MacOS AMD64 (versions with -mrb
suffix). For Heroku buildpack use HEROKU_ANYCABLE_GO_VERSION=0.6.0-preview6-mrb
.
v0.6.0 (preview 5)
Fixed panic
within session.Send()
(see #34).
0.6.0 (preview 4)
Fixed Disconnect
call payload generation (broken subscriptions list).