Implementing PeerJS Server with multiple dynos on Heroku

753 views Asked by At

I've already implemented PeerJS with Express in my node.js application using:

app.use('/peer', peer.ExpressPeerServer(app, {proxied: true}));

My concern is that when I eventually scale the application onto multiple dynos to accomodate traffic, it won't be able to signal between peers that have been connected to different dynos through heroku's internal process model.

My initial thought was to create a database collection to keep track of peer IDs that were connected on all of the dynos, but I don't know of a way for the database to notify each of the dynos when a peer on one dyno is attempting to signal a peer connected on a different dyno.

Is there any way that currently exists or could possibly be implemented to resolve this issue with scaling?

EDIT

I found a reference to doing what I wanted with redis here: https://remysharp.com/2014/11/10/muddling-my-way-through-real-time#server-side

My question is now, are there any existing repositories that implement WebRTC using redis?

1

There are 1 answers

0
Patrick Roberts On BEST ANSWER

There does not appear to be any currently existing signaling servers that exist using node and redis.