Ahh nice, sounds like a good setup. Did you use an open source library for the server side part of WebRTC? I'm super interested in having a play with a good implementation if you have any tips..
I used some variation of node-electron. Here is the top of the node server file:
var wrtc = require('electron-webrtc')({ headless: true });
var SimplePeer = require('simple-peer');
var requestify = require('requestify');
var dgram = require('dgram');
The Go server uses UDP to talk to one of the 4 node server processes, which are running instances of Chromium under xvfb under tmux. There's a lot of code load overhead for the 4 processes, in terms of a lot of Chromium loaded but not running, but EC2 servers are RAM heavy, so not an issue.
I haven't looked into exploiting the new true headless mode in Chrome yet, which should simplify things a lot. I'm also thinking of doing a full port to Go for WebRTC. That's a lot of stuff, however.
Ahh interesting, thank you for that. That's an interesting point re headless mode in Chrome (and Firefox now I guess!). It's a shame there's not an easier way though yet..
I haven't looked into exploiting the new true headless mode in Chrome yet, which should simplify things a lot. I'm also thinking of doing a full port to Go for WebRTC. That's a lot of stuff, however.