tgvashworth / pldn.io

All your front–end dependencies via one script tag. Minified, concatenated and cached.
http://js.pldn.io/
54 stars 3 forks source link

CDN it up. #4

Closed tgvashworth closed 11 years ago

tgvashworth commented 11 years ago

pldn.io has been dermatologically tested, proving that directly accessing cdnjs is way, way faster. This is not ok.

http://i.cloudup.com/D6nADdTuX9.png

jackfranklin commented 11 years ago

I think it's always going to be a bit slower though, right, at least for a non-cached thing. How long does it take if the request is cached?

I do think 103 vs 549ms is too much of a gap, but at the end of the day I think especially in a dev environment people are willing to sacrifice a bit of speed for ease of use. pldn.io is definitely something that will be for the dev environment, not production, IMO.

Plus, (this is the limits of my knowledge right here so this could be BS, I aint no sysadmin :P), but it currently being on the free tier of Heroku is probably not helping the speed, right?

keithamus commented 11 years ago

Likelyhood is that most of the speed differential is due to geographical location. This is one of the biggest advantages to using a CDN - they have multiple servers across different geographic ranges.

You can set up Heroku dynos in two geographic areas, the US and EU. Read more here. AWS has many more and may be a better alternative.

tgvashworth commented 11 years ago

Yeah, agreed, it's geographical. Heroku do have multiple regions, but I don't think that's the solution. My plan is to set up Cloudfront to distribute it geographically and improve load times.

tgvashworth commented 11 years ago

Better - through CloudFront:

http://i.cloudup.com/sDrhuqS1v5.png

tgvashworth commented 11 years ago

Closing becuase js.pldn.io is now behind Cloudfront.

jackfranklin commented 11 years ago

NICE