Upload
nccomms
View
73
Download
1
Tags:
Embed Size (px)
Citation preview
Kapić
• SharePoint Architect• Works for Spenta / Beezy in
Barcelona, Spain
• SharePoint Server MVP
• President of Catalonian SharePoint User Group (SUG.CAT)
• Pluralsight Author
• Spreekt een beetje nederlands ;-)
sug.cat @ekapic
www.edinkapic.com
Scalability #awesome
Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7
Drawings/second 0 3 50 333 1660 3000 5400
Total drawings (M) 0 5 12 50 500 1000 2200
R/W latency (ms) 0 0,5 0,5 0,6 0,7 0,7 0,9
Servers 6 6 6 18 54 72 90
With the cloud, potential scalability you have…
…but architect for it you must…
…out of the box it comes not.
Photo Credit: JD Hancock
http://www.flickr.com/photos/83346641@N00/5813423429
http://creativecommons.org/licenses/by/2.0/
Photo Credit: Brian Neudorffhttp://www.flickr.com/photos/14125773@N00/6821487081http://creativecommons.org/licenses/by/2.0/
Photo Credit: JD Hancockhttp://www.flickr.com/photos/83346641@N00/3618602355http://creativecommons.org/licenses/by/2.0/
3 Guidelines, 7 Tenets
• Avoiding Roundtrips1. Effective caching mechanisms
2. Content-Delivery Networks and BLOB storage
• Avoiding Bottlenecks3. NoSQL storage
4. Sharding
5. Waiting in a queue
6. Acting asynchronously
• Avoiding Single Point of Failure7. Redundant Design
Effective caching mechanisms
• Caching is the cheapest way to avoid unnecessary roundtrips
• Stale data
Local and distributed cache
• Local cache• Small, static data,
very frequently accessed
• Distributed cache• Everything that you
reasonably can
Azure Cache(s)
• In-Role Cache• AppFabric caching in your local
machine
• Redis Cache• General purpose caching with rich
API
• Managed Cache
BLOB storage
• Big binary storage in the cloud
• Bypass the Processing• Public BLOBs can be accessed by URL
• Shared Signatures• Private BLOBs can be accessed by a special URL
Content delivery network (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
Storage types
RelationalSQL Azure
Immediate Consistency
Document/NoSQLTable Storage
Eventual Consistency
Sharding
• Partition your data across multiple databases or storages
• JOINs across shards
• SQL Azure FederationsShards
A-F
G-O
P-Z
Data Access
Partitionkeys
Queuing benefits
Decoupling
Retries and node failure recoveryThrottling and DDOS prevention
Autoscaling
Web Back-End
Message Queue
Azure queues
Azure Storage queues
• Low-Level
• Pass messages between roles and sites
• Fully decoupled R/W operations
• Automatic Load Balancing
Service Bus queues
• High-Level
• Messaging framework with queues
• Publisher-Subscriber
• Transactions
Acting asynchronously
• We can optimize the server throughput with asynccalls to the next tier
• Just got easier in NET 4.5 with async/await
Web Tier
DataTier
Web Tier
Thread#1
DataTier
Request 1
Response 1
Request 2
Thread#1
Request 1
Response 1
Request 2
Redundant design
• If any single node goes down, your app must continue unhindered
• Some delay is acceptable
• Idempotent operations
• Load-balancing
Image: Rainer Knäpper, License: artlibre
3 Guidelines, 7 Tenets
• Avoiding Roundtrips1. Effective caching mechanisms
2. Content-Delivery Networks and BLOB storage
• Avoiding Bottlenecks3. NoSQL storage
4. Sharding
5. Waiting in a queue
6. Acting asynchronously
• Avoiding Single Point of Failure7. Redundant Design
Additional resources
• Scalability Rules: 50 Principles for Scaling Web Sites• Martin L. Abbott, Michael T. Fisher
• High Scalability• http://highscalability.com/
• Ongoing Demo Scalable App• https://bitbucket.org/ekapic/scalable-
app