Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

[Example] Redis Sentinel #24

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

[Example] Redis Sentinel #24

wants to merge 1 commit into from

Conversation

palkan
Copy link
Member

@palkan palkan commented Apr 28, 2020

How to use this branch

  • Build anycable-go with Sentinel support for Linux (make build-linux) and put in into bin/ folder of this project.

  • Provision Docker dev env if not yet:

dip provision
  • Start Redis, slave and first sentinel:
dip up redis-sentinel
  • Add more sentinels for quorum:
docker-compose scale redis-sentinel=3
  • Run WebSocket server with debug output:
DEBUG=1 dip up anycable
  • Run Rails console:
dip rails c
  • In Rails console, broadcast messages to see whether anycable-go sees them:
num = 0
# repeat as many times as you want, all the messages will have different bodies
ActionCable.server.broadcast "all", "test_#{(num = num.succ}"
  • While broadcasting messages, do the following:
# pause master Redis
docker pause anycable_demo_redis_1

# unpause master Redis
docker unpause anycable_demo_redis_1

# pause slave
docker pause anycable_demo_redis-slave_1

Between pausing/unpausing Redis instances, try to broadcast messages and see if the channel is alive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant