I have a janus server. It has 12gb ram and 16 core CPU. I use google server as stun
I have a vue-built client that inhabits kubernetes (the client is built with AI)
When I have there around 27+ people on this server it begins to lag, and if I add more participants, it stops streaming audio and video.
I see no real spikes on CPU-RAM part of the question. Network grows as expected but not critically
For video quality I set 512000 bitrate when joining the room. Audio is 320
Can someone help and tell me where to look for the source of the problem?
I’ve tried increasing max_nack_queue and rtp config.
Increased RAM and CPU
Created a new janus server with even less RAM and CPU and the result is the same
Tried lowering bitrate config and had the same problem
Wtth those numbers, that’s a lot of connections, a very high bitrate (for both server and clients) and so a quite high throughput you’re putting Janus through. You’ll need to tinker with Janus optimization properties, like event loops and helper threads in the VideoRoom. Of course you’ll need to make sure the server does have enough bandwidth, and clients do too. 512k for video seems pointless to me when you have 30 people active, who will all pretty much look like thumbnails: 320k for audio makes even less sense to me, unless you’re doing something that requires that absurd bitrate (the average I usually see for audio is 20k-30k).
Oh, and maybe don’t get AI to write the client side, but that’s just me
This reply is not directly meant for Lorenzo or I am being argumentative. But this post is for those who read the last line and get discouraged about using AI-based code generators. I am not sure the process Andrey used to code generate his client. But I found that if you follow a disciplined and a particular path in utilizing these tools, you will be able to produce awesome products, very inexpensively and very quickly. That is the point I want to convey here. As a challenge, I have taken upon myself to replicate Audrey’s experiment and see where I end up. I will document my journey here and will make the result publicly available.
As a background, any person here will be more capable when it comes to coding. I am all thumbs when it comes to setting up systems, administering them and the like. But I have a strong experience when it comes to requirements generation. A recipe for success is first work with an AI and interactively build a strong requirements document. It should be tightly specified with no openings. Then hand over the document to a code generator with periodic check points where you evaluate even at functional level and only then you proceed to the next phase. I asked Gemini, one of the frontier AI’s I use regularly why I seem to have a reasonable success. This is the reply I got:
Do not ask an AI to write software. Ask an AI to help you build a strict Technical Specification Document that defines the physical, mathematical, and architectural boundaries of your problem. Then, feed that specification into a multi-file development agent as an absolute rulebook.
This shifts the AI from a developer writing unoptimized code by guesswork into a precision machine executing an explicit specification..
Anyway, let us see where this ends up and let us decide at the end of this experiment. Meanwhile, let me leave you with this thought; A judicious use of this technology will allow more people to realize their dream even if the ride is bumpy. Don’t give up. This world need more dreamers even if many fail.