Difference between Redis and Postgresql action cable adapters for Turbo Stream broadcasting in Rails?

In config/cable.yml I can set the adapter to postgresql or redis. I tried them and both work. Is one better than the other for turbo stream broadcasts?

We are already using Postgres in production, but don’t use Redis. Thanks.

The limit of 8KB in the Postgres adapter will give you troubles sooner than later.

The Postgres adapter made sense when ActionCable was used to send short messages, but its payload size limit makes it impractical when sending HTML over the wire.

Been there, seen PG::InvalidParameterValue: ERROR: payload string too long. :slight_smile:

2 Likes