m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.95k stars 449 forks source link

How neko compares to noVNC #319

Closed dmikushin closed 9 months ago

dmikushin commented 1 year ago

Hi @m1k1o , as an expert in this topic, could you please explain what are the differences between neko and xfrb+x11vnc+novnc stacks?

m1k1o commented 1 year ago

Main difference is that Neko uses webrtc and novnc sends images over websocket connection. Neko as well natively supports audio and binds directly to xvfb/Xdummy instead of using VNC. Neko also supports multiple participants natively.

dmikushin commented 1 year ago

What about performance observations? How much network bandwidth Neko consumes compared to noVNC, and what is the price of streaming operations for the CPU load?

dmikushin commented 1 year ago

One other aspect is TCP versus UDP. noVNC streams over TCP, which is inefficient, but portable. Is webrtc in Neko based on UDP? Are there any difficulties manipulating Neko's UDP ports through Docker?

m1k1o commented 11 months ago

No, i don't think there are difficulties using UDP ports. Even latest HTTP/3 standard moves to UDP, and UDP is very popular in streaming and conferencing.

What about performance observations? How much network bandwidth Neko consumes compared to noVNC, and what is the price of streaming operations for the CPU load?

I don't know the exact numbers, but it appears to be more performant and less resource demanding on clients, because it uses well-known streaming formats such as VP8 or H264, that most of the computers nowadays can natively on GPU decode.

dmikushin commented 9 months ago

I'm asking about UDP, because UDP networking is not always easy to dockerize. In difficult cases, the container must share the host network, in order for UDP to work. However, in your case everything seems to work simply with

  - "52000-52100:52000-52100/udp"

?

m1k1o commented 9 months ago

Unicast udp works fine. Only multicast udp needs host network and we don't use that here.