Thread Starter
TNELN
(@tingaliin)
I send a request to graph which returns a response found header Location which is the CDN, but it is a CDN in US, I only replace the found CDN with another which is the nearest I know.
I have heard that there is a mechanism by which graph.facebook.com can upon a request decide the nearest CDN based on ip to and send back a found Location response. But this has not been observed.
Thread Starter
TNELN
(@tingaliin)
This however cuts the load time with 1 sec.
I hace a code.
The thing is I can only replace it with a known CDN, but instead I want to replace it with the nearest CDN. Maybe add a separate function backend where you can add a string (for specific CDN) for “developesr”?
Thread Starter
TNELN
(@tingaliin)
Fetching Profile Photo using graph.facebok.com will correctly return a photo from one of “akamaihd.net” CDNs in my location, this is very fast. But fbcdn.net seem always return a photo from “scontent.xx.fbcdn.net” located in the U.S.
Thread Starter
TNELN
(@tingaliin)
I can see now with Wireshark that a nearby CDN from fbcdn.net was chosen (not in my country), but it is still very slow.
Thread Starter
TNELN
(@tingaliin)
Could it be some of my own content like js scripts that is actually blocking loading of photos from Facebook Post Photos?
I don’t think it has anything to do with your scripts etc.
I’ve put a question into the Facebook Developers about this issue. Get back with you when I know something more.
Spencer
Thread Starter
TNELN
(@tingaliin)
I have tried Wireshark and Traceroute to find out from which CDN Post Photos are fetched, these seems indeed to be correctly served from a nearby CDN (Ireland, maybe chosen by “fbcdn.net” with some load balancing mechanism) but from not my country (Sweden), this server is very slow. I have read that Facebook started two data centers in northern Sweden recently but I don’t know what kind of data they are serving from there.
Profile Photos are instead served from “akami” servers located in Stockholm (this is very fast). This may explain why it is slow. Also connections to “graph.facebook.com” is relatively slow.
Another thing is Post Photos are not appearing in Internet Explorer 8.
Thanks for your help π
Very nice research, I too came up with similar results. I’ve found this facebook group to be really helpful. Possibly you can gain some more insight here too. https://www.facebook.com/groups/fbdevelopers/
As for IE8 that’s probably because we are not defining a size for the images. We are not supporting IE6-IE9 in our plugins sadly. Those browsers need to be buried, it’s 2015 already π
Spencer
Thread Starter
TNELN
(@tingaliin)
Thanks.
On fbdevelopers I was advised to send a bug report.