This repository is an incredibly simple Rails server that includes an ActionCable channel. I wanted to experiment with ActionCable specifically to see how it performs under load.
To run the tests:
- Start the server
rails s -b 0.0.0.0
(don't use localhost) - Open a browser to
https://localhost:3000
, this will open a single connection and channel subscription - Create 2,500 connections each with a single channel subscription
node test-actioncable.js
A test script exists to connect to Ably and publish a high volume of messages quickly, see test-ably.js. However, please note that your tests may not provide useful results for the following reason:
- The websocket servers are not local so there is increased latency
- You need an account and API key to connect to Ably, sign up for a free account first
- You need to obtain your API key from your dashboard and add it to the test-ably.js script.