paritytech / capi-multisig-app

[WIP] Simple multisig administration
https://multisig.capi.dev/
Apache License 2.0
8 stars 0 forks source link

how to handle websocket connections on multiple instances #140

Open ryanleecode opened 1 year ago

ryanleecode commented 1 year ago

Given that we are going w/ Elastic Beanstalk for deployments we can expect there to be multiple instances of the websocket server running. if our intention is to send notifications to those subscribed to the websocket for a particular mutlisig, what would we do in a scenario where a transaction is finalized on 1 instance but we need to send notifications to users subscribed on another instance.

One way we can approach this is by using elastic cache w/ redis on beanstock https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.ElastiCache.html and publish the notification to a redis queue from which all the instances can subscribe to and send out the right notifcations to the end user.

peetzweg commented 1 year ago

Probably obsolete once we go back to rest cc @hamidra .