CDN vs FTP.. which is better - azure

I've been developing a site through microsoft azure. Been doing some styling with bootstrap and wanted to know if pulling the bootstrap library through CDN is faster or pulling it from my directory is faster after DEPLOYING? what will u suggest performance wise

CDN itself caches the files for specific timeperiod which makes it deliver the content faster. This adds an advantage when user first time visits your site. Also CDN have its geographical advantages. Also since the cache is shared between the users there will be minimal load on original server.I hope this would help you.

Related

Azure CDN Purge and Custom Caching Rules

The Issue
I am currently building a PWA that is hosted on Azure and utilises Azure CDN Premium.
Within this PWA, we have the following files:
/service-worker.js
/js/translations/en-us.json
/js/translations/en-hk.json
etc...
When a release is deployed to the storage blob, we trigger a CDN 'purge' that is meant to tell the edge nodes to re-retrieve the assets from the origin storage account.
However, for some reason, the CDN is still returning old versions of these files, despite the storage account having the latest versions (I have left it over 10 hours so not a propagation issue).
Why is this happening? The whole point of a 'purge' is to empty the cache...
I appreciate that there may also be downstream caches beyond the nodes but I never have these problems with AWS and therefore I can only come to the conclusion that it is because Azure is either doing something badly, or I am misunderstanding how it is meant to work.
Possible Solutions
I have come up with possible solutions to this, however, because I am fairly new to Azure, I want to get other's opinions on what the best solution is...
Use Query Strings and Set the relevant Cache mode
I am aware that I could use just use query strings on these files (apart from service-worker.js), however, I do not feel confident this is the best solution.
Custom Rules Engine
Alternatively, I can define custom rules to instruct the CDN to skip the cache for certain files. This kind of defeats the purpose of a CDN though. Which goes back to the question, why is Azure not purging these assets properly...
If this is the best solution, please could someone advise me on the what rules I should define?

Is there any other way to improve Azure CDN latency?

I'm trying to improve the latency of CDN. The particular website will be accessed all over the world. Earlier the website wasn't provided using CDN but because of the slowness, used CDN but still getting the JS file from the CDN is very slow for two people on the same part of the world. I am not talking about accessing on the first time. It is happening randomly very often.
If it happens randomly very often, it sounds like there's something wrong with your caching settings.
To confirm that a file is actually coming from CDN, investigate the network traffic in your browser. If the file came from CDN it will have a "X-Cache: HIT" response header.
If you can't reproduce it yourself, click a "Manage" button in your CDN profile. It will open a management window for your CDN and there you can see total "hits" and "misses" for your files, if there's a lot of misses, that will indicate you are having a lot of files not going through CDN and should investigate your caching settings.
Also you should see if your files come out from CDN compressed. Based on your CDN and server settings, it's possible that uncompressed files are cached in the CDN.
If everything looks ok, a way to speed up Azure CDN is to use Dynamic Site Acceleration in addition to caching. It helps with potentially faster SSL negotiation and other network improvements.
https://learn.microsoft.com/en-us/azure/cdn/cdn-dynamic-site-acceleration

What is the best speed optimization for Joomla based Social network (Easysocial)?

I am building (development phase) a Social Network site on Joomla 3 with Easysocial, Easyblog and EasyDiscuss as main extensions, using it on a shared host which has Varnish cache (static+dynamic) enabled and I am looking forward to use AWS storage and CDN.
My question is : What is the best speed optimization could be in this scenario. As main component would be creating dynamic content by users frequently and some instant features like chat, like, comment, friend request etc is included .
Previously I have activated CloudFlare free version to test leaving default settings and some features either was not working or working after 2-3 min. Please suggest me ? Also if possible suggest possible cache time, htaccess config, Etag options etc, whatever needed.
Thanks.
Install memcached - this will speed up a little, few times at least

I need to speed up my site and reduce the number of files calls

My webhost is aking me to speed up my site and reduce the number of files calls.
Ok let me explain a little, my website is use in 95% as a bridge between my database (in the same hosting) and my Android applications (I have around 30 that need information from my db), the information only goes one way (as now) the app calls a json string like this the one in the site:
http://www.guiasitio.com/mantenimiento/applinks/prlinks.php
and this webpage to show in a web view as welcome message:
http://www.guiasitio.com/movilapp/test.php
this page has some images and jquery so I think this are the ones having a lot of memory usage, they have told me to use some code to create a cache of those files in the person browser to save memory (that is a little Chinese to me since I don't understand it) can some one give me an idea and send me to a tutorial on how to get this done?. Can the webview in a Android app keep caches of this files?
All your help his highly appreciated. Thanks
Using a CDN or content delivery network would be an easy solution if it worked well for you. Essentially you are off-loading the work or storing and serving static files (mainly images and CSS files) to another server. In addition to reducing the load on your your current server, it will speed up your site because files will be served from a location closest to each site visitor.
There are many good CDN choices. Amazon CloudFront is one popular option, though in my optinion the prize for the easiest service to setup is CloudFlare ... they offer a free plan, simply fill in the details, change the DNS settings on your domain to point to CloudFlare and you will be up and running.
With some fine-tuning, you can expect to reduce the requests on your server by up to 80%
I use both Amazon and CloudFlare, with good results. I have found that the main thing to be cautious of is to carefully check all the scripts on your site and make sure they are working as expected. CloudFlare has a simple setting where you can specify the cache settings as well, so there's another detail on your list covered.
Good luck!

My Windows Azure MVC3 application is slow. How can I see what's wrong?

I have deployed my Windows Azure application to the cloud. Now that it's running it seems to be slow. Some pages taking up to three seconds to return and all the look ups are to table storage with direct key lookups.
It's not very significant but when I check with fiddler I see all of my web requests are resulting in Status codes 200. Even those for the CSS. Is this expected. I thought the CSS would be cached.
Getting back to the original question. When performance is slow is there a way I can work out why? I already set the solution configuration to "Release". What more is there that I can do?
Any tips / help would be much appreciated.
For investigating the problems in production, you could try using StackOverflow's profiler to work out where the slowness is occurring - http://code.google.com/p/mvc-mini-profiler/
For looking at how to encourage browsers to use cached content for css, js and images, I think you can just use web.config files in subfolders - see IIS7 Cache-Control - and you should also be able to setup gzip compression.
You can try http://getglimpse.com
Seems promising
Put your files in the Azure storage and provide cache instructions:
Add Cache-Control and Expires headers to Azure Storage Blobs
If you want to do it from IIS, provide the proper HTTP caching instructions to the browser.
Best practices for speeding up your website.
Anyway, you have to provide more details about what are you doing. Are you using Session? how many queries launch each page?
The fact that in your computer, with just one client (you) goes fast, doesn't mean the application is fast, you have to try with lots of users in order to ensure there is no bottlenecks, contention locks, busy resources etc.. etc..

Resources