Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xmage server uses excessive network bandwidth #2812

Open
Daenyth opened this issue Jan 23, 2017 · 7 comments
Open

Xmage server uses excessive network bandwidth #2812

Daenyth opened this issue Jan 23, 2017 · 7 comments
Assignees

Comments

@Daenyth
Copy link

@Daenyth Daenyth commented Jan 23, 2017

I was talking today with a server operator who runs both cockatrice and xmage servers, and they mentioned that the XMage server consumed over 500gb of network in one day for 200 users, where the cockatrice server used 250gb for 23 days with 600 users.

It sounds like you're using an xml or json based protocol. Cockatrice used to use an xml one, and when we switched to using Protocol Buffers, network traffic dropped by over 95%.

This matters quite a lot for players or server operators who are on metered internet. The situation I mentioned above came up because the operator discussed that he had originally moved the xmage server to a cheaper but bandwidth-metered server and had to change it again due to the heavy traffic requirements.

@magenoxx
Copy link
Member

@magenoxx magenoxx commented Feb 12, 2017

Interesting note on protocol buffers. Let me look into what can be done.

@magenoxx
Copy link
Member

@magenoxx magenoxx commented Apr 19, 2017

Reproduced issue in tests, working on changes on protocol.
See feature/network_bandwidth branch

@JayDi85
Copy link
Member

@JayDi85 JayDi85 commented Apr 20, 2018

It's a users and active games list. I've got 1 GB income traffic in xmage client by 6 hours (not matches, only active online users list and tables):

shot_180420_102745

@LevelX2
Copy link
Contributor

@LevelX2 LevelX2 commented Apr 20, 2018

It's the user list and the games table that is completely transfered about every 2 seconds.
There is for sure potential to reduce.

@Daenyth
Copy link
Author

@Daenyth Daenyth commented Apr 20, 2018

Is the protocol event based? In cockatrice we use a "user joined/left" and "game created/removed" event from the server. Would be a rather massive win

@theelk801
Copy link
Contributor

@theelk801 theelk801 commented Apr 24, 2018

I'd be interested in helping with this, however it's not something I know a lot about. What would be a good way for me to learn?

@JayDi85 JayDi85 mentioned this issue Apr 24, 2018
@JayDi85
Copy link
Member

@JayDi85 JayDi85 commented Mar 1, 2019

250 players online example from last commit 38293e4:

  • old version downloads 1.7 MB per minute;
  • new version downloads 1.0 MB per minute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants