title: WebRTC - scalable live stream broadcasting / multicasting
body: <p><strong>PROBLEM:</strong></p>
  
  <p>WebRTC gives us peer-to-peer video/audio connections. It is perfect for p2p calls, hangouts. But what about broadcasting (one-to-many, for example, 1-to-10000)? </p>
  
  <p>Lets say we have a broadcaster "B" and two attendees "A1", "A2". Of course it seems to be solvable: we just connect B with A1 and then B with A2. So B sends video/audio stream directly to A1 and another stream to A2. B sends streams twice.</p>
  
  <p>Now lets imagine there are 10000 attendees: A1, A2, ..., A10000. It means B must send 10000 streams. Each stream is ~40KB/s which means B needs 400MB/s outgoing internet speed to maintain this broadcast. Unacceptable.</p>
  
  <p><strong>ORIGINAL QUESTION (OBSOLETE)</strong></p>
  
  <p>Is it possible somehow to solve this, so B sends only one stream on some server and attendees just pull this stream from this server? Yes, this means the outgoing speed on this server must be high, but I can maintain it. </p>
  
  <p>Or maybe this means ruining WebRTC idea?</p>
  
  <p><strong>NOTES</strong></p>
  
  <p>Flash is not working for my needs as per poor UX for end customers.</p>
  
  <p><strong>SOLUTION (NOT REALLY)</strong></p>
  
  <p>26.05.2015 - There is no such a solution for scalable broadcasting for WebRTC at the moment, where you do not use media-servers at all. There are server-side solutions as well as hybrid (p2p + server-side depending on different conditions) on the market.</p>
  
  <p>There are some promising techs though like <a href="https://github.com/muaz-khan/WebRTC-Scalable-Broadcast" rel="noreferrer">https://github.com/muaz-khan/WebRTC-Scalable-Broadcast</a> but they need to answer those possible issues: latency, overall network connection stability, scalability formula (they are not infinite-scalable probably).</p>
  
  <p><strong>SUGGESTIONS</strong></p>
  
  <ol>
  <li>Decrease CPU/Bandwidth by tweaking both audio and video codecs;</li>
  <li>Get a media server.</li>
  </ol>