In this episode, we explore Fly.io capabilities in deploying Rails real-time applications:
Deploying a pure Rails Action Cable application to Fly.
Load-testing Flying Action Cable with k6 and xk6-cable.
Deploying RPC-less version of AnyCable and load-testing it.
Adding RPC server to the equation with just a couple of configuration changes.
Exporting AnyCable metrics to fly-metrics.io.
Benchmark results
Action Cable server (single-worker Puma) crashed due to out-of-memory at about 700 concurrent connections.
AnyCable (RPC-less) passed 2700 concurrent connections and consumed only a half of the available RAM (~120MB).
Links:
Errata:
Getting an app's Ruby version from the Gemfile has been fixed in the recent
flyctl
versions (see issue)Redis connections termination is intentional and has nothing with load-testing. See the Fly docs