-
Hi So per docs I would need anycable-go --host=localhost --port=8080
bundle exec anycable # config/anycable.yml
development:
redis_url: redis://localhost:6379/1
production:
redis_url: redis://my.redis.io:6379/1 So for two apps: # option 1 single process for both apps
anycable-go --host=app1.com,app2.com --port=8080
# option 2 different host same port
anycable-go --host=app1.com --port=8080
anycable-go --host=app2.com --port=8080
# option 3 different host + port
anycable-go --host=app1.com --port=8080
anycable-go --host=app2.com --port=8081 Regarding # option1 same redis/port, same DB
redis_url: redis://localhost:6379/1 # app1
redis_url: redis://localhost:6379/1 # app2
# option2 same redis/port, different DB
redis_url: redis://localhost:6379/1 # app1
redis_url: redis://localhost:6379/2 # app2
# option3 different redis process,
redis_url: redis://localhost:6379/1 # app1
redis_url: redis://localhost:6380/1 # app2 To summarize:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
AnyCable server can connect only to a single backend application (the gRPC one you run via # app1
bundle exec anycable --rpc-host=localhost:50051
anycable-go --port=8080 --rpc-host=localhost:50051
# app2
bundle exec anycable --rpc-host=localhost:50052
anycable-go --port=8081 --rpc-host=localhost:50052
Yes, same Redis instance is fine, but it's better to isolate data streams by using different |
Beta Was this translation helpful? Give feedback.
AnyCable server can connect only to a single backend application (the gRPC one you run via
bundle exec anycable
). So, you need to launch twoanycable-go
commands listening on different ports. Similarly, you must runbundle exec anycable
with different--rpc-host
. To sum up:Yes, same R…