I have a websocket sitting on an AWS ECS instance, in the websocket, there is an endpoint to update an object in the database, which I then want to send the updated result back to all the listeners on the websocket.
The issue is that when this is load balanced, there may be multiple tasks, so when somone updates a record in the database, I need a way to notify all other tasks of this, so that they can be sent through to all websockets
I thought sns would be the solution here, and I could have each task listening to the SNS, however the issue is that SNS will just call an http endpoint, which would go through the load balancer so only one task will recieve an update, not all of them.
Is there something im missing here, or any other technologies I should consider for this? Thanks
1