Forum GameFS GameFS Slow

Discussion and help relating to the PlayerIO game asset hosting and CDN solution, GameFS.

GameFS Slow

Postby vikreed » October 4th, 2017, 6:47 am

Hi,

We are testing in India for our game. When the game starts we are fetching few XML files(just few KB in size) which are kind of our config file. Sometimes they load within 4-5 seconds, but sometimes, they take more than 30 seconds. This is happening quite frequently with the full active internet as well.

I do have some logs to show, but they are mostly traces from our end. I can post them or send them via email, do let me know if they can help..

Thanks,
Vikreed Team
vikreed
 
Posts: 23
Joined: September 30th, 2017, 8:02 am

Re: GameFS Slow

Postby obelisk » October 4th, 2017, 11:04 pm

Mine isn't even connecting today...was fine a couple days ago, can't patch my game.

Starting to feel like pIO is going back to Yahoo service level days. :(

Code: Select all
Status:   Connecting to sftp.playerio.com...
Response:   fzSftp started, protocol_version=7
Command:   open "obelisk@sftp.playerio.com" 22
Error:   Connection timed out after 20 seconds of inactivity
Error:   Could not connect to server
obelisk
Paid Member
 
Posts: 34
Joined: March 14th, 2013, 3:39 pm

Re: GameFS Slow

Postby Henrik » October 6th, 2017, 5:29 am

Hey Vikreed,

When you load your GameFS files, what URL are you getting back from the client library for them? Are you getting back one for the domain r.playerio.com, or a CDN domain? What happens if you ping each domain from your location?

Obelisk,

Try again now, sorry about that, we were messing around with the SFTP server and it ended up in a weird state.
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: GameFS Slow

Postby vikreed » October 6th, 2017, 6:20 am

Hey Henrik,

We always get the https://r.playerio.com/r/**** link. is there a different Link for CDN.

Then we use AS3 loader to load the file. Please find code below.



private var configLoader:URLLoader;

var configServerPath = "/xml/config.xml";
var xmlURL:String=PlayerIO.gameFS(ModelConstant.Instance.playerIOgameID).getUrl(configServerPath,true);
configLoader = new URLLoader(new URLRequest(xmlURL));



Is there a better way to do it?


Also, we just went through the GameFs documentation again and realized there should are many options for file, Like permanent link, roll back to old version etc. I can see those for Png files, but can't see them for XML files.

Thanks,
Aseem
vikreed
 
Posts: 23
Joined: September 30th, 2017, 8:02 am

Re: GameFS Slow

Postby Henrik » October 6th, 2017, 6:36 am

If you call the PlayerIO.gameFS.getUrl() method, you will get a redirect link to r.playerio.com for about two weeks after you've modified your file, but after that you'll get the direct CDN link. (This is to make sure there are no caching mismatches).

If you authenticate first and call the client.gameFS.getUrl() method, you will probably not get a redirect link to r.playerio.com, but instead the direct CDN url to the latest version of the file, because when you authenticate, we send over a small blob of data to the client with info about GameFS files. I don't know if it's possible for you guys to authenticate first, and then load your XML config file, that would be the better option.

Either way, both options should just work, but in the redirect link case you need to go to r.playerio.com, which is located in the US, before you'll be redirected to a geographically closer CDN node to load the actual file.
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: GameFS Slow

Postby vikreed » October 6th, 2017, 6:52 am

Oh ok. That makes sense.

Also, is it possible to get permanent CDN link?
My customer base will be purely in India and countries around.
So is there a way, that I can directly upload a file in a server from an Indian/Asian region and can get a permanent link to it.

Thanks,
Vikreed team.
vikreed
 
Posts: 23
Joined: September 30th, 2017, 8:02 am

Re: GameFS Slow

Postby Henrik » October 6th, 2017, 8:31 am

Well, the permanent link goes to a specific version of the file, which means you can't update it, which defeats the purpose of the file in the first place. To get the game to load the latest version, you'd have to update the game binary, which defeats the purpose of a separate config file, because otherwise you could have just embedded the config data in the game binary directly...

So, no.

But it's really crazy that it takes several seconds to load the file. If you ping r.playerio.com, what's the round-trip time to it from where you are?
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: GameFS Slow

Postby vikreed » October 6th, 2017, 9:22 am

c:\>ping r.playerio.com

Pinging r.playerio.com [96.127.165.218] with 32 bytes of data:
Reply from 96.127.165.218: bytes=32 time=285ms TTL=49
Reply from 96.127.165.218: bytes=32 time=260ms TTL=49
Reply from 96.127.165.218: bytes=32 time=250ms TTL=49
Reply from 96.127.165.218: bytes=32 time=343ms TTL=49

Ping statistics for 96.127.165.218:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 250ms, Maximum = 343ms, Average = 284ms

c:\>

Thanks,
Vikreed Team.
vikreed
 
Posts: 23
Joined: September 30th, 2017, 8:02 am

Re: GameFS Slow

Postby Henrik » October 6th, 2017, 10:16 am

Well, that doesn't look too bad. I still don't understand how it can take several seconds to load the file? Are you behind some sort of http/https proxy that screws things up?

Can you use the Network tab in your web browser's developer mode to figure out what's happening and where the time is spent? Normally you should just get a redirect response back from r.playerio.com, and then the second response will go to the CDN, where you'll get the actual file, but I'm curious as to what's taking so long, us or the CDN? Or is the time spent in https negotiations?
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: GameFS Slow

Postby vikreed » October 6th, 2017, 5:55 pm

I don't know how to check Network via the browser. But instead, I pasted the r.playerio.com link on a browser and the XML was loaded in around 4-5 seconds.

But inside the app, sometimes, it does take more time and sometimes, it does load in 3-4 seconds.

Thanks,
Vikreed Team.
vikreed
 
Posts: 23
Joined: September 30th, 2017, 8:02 am

Re: GameFS Slow

Postby Henrik » October 7th, 2017, 6:04 am

In Chrome, right-click the page and choose "Inspect", then "Network" tab, then paste the r.playerio.com link in the address bar and load it, and look at the timing diagram.

Same in Firefox, but it's "Inspect Element" in the right-click menu.
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: GameFS Slow

Postby vikreed » October 7th, 2017, 5:49 pm

Tried it in Chrome, hope this helps.

https://imgur.com/a/stBEZ

Thanks,
Vikreed Team.
vikreed
 
Posts: 23
Joined: September 30th, 2017, 8:02 am

Re: GameFS Slow

Postby Henrik » October 7th, 2017, 7:07 pm

vikreed wrote:Tried it in Chrome, hope this helps.

Not really, since you clicked the button to filter only .js requests, which means the waterfall information on load times of the actual file doesn't show. :-)

Here's what it looks like for me: https://imgur.com/a/F1K4e

It takes 253 milliseconds to do the request to r.playerio.com, it returns a 302 redirect to the CDN, and then that request takes 10 milliseconds, because I'm very close to an edge node.
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: GameFS Slow

Postby vikreed » October 8th, 2017, 5:46 am

This looks similar to your screenshot :).

https://imgur.com/a/j9QUt

Thanks,
Vikreed Team
vikreed
 
Posts: 23
Joined: September 30th, 2017, 8:02 am

Re: GameFS Slow

Postby Henrik » October 8th, 2017, 6:57 pm

Well, if it takes you almost three seconds to reach r.playerio.com, and almost two to reach the CDN, then your internet is just weirdly slow. You had a ~250ms pingtime to r.playerio.com, that means it should take ~1s to get the response from it, not 3 seconds. Maybe your ISP is forcing you through some sort of proxy? Either way, I'm pretty confident that it's something on your end, your network.
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm


Return to GameFS



cron