Forum Multiplayer Tips on reducing traffic?

Discussion and help relating to the PlayerIO Multiplayer API.

Tips on reducing traffic?

Postby Vania » August 5th, 2010, 7:48 pm

The thing is for the last 30 days I've used 32 MB.
-9 mb data received
-11 mb data sent
-12 mb webservice

When I'm testing on the development server the bandwidth use stays around 0.6 KiB/s and it doesnt go above 2 KiB/s.
That seems reasonably low.

The traffic used for data received/sent seems about right,
but why is the webservice bandwidth so high?

All I do is connect, load the list of rooms once in the lobby, load the list of levels from the database once(4, 29,52 KB), and connect to a room. Nothing fancy so I dont understand where the traffic is coming from.

Any ideas for reducing the webservice traffic?
Vania
 
Posts: 198
Joined: March 24th, 2010, 9:01 pm

Re: Tips on reducing traffic?

Postby Oliver » August 6th, 2010, 11:39 am

Hey Vania,

There was quite recently a thread about bandwidth usage which you might interesting:
multiplayer/webservice-bandwidth-t525?hilit=bandwidth

I looked up some stats from your game:
- There are 103 different connect-ids used to connect to your game (i guess that's unique users because it looks like usernames).
- It seems that you currently have 4 database objects that are fairly large (30232bytes total)
- I also took a dump of the relevant usage information as it looks right now (now-30days):

traffic.png
traffic.png (3.83 KiB) Viewed 10852 times


Whats interresting here is that it gives a bit of breakdown of how the traffic is used. We can see that Server-To-Webservice traffic is only about 0.5Mb, so that's not the big culpit.

We can also see that there have been 1396 BigDB loads. If we assume that all 12mb was used by just these loads, that gives an average bigdb object size of about 9kb:
(12 * 1 024 * 1 024) / 1 396 = 9 013.54728

So if your objects are that big, which seems to make sense since you have 4 and they're 30Kb in total, then thats the reason: you've done 1396 loads of about 9Kb sizes.

Of course, your objects are probably smaller since webservice traffic also includes all other webservice calls (connect, listrooms etc) and the overhead in making the http requests.

We're currently thinking about making a special "Resource Usage" page where you can get all the same information about the resource usage that i've shown you above. We're aware that the current way of presenting the information is too simple and does not give an overview of how the traffic was used.

I hope this helps; feel free to follow up with more questions if you want :)


Best,
Oliver

P.S) Where is your game? Can i see it? :D
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Tips on reducing traffic?

Postby fox1980 » August 6th, 2010, 2:35 pm

Hey Oliver,

As you may remember i also made a post about the webservice bandwith. I think it's great that you explain what's happening behind the scenes, but would it be possible for those stats that you post here to be published in the admin panel ?
It would make users happier and avoid these kinds of posts.
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: Tips on reducing traffic?

Postby Oliver » August 10th, 2010, 12:17 pm

You said:

I think it's great that you explain what's happening behind the scenes, but would it be possible for those stats that you post here to be published in the admin panel ?


But before that i said:

We're currently thinking about making a special "Resource Usage" page where you can get all the same information about the resource usage that i've shown you above. We're aware that the current way of presenting the information is too simple and does not give an overview of how the traffic was used.


:-)

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to Multiplayer