Giter Club home page Giter Club logo

Comments (4)

willardf avatar willardf commented on August 10, 2024

Hmmm, regional disconnects is pretty tricky. We have already had to make small changes to the protocol to avoid some country-specific firewalls, so it's possible this could be another. But I haven't heard any significant reports from Among Us...

How many players are on the server at peak and how many packets are being sent? Is there any risk of CPU bottlenecking? Which ConnectionListener can also be a factor. Dtls is far more expensive than Udp.

from hazel-networking.

aviv0099 avatar aviv0099 commented on August 10, 2024

Hmmm, regional disconnects is pretty tricky. We have already had to make small changes to the protocol to avoid some country-specific firewalls, so it's possible this could be another. But I haven't heard any significant reports from Among Us...

How many players are on the server at peak and how many packets are being sent? Is there any risk of CPU bottlenecking? Which ConnectionListener can also be a factor. Dtls is far more expensive than Udp.

I use UdpConnectionListener, I also don't send a lot of packets - the tick rate is 10 packets per second for syncing the players.
The problem happens when I have 30 ccu players(lowest) and I had no slowdowns when I had 700 ccu, its mainly for turkey players(some of them).(cpu is under 40% usage most of the time)
I saw a lot of among us reports about this exact errors:
https://www.reddit.com/r/AmongUs/comments/ioroxs/sent_6_pings_that_the_remote_has_not_responded_to/
https://www.reddit.com/r/AmongUs/comments/ihc9t8/sent_6_pings_that_remote_has_not_responded_to/
https://www.reddit.com/r/AmongUs/comments/j0033o/something_i_noticed_about_the_6_pings_issue/

Did you do something to fix it or it was fixed by itself? Can you point me to where I should start?
Thank you for this amazing tool!

from hazel-networking.

willardf avatar willardf commented on August 10, 2024

Yeah, so to be clear, these two errors are very common because they are the generic "Disconnected" error. Since you mentioned Turkey, I assumed that it might be regional since we have seen firewall issues in the past, but it doesn't really sound like that's the case here.

The other thing that could be regional-specific would be packet size. If you send a packet that is larger than about 800 bytes, you may start to see increased packet drop. This would get really bad up until 1200 bytes where it's nearly 100% drop rate. This is called MTU and Hazel has no built in features to fix it, but we did add a statistic to detect it: UdpConnection.Statistics.FragmentableMessagesSent. Looking at it now, you might want to adjust ConnectionStatistics.ExpectedMTU to be 800. As the code comments mention 576 is the smallest MTU, if you want to be extra strict, that's a good value to check too.

It definitely sounds like it's not a server issue. It's possibly a client error, but it would suggest that the game is hanging or failing to handle messages for multiple seconds, so that's unlikely. Therefore it's probably a network issue, which are very tricky to resolve. Could also be a bug, but that also will take a lot of digging to figure out.

Really hopeful that MTU tracking helps because I'm afraid I won't be too much help otherwise.

from hazel-networking.

aviv0099 avatar aviv0099 commented on August 10, 2024

Yeah, so to be clear, these two errors are very common because they are the generic "Disconnected" error. Since you mentioned Turkey, I assumed that it might be regional since we have seen firewall issues in the past, but it doesn't really sound like that's the case here.

The other thing that could be regional-specific would be packet size. If you send a packet that is larger than about 800 bytes, you may start to see increased packet drop. This would get really bad up until 1200 bytes where it's nearly 100% drop rate. This is called MTU and Hazel has no built in features to fix it, but we did add a statistic to detect it: UdpConnection.Statistics.FragmentableMessagesSent. Looking at it now, you might want to adjust ConnectionStatistics.ExpectedMTU to be 800. As the code comments mention 576 is the smallest MTU, if you want to be extra strict, that's a good value to check too.

It definitely sounds like it's not a server issue. It's possibly a client error, but it would suggest that the game is hanging or failing to handle messages for multiple seconds, so that's unlikely. Therefore it's probably a network issue, which are very tricky to resolve. Could also be a bug, but that also will take a lot of digging to figure out.

Really hopeful that MTU tracking helps because I'm afraid I won't be too much help otherwise.

Thanks a lot, and thanks for the explanation!
I will put into the client this statistic + more like packet loss and that will help me identify the problem.
btw this is the game, was a pleasure using this library!
https://store.steampowered.com/app/1904820

from hazel-networking.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.