Mid-level Track Roadmap

Solid Cable: scale

This course looks at how Solid Cable behaves under load, using the benchmark published in the solid_cable 4.0.2 README and the gem's own source. It compares round-trip times against Redis and against Action Cable's postgresql adapter, which uses LISTEN/NOTIFY and caps payloads just under 8 kB. It then covers polling_interval, the setting that changes latency, and autotrim with scheduled trimming. Later lessons look at connects_to and this app's shared production database, the cost of more server processes, and the cases where a different adapter fits better.

What you'll learn

  • ✓How to read the gem's k6 benchmark: virtual users, average RTT and p(90) and p(95)
  • ✓Why Solid Cable's polling differs from Redis pub/sub and PostgreSQL LISTEN/NOTIFY
  • ✓How polling_interval trades poll queries for lower delivery latency
  • ✓How autotrim runs on each broadcast and how to schedule TrimJob instead
  • ✓How connects_to, process count, use_skip_locked and reconnect_attempts affect database load
  • ✓When a configuration change stops being enough and another adapter fits better
Free preview · Lesson 1 4 min read

Reading the numbers: Solid Cable against Redis under load

The mid-level course "Solid Cable: scaling WebSockets" looked at this app's solid_cable_messages table in development, where one browser tab over a few sessions had written every row. That never had to answer a harder question: what happens when it isn't one tab but a thousand?

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...