Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We started a simple webrtc app in 2018. Thought it would be simple. Now two years later we are still tweaking the code and dealing with handshakes and codecs across browsers, as well as edge cases involving firewalls and what to do if someone disconnects for longer than the timeout.

Finally we had to invent workarounds for Cordova: https://mobile.twitter.com/qbixapps/status/11564841564250398...

Did anyone set up a WebRTC that was super easy and worked rock solid with just a few lines?



Aren't those codec exchanges and handshakes managed by ICE? Why would you need to go into this layer yourself?


One example – H.264 is hardware accelerated on iPhone so one might prefer this over VP8 which could drain the device's battery pretty quickly when used in a P2P mesh setup.


First off, I'm a total noob when it comes to WebRTC, but having read the docs Google provide for it (and the accompanying mini video app tutorial) it seemed like it's dead simple to implement and use - I understood that the complexities and basically everything you talked about above was already handled. Is your implementation different than theirs or did I maybe misunderstand the value propositions of WebRTC?


See the sister comment to yours


Twillio has this, but it is crazy difficult to do DIY something in the real world.


Yes. Twilio and maybe Jitsi.

We open sourced our implementation.

I am still wondering if we missed some simple solution.


curious to know - how do you scale webrtc ?

I mean do you use kubernetes and stuff - what load balancer do you use (I assume sessions are "sticky"), etc


Scaling doesn't always involve kubernetes.

But the way you scale WebRTC is by using multiplexers between clients.

Let's say you have 2 clients. They can directly send data to each other.

Let's say you have 3 clients. Client 1 sends data to Clients 2, 3 Client 2 sends data to Clients 1, 3 Client 3 sends data to Clients 1, 2

As you add more clients the scaling requires n(n-1)/2 edges because it forms a Complete Graph.

The idea then is to use a server in the middle. That server could be 3rd party or maybe even one of the participants within the graph.


sure - but ultimately you will have to scale the server horizontally. or do you mean that one server can scale till millions of users


If you have millions of users sure use kubernetes. If you don't have millions of users just setup a handful of decently sized VMs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: