Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using with Redis Sentinel #8

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Using with Redis Sentinel #8

wants to merge 1 commit into from

Conversation

palkan
Copy link
Member

@palkan palkan commented Jul 6, 2020

Description

This PR demonstrates how AnyCable works with Redis Sentinels.

How to use this example?

  1. Start Redis with Sentinels:
dip up redis-sentinel

That would start 3 services: redis, redis-slave and a single redis-sentinel.

  1. Add more Sentinel nodes:
docker-compose scale redis-sentinel=3
  1. Start AnyCable WebSocket server:
dip up ws
  1. Run Rails console and verify that broadcast messages are working:
dip rails c

> num = 0
> ActionCable.server.broadcast "all", "test_#{(num = num.succ)}"
  1. Stop redis service:
docker stop anycable_rails_demo_redis_1

You should see the logs of AnyCable-Go reconnecting to another Redis instance.

  1. Go back to Rails console and try to broadcast more messages—you should see AnyCable-Go receiving them!

@palkan palkan added the demo Demo branch PR label Jul 6, 2020
@palkan palkan force-pushed the demo/redis-sentinel branch 3 times, most recently from 2f7a5fe to 3a0e24c Compare July 8, 2020 07:40
@palkan palkan mentioned this pull request Jul 17, 2020
@palkan palkan force-pushed the master branch 4 times, most recently from 510fbab to 80bd573 Compare March 15, 2021 13:08
@palkan palkan force-pushed the demo/redis-sentinel branch 2 times, most recently from 21bd590 to f948356 Compare March 15, 2021 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo Demo branch PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant