SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App
-
Upload
edin-kapic -
Category
Technology
-
view
104 -
download
2
description
Transcript of SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App
7 Key Things for Building a Highly-Scalable SharePoint 2013 App
#SPSSTHLM08Edin KapićJanuary 25th, 2014
SharePoint Saturday
Stockholm
Thanks to our sponsors!
SharePint
Silver
Bronze
Raffle
Platinum
Gold
Works for Spenta / Beezy in Barcelona
SharePoint Server MVP
President of Catalonian SharePoint User Group (SUG.CAT)
Edin Kapić
I wonder if this beer could be
SharePint compatible
Scalability[skeɪləˈbɪlɪtɪ] n, the ability of something to adapt to increased demands
4
Hey boss, we have 1M new users for our web app!!...and they all sign up tomorrow!
Scalability
Scalability
Not scalable Scalable
Scalability
#FAIL
Scalability
#COOL
SharePoint 2013 Apps Architecture
SharePoint 2013 Application Architecture SharePoint 2013 Apps are cloud-based
SharePoint is now just another external system
Minimize round trips
What can we learn from Star Wars?...beyond who is Luke’s father...
13
With the cloud, we have potential for scalability and high
availability
But the architecture must enable it
(It doesn’t come out of the box)
I assure you, Emperor, that this Death Star
has been designed to withstand any attack.
I find your lack of failover
disturbing…
Now back to our regular programme
SharePoint 2013 Application Architecture
Session Overview Avoiding Roundtrips
Effective Caching Mechanisms Content-Delivery Networks
Avoiding Bottlenecks Avoiding Storage Locks Waiting in a Queue is Not Bad Acting Asynchronously
Avoiding Single Point of Failure Redundant Design
SUM
MARY
SharePoint 2013 Application Architecture
Effective Caching Mechanisms
Effective Caching Mechanisms Caching is the cheapest way to avoid unnecessary roundtrips
Local Cache Small, static data, very frequently
accessed
Distributed Cache Everything that you reasonably can
Stale Data
Content Delivery Networks (CDN)
• Big binary storage in the cloud
• Bypass the Processing• Public BLOBs can be accessed by URL
• Shared Signatures• Private BLOBs can be accessed by special URL
BLOB Storage
Content Delivery Networks (CDN) Big binary storage close to the user
No need to serve from the cloud First user pays the “toll”, others get it free
Offload Images Scripts Media Files
Versioned URLs
Avoiding Storage Locks
Click to insert photo.
Storage Locks
(in essence)
Avoiding Storage Locks
RDBMS vs NoSQL SQL Azure vs Table Storage
Immediate Consistency vs Eventual Consistency. ..
Avoiding Storage Locks
Sharding Partition your data across
multiple databases or storages
JOINs across shards
SQL Azure Federations
Shards
A-F
G-O
P-Z
Data Access
Partition Keys
Avoiding Storage Locks
Command-Query Responsibility Segregation(CQRS)
30
Source: Udi Dahan
Waiting in a Queue is Not Bad
Waiting in a Queue is Not Bad Request/Response doesn’t scale well
By queuing the requests we have control
To decouple the request and the response To do retries and accomodate node loss To throttle the rate of service To scale up and down depending on the workload
Web Back-End
Message Queue
Waiting in a Queue is Not Bad
Azure Queues
Low-Level
Pass messages between roles and sites
Fully decoupled R/W operations Automatic Load Balancing
Azure Service Bus Queues
High-Level
Messaging framework with queues
Publisher-Subscriber Transactions
Waiting in a Queue is Not Bad
my-account
Submit-queue
Joe’s Job
Mary’s Job
Calc-queue
Andy’s Job
Storage Account
Queue
Message
Azure Queues
Submitter
Processer
Acting Asynchronously
Mr. Sync and Mr. Async
(and a customer)
Web Tier
DataTier
Acting Asynchronously We can optimize the server throughput with async calls to the next tier
Just got easier in NET 4.5 with async/await
Web Tier
Thread#1
DataTier
Request 1
Response 1
Request 2
Thread#1
Request 1
Response 1
Request 2
Redundant Design
Redundant Design If any single node goes down, your app must continue unhindered
Although some delay is OK
Idempotent operations Load-balancing
Image: Rainer Knäpper, License: artlibre
Redundant Design Azure Traffic Manager
Redundant Design
Summary
7 Key Things for Building a Highly-Scalable SharePoint App1. Caching2. Content Delivery Network / BLOB Storage3. NoSQL4. Sharding5. Queuing6. Asynchronous Processing7. Redundant Design
SUM
MARY
Additional Resources High Scalability
http://highscalability.com/
Advanced Patterns in Cloud-Hosted Apps for Microsoft SharePoint http://
channel9.msdn.com/Events/TechEd/NorthAmerica/2013/SES-B301
...and visit our sponsors who made this day possible!
Thank you!
Please rate this session...