optimizing public facing sharepoint sites

23
Optimizing public facing SharePoint sites Gunnar Peipman IIS/ASP.NET MVP http://weblogs.asp.net/gunnarpeipman/ [email protected]

Upload: gunnar-peipman

Post on 13-Dec-2014

510 views

Category:

Technology


1 download

DESCRIPTION

Session about how to optimize public-facing sites built on SharePoint publishing infrastructure. Session is based on real-life experiences and provides valuable information to all SharePoint developers who build sites using SharePoint publishing infrastructure. It was special session for SPUG.fi community meeting.

TRANSCRIPT

Page 1: Optimizing public facing SharePoint sites

Optimizing public facing SharePoint sites

Gunnar PeipmanIIS/ASP.NET MVP

http://weblogs.asp.net/gunnarpeipman/[email protected]

Page 2: Optimizing public facing SharePoint sites

About me

Name: Gunnar PeipmanFrom: Tallinn, EstoniaMVP: ASP.NET MVP for 4 yearsJob: developer, architect and

consultantCommunity: ENETA, speaker,

bloggerHobbies: new technology,

heavy metal, beers, national cuisines, travelling

Happy boyfriend, father, step father and owner of funny white rabbit

Page 3: Optimizing public facing SharePoint sites

Agenda

Characteristics of public facing sitesWhy SharePoint Publishing Infrastructure?Caching filesOutput cacheUsing CDN-s

Page 4: Optimizing public facing SharePoint sites

Session objectives

After this session you should understand:performance problems of public facing

siteshow caching works in SharePointhow to plan and configure cachinghow to measure cache

Page 5: Optimizing public facing SharePoint sites

Characteristics

Accessible by anonymous usersHarder to estimate server loadMostly one-way communication

(this is what MS thinks)Different needs (design, SEO)Different publishing process

Page 6: Optimizing public facing SharePoint sites

SharePoint Publishing Infrastructure

Targeted to public web sites and corporate in-house portals

Perfect fit for corporate information publishing

Publishing workflowsDifferent optimization options

Page 7: Optimizing public facing SharePoint sites

Caching files

Page 8: Optimizing public facing SharePoint sites

Request to page

Every file referencemeans new request

Most files are kept inSharePoint libraries

Professional designmeans hundreds offiles

Plus dynamically loaded files

Page 9: Optimizing public facing SharePoint sites

Same time in server...

Page 10: Optimizing public facing SharePoint sites

What is BLOB cache?

Files from doc libraries are cached to front-end servers

Perfect fit if per page load many requests are made to server

Perfect fit also for large filesSupport for e-tagsYou save:

◦Some database connections and queries◦Loading files to database server memory◦Moving files from db server to web server◦Some traffic

Page 11: Optimizing public facing SharePoint sites

How to optimize

Keep blobs on separate physical diskEvery front-end server must have its own

blobs folder or diskIf disk crashes or you delete files from

blob cache you must reset blob cacheBlob cache may slow down your site for a

moment when files are copied to diskWhen measuring start from second

request

Page 12: Optimizing public facing SharePoint sites

Output cache

Page 13: Optimizing public facing SharePoint sites

Caching pages

Built on ASP.NET cachingOutput cache is served from memoryPossible to define cache profilesProfiles can be assigned to page layoutsCode-based policiesPossible to define non-cached areas

(called also donut hole caching)

Page 14: Optimizing public facing SharePoint sites

Don’t over-cache!

Again: Output cache uses server memory!

Morning:

Noon:

Afternoon:

Evening:

Page 15: Optimizing public facing SharePoint sites

How to measure cache?

Use ASP.NET and SharePoint performance counters

Make sure counters are not updated too often – it puts markable load on server

Measuring must be long enough to see how cache is actually used

No app-pool recycle or iisresetIf ~85% of requests are served from

cache you are okay

Page 16: Optimizing public facing SharePoint sites

Output cacheData from real-life scenario

Page 17: Optimizing public facing SharePoint sites

About measuring process

Performance counters on productionInterval 15 secondsCounters:

◦Total number of objects added◦Total object discards◦Cache hit count◦Cache hit ratio

Duration: 12h (work hours fully covered)No interruptions

Page 18: Optimizing public facing SharePoint sites

Results

Page 19: Optimizing public facing SharePoint sites

Content Delivery Networks (CDN)

Page 20: Optimizing public facing SharePoint sites

CDN servers

Page 21: Optimizing public facing SharePoint sites

Using CDN-s

Files are hosted on other serversUsers get files from closest serversMany popular JS libs are available in

Google and MS CDN serversYou can build your own CDN using

Windows Azure servicesPoint of trouble: wider internet outage

Page 22: Optimizing public facing SharePoint sites

Q&A

Page 23: Optimizing public facing SharePoint sites

Thank you!