Best practices para publicar un WebSite con SharePoint Server 2010
-
Upload
juan-andres-valenzuela -
Category
Technology
-
view
212 -
download
0
description
Transcript of Best practices para publicar un WebSite con SharePoint Server 2010
Buenas Prácticas para publicar tu
“website” con Microsoft SharePoint
2010
Juan Andrés Valenzuela, MVP SharePoint Server@JANDRESVAL | http://jandresval.wordpress.com
Best Practices for Capacity Management
Capacity Planning
Architect for Scale
Pilot & Test
Deploy
Monitor & Validate
Objetivos
• Control de la Carga de Contenidos
– OutPut Cache
– Object cache
– Blob Storage
• Eficiencia y Eficacia
– ASP.Net Post-Cache Substitution
• Disponibilidad del Contenido– Deployment Content
The case for caching
# of Front-end Web Servers
Where’s the bottleneck?
Web server CPU utilization should be the bottleneck
Key Scale Tools: The Caches
Output cache
• How to set it up
– Site Settings Site Collection Cache Profiles
– Site Settings Site Collection Output Cache
• Cache profiles give you granularity
– Anonymous vs. authenticated
– Different caching behavior for certain page layouts
– “Vary By” parameters
Recommended cache configuration
• For site visitors
– Public Internet cache profile
– Don’t enable “check for changes”
– Minimize vary by parameters
• For authors/admins (authenticated users)
– Consider not caching
Tip: Making sure the output cache is working…
Monitoring the output cache
• A cache miss is more expensive than rendering a page without caching
• Lots of cache trimming? Tweak duration or scale up web servers
A classical debate
Fast and fresh
ASP.Net Post-Cache Substitution
• Sometimes you want completely “dynamic” content elements on an otherwise
cached page.
ASP.Net Post-Cache Substitution
• You can achieve exactly this behavior, by writing a custom control that inherits from the System.Web.UI.WebControls.Substitution class.
– The rest of the page will be output-cached, but this control will be called to render on every request.
• Key consideration: Your control will be run on EVERY request… plan carefully.
SharePoint Object Cache
• What is the Object Cache?
– An in-memory cache of results to “Cross-List Queries” against your SharePoint site.
– Used to cache the results of queries that can span lists and sites within a Site Collection.• But also good for caching results of queries within a single list.
• You’re probably already using it! (And it’s “always on”)
Configuring the Object Cache (Cont’d)
• Key Configuration Decisions
Parameter Name Decision General Principle
Object Cache Size How big do you want the Object Cache to be? Bigger is better (make sure you have enough RAM)
Cache Changes Do I want a purely time-based cache, or should every request check to see if cache is still valid?
Checking for changes == more workper cached request
Results Multiplier Should we cache more results than the user asked for?
Only useful in scenarios where different users have different permissions…
Configuring the Object Cache (Cont’d)
• Configure the two “super” accounts used by the Object Cache via PowerShell:
$wa = Get-SPWebApplication -Identity "<WebApplication>" $wa.Properties["portalsuperuseraccount"] = "<SuperUser>" $wa.Properties["portalsuperreaderaccount"] = "<SuperReader>" $wa.Update()
Account Name Permissions it should have
SuperUser Full Control User Policy for the Web Application
SuperReader Full Read User Policy for the Web Application
What happens when you don’t use the Object
Cache…
What happens when you don’t use the Object
Cache…
• What went wrong?– The hero control (which was implemented as a
Sandboxed Solution) was using the non-cached SharePoint API, instead of the cached API.
– The site was launched, and as soon as it got real load, the Sandboxed Solution throttling system (correctly) stopped executing the control.
Good
Bad
Using the Object Cache from client-side code
• To build a client-side solution (Silverlight/AJAX/Flash/etc.) that queries SharePoint data:
1. Write a web service that wraps the Object Cache and executes cache queries
2. Make sure your solution calls your web service.
Do NOT use the SharePoint client object model… it is un-cached.
SharePoint Disk-based BLOB cache
• What is it?
– A cache that stores files on the web-front end’s disk drive.
• Why should you use it?
1. Less rendering work for SharePoint
2. Fewer bytes-over-the-wire for users visiting your site
3. Support for HTTP range requests for media files
Configuring the BLOB cache
Edit the following line in web.config: <BlobCachelocation="C:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="10" max-age="86400" enabled=“true"/>
Configuring the BLOB cache - Pasos
Enable Filestream SQL Server
Configuring the BLOB cache - Pasos
Install RBS
Enable RBS
Configuring the BLOB cache - Pasos
Configuring Blob Storage
Content Deployment
Content Deployment - Topologies
Content Deployment
• Authoring Farm • Production Farm
Content DB
EMM Term Store
Content Deployment
SSPProxy
Content DB
Search Index Search Index
Content Deployment - Types
Content Deployment - Security
Content Deployment - Consideraciones
Content Deployment Best Practice #1:
SQL Server Enterprise Edition & Snapshots
Content Deployment + SQL Server Enterprise
= No export failures due to on-going authoring activity.
Content Deployment Best Practice #1:
SQL 2008 Enterprise Edition & Snapshots
(Cont’d)
Central Administration
Manage Content Deployment Paths and Jobs
<Your Job>
Content Deployment Best Practice #2:
Custom Solutions & Content Deployment
Custom Solutions MUST be “aware” of Content Deployment
Many custom solutions add/modify Content DB objects (and fail if they can’t add/modify the objects).
The pattern we see in many custom solutions:
1. Admin activates solution on SOURCE of Content Deployment1. Objects are added to the Content DB
2. Content Deployment will then do the following on the TARGET:1. Deploy the content objects to the target Content DB
2. Automatically activate the custom solution (FAIL)
Otras Buenas Prácticas – Topologías
Buenas Prácticas para publicar tu
“website” con Microsoft SharePoint
2010
Juan Andrés Valenzuela, MVP SharePoint Server@JANDRESVAL | http://jandresval.wordpress.com