AmandaDiscord / Volcano

A light-weight LavaLink compatible replacement
MIT License
71 stars 15 forks source link

Questions #13

Closed itsmishra19 closed 2 years ago

itsmishra19 commented 2 years ago

Hey,

I am Rajat Mishra, I was looking for alternatives to Lavalink because I don't like JVM eating a lot of memory, I still prefer space complexity over time complexity because it's cheaper to run applications that use high memory rather than running applications that require a lot of CPU power. So I wanted a few clarifications from you.

  1. How many players a single volcano instance can handle and at what resources?
  2. Is there any way to avoid YouTube rate limits, something like providing an IPV6 /48 block.
  3. Is there any official documentation or implementation guide since this package lacks that
  4. If this package supports IPV6, can that block be used to make requests to other APIs that can give rate limits?

I need something that can handle ~3K active connections and at a reasonable resource usage.

Thank You

PapiOphidian commented 2 years ago
  1. I haven't been able to hit the upper limit of what Volcano can handle yet even though I run Volcano on a pretty low tier VM. My bot is only in ~6.8k guilds and I've personally seen upwards of 30 connections with minimal impact.
  2. Volcano does not implement ipv6 requesting as that may come down to the lib it uses to get yt track info. I can pester the dev if that is something people have interest in, even though ipv6 addresses and blocks get banned more often than a single ipv4 in my experience. Volcano does support googlevideo urls, so you can proxy tracks through another service and pass them to Volcano
  3. LavaLink's docs are what people should be referring to as Volcano tries to mimic its API very closely.
  4. Same as 2. I can add it if ipv6 is something people want.

If you shard instances properly, I'm sure this can handle 30k connections. Of course it won't be able to run that on a single instance unless you have a crazy core count and your machine is juiced like crazy. I would love for some more extreme numbers if people are able to provide!

itsmishra19 commented 2 years ago

I have a dedicated server of 128GB and 32 cores CPU. I currently have around ~1k-2.1k players, and yes Ipv6 block is really necessary for a bot of this scale IPV4 will not survive.

PapiOphidian commented 2 years ago

If all of that is on a single instance, I can see how a single ipv4 would not survive. I'll see what I can do regarding ipv6.

I'm confident in the ability of Volcano based on the numbers I have now, but the number 30k makes me a bit skeptical if almost 1k players would be spawned on each thread. Volcano itself could probably handle that no problem, but Volcano also pipes audio through ffmpeg to allow for volume transforming and that might be the killer. I'll look into alternatives for this and release an update including ipv6 support for what you requested if possible and also less usage of ffmpeg unless the track isn't opus encoded or you need op filters

itsmishra19 commented 2 years ago

If all of that is on a single instance, I can see how a single ipv4 would not survive. I'll see what I can do regarding ipv6.

I'm confident in the ability of Volcano based on the numbers I have now, but the number 30k makes me a bit skeptical if almost 1k players would be spawned on each thread. Volcano itself could probably handle that no problem, but Volcano also pipes audio through ffmpeg to allow for volume transforming and that might be the killer. I'll look into alternatives for this and release an update including ipv6 support for what you requested if possible and also less usage of ffmpeg unless the track isn't opus encoded or you need op filters

I run 5 instances of lavalink and also my volume and filters are premium locked but I give trials for 1.5 hour so it shouldn't be a big problem.

PapiOphidian commented 2 years ago

Volume transforming is still done regardless of what operations are being called, so ffmpeg will spawn for each player which is why I brought it up. Good to know that filters won't be a huge concern though. I am not smart enough to implement js native transforming to such a degree

itsmishra19 commented 2 years ago

Volume transforming is still done regardless of what operations are being called, so ffmpeg will spawn for each player which is why I brought it up. Good to know that filters won't be a huge concern though. I am not smart enough to implement js native transforming to such a degree

So when a track is played there are some volume operations regardless of any modifications to volume?

PapiOphidian commented 2 years ago

This is being closed as further details have been discussed in DMs and Volcano will mature into something that will cover concerns brought up in the future.