Private CDN for hosting data on SharePoint for improving performance
App Dev Manager Michael Mano shares some tips to improve SharePoint performance using a CDN.
One way to significantly improve performance around this content is to use Private CDN for assets that change very infrequently. This can be done by hosting the assets in a CDN and then referencing them from the CDN endpoint. Depending on the amount of data you host in the CDN, this approach can dramatically improve performance.
The implementation is relatively simple. All you have to do is create a Private CDN in O365, move the files, then reference it in your code– SharePoint takes care of the rest.
Here is a sample to configure a web part:
- Install the new (version 16.0.6008.1200) Tenant Administration PS from https://www.microsoft.com/en-us/download/details.aspx?id=35588
- Using SharePoint Online Management Shell to connect to the tenant admin
- Set-SPOTenantCdnEnabled -CdnType Private -Enable $true
- Add-SPOTenantCdnOrigin -CdnType Private -OriginUrl site/subsite/picturelib
- (use relative path)
- Wait for up to 15 minutes for the configuration to propagate through the farm
You can configure any of your libraries to use the CDN as well with the steps above this will drastically improve your overall site performance.
Here are some helpful links to get started with CDN.
CDN with SPO –