Ingo Rammer thinktecture

Slides:



Advertisements
Similar presentations
AppFabric Caching Services:
Advertisements

Advanced Performance Techniques in ASP.NET 2.0 William Zhang, Ph.D. Senior Consultant Microsoft Consulting Services.
SSRS 2008 Architecture Improvements Scale-out SSRS 2008 Report Engine Scalability Improvements.
Windows Azure AppFabric Caching Service Bus Access Control Integration Composite App (WF, WCF)
Thread blocks Waiting… Thread Context Hosted Compute Blob Storage Blob Storage Hosted Compute.
Module 5: Creating and Configuring Group Policy
Azure Services Platform Piotr Zierhoffer. Agenda Cloud? What is Azure? Environment Basic glossary Architecture Element description Deployment.
Wade Wegner Windows Azure Technical Evangelist Microsoft Corporation Windows Azure AppFabric Caching.
Setting expectations and context Architecting for scale – a web app journey to scalability Scaling ‘real-world’ applications.
Ingo Rammer thinktecture.
©2012 Microsoft Corporation. All rights reserved..
02 | Install and Configure Team Foundation Server Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence.
Passage Three Introduction to Microsoft SQL Server 2000.
(ITI310) By Eng. BASSEM ALSAID SESSIONS 8: Network Load Balancing (NLB)
VMware vCenter Server Module 4.
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
Manage & Configure SQL Database on the Cloud Haishi Bai Technical Evangelist Microsoft.
How WebMD Maintains Operational Flexibility with NoSQL Rajeev Borborah, Sr. Director, Engineering Matt Wilson – Director, Production Engineering – Consumer.
Distributed Data Stores – Facebook Presented by Ben Gooding University of Arkansas – April 21, 2015.

Module 13: Network Load Balancing Fundamentals. Server Availability and Scalability Overview Windows Network Load Balancing Configuring Windows Network.
 Muralidhar Krishnaprasad Principal Architect Microsoft Corporation TL14.
 Sergey Barskiy  Principal consultant at Magenic Technologies  
Session 10 Windows Platform Eng. Dina Alkhoudari.
Module 14: Configuring Print Resources and Printing Pools.
 Anil Nori Distinguished Engineer Microsoft Corporation.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
Virtual techdays INDIA │ august 2010 SQL Azure – Tips and Tricks Ramaprasanna Chellamuthu │ Developer Evangelist, Microsoft.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Overview Scale out architecture Servers, services, and topology in Central Administration.
Windows Azure Conference 2014 Deploy your Java workloads on Windows Azure.
Module 10: Maintaining High-Availability. Overview Introduction to Availability Increasing Availability Using Failover Clustering Standby Servers and.
Data Management Console Synonym Editor
Connect with life Janakiram MSV Sr. Technology Strategist | MS India Development Center Siddharth Jagtiani Sr. Program Manager.
Module 13 Implementing Business Continuity. Module Overview Protecting and Recovering Content Working with Backup and Restore for Disaster Recovery Implementing.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Chandrika Shankarnarayan Senior Program Manager Microsoft Corporation SESSION CODE: ASI301.
Virtual techdays INDIA │ November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.
Windows Azure Conference 2014 Caching Data in the Cloud with Windows Azure.
Visual Studio Windows Azure Portal Rest APIs / PS Cmdlets US-North Central Region FC TOR PDU Servers TOR PDU Servers TOR PDU Servers TOR PDU.
Module 5: Creating and Configuring Group Policies.
… Application /Web Tier UsersUsers DatabaseDatabase Data tier Application Asp.Net app Session cart hosted in memory Asp.Net app Session cart hosted.
Designing and Delivering Scalable and Resilient Web Services Ron Jacobs Sr. Technical Evangelist, Microsoft
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Distributed Computing Systems CSCI 4780/6780. Scalability ConceptExample Centralized servicesA single server for all users Centralized dataA single on-line.
Enhancing Scalability and Availability of the Microsoft Application Platform Damir Bersinic Ruth Morton IT Pro Advisor Microsoft Canada
Module 6 Creating and Configuring Group Policy. Module Overview Overview of Group Policy Configuring the Scope of Group Policy Objects Evaluating the.
Nicholas Goossens R&D Lead Open Box Software Session Code: WUX301.
Workflow Service Host Persistence (Instances) Persistence (Instances) Monitoring Activity Library Receive Send... Management Endpoint Persistence Behavior.
Module 6: Administering Reporting Services. Overview Server Administration Performance and Reliability Monitoring Database Administration Security Administration.
Visual Studio 2010 and.NET Framework 4 Training Workshop.
Oracle Business Intelligence Foundation – Testing and Deploying OBI Repository.
The best of WF 4.0 and AppFabric Damir Dobric MVP-Connected System Developer Microsoft Connected System Division Advisor Visual Studio Inner Circle member.
 Cloud Computing technology basics Platform Evolution Advantages  Microsoft Windows Azure technology basics Windows Azure – A Lap around the platform.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
Understanding Solutions
Lead SQL BankofAmerica Blog: SQLHarry.com
CSE-291 Cloud Computing, Fall 2016 Kesden
Distributed Cache Dipl.-Ing. Damir Dobric Lead Architect daenet
.NET Performance Solutions
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
Deploying and Configuring SSIS Packages
SESSION CODE: ASI313 Windows Server AppFabric Caching: What It Is and When You Should Use It Jon Flanders.
Windows Server AppFabric Cache
Module 1–Windows AppFabric Cache
11/28/ :08 AM PDC09-FT26 Scale Your Data Tier using Windows Server AppFabric Caching (formerly Project “Velocity”) Muralidhar Krishnaprasad Principal.
06 | Case Studies James Chambers | Author, Microsoft ASP.NET/IIS MVP
Developing for Windows Azure
04 | Always On High Availability
Microsoft Azure Services Platform
Presentation transcript:

Ingo Rammer thinktecture

Unterstützung und Consulting von Software-Entwicklern und –Architekten im Windows- und.NET-Umfeld Entwickler-Coaching und –Mentoring Architektur-Consulting und –Prototyping Architektur- und Code-Reviews Anwendungsoptimierung, Troubleshooting, Debugging

AppFabric Caching (Velocity) is a Windows Service for highly scalable distributed caching Multiple physical nodes are combined to form one big virtual cache

So first … let‘s start the virtual machines …

Web Server #1 Web Server #2 Web Server #3 Web Server #n Load Balancer Data User

Web Server Data Application Session State Local Caching Local Caching

Session state InProc, Session server, database? Availability, Single-Point-Of-Failure, Performance Caching Cache consistency when using multiple servers

Web Server #1 Web Server #2 Web Server #3 Web Server #n Load Balancer Cache Server #1 Cache Server #2 AppFabric Caching

Web Server #1 Web Server #2 Web Server #3 Web Server #n Load Balancer Cache Server #1 Cache Server #2

Administration Powershell Cluster config centrally in XML file or in SQL Server

Notebook directly: Windows 7 with IIS and Visual Studio Four virtual machines: Notebook directly: Windows 7 with IIS and Visual Studio Four virtual machines: VCacheDC Domain Controller SQL Server VCacheDC Domain Controller SQL Server VCache01 AppFabric VCache02 AppFabric VCache03 AppFabric

VCache01 VCache02 VCache03 Cache: default Cache: sessiondata Additional caches … with different configuration

Administration via Powershell Loading the module Import-Module DistributedCacheAdministration Get-CacheHelp Creating a new cache: New-Cache democache Starting the Cluster: Start-CacheCluster Status: Get-CacheHost

Export-CacheClusterConfig c:\test.xml Add advancedProperties Import-CacheClusterConfig c:\test.xml … …

Configuring the client

Adding References from C:\Windows\System32\AppFabric Microsoft.ApplicationServer.Caching.Client and Microsoft.ApplicationServer.Caching.Core Have to be copied first DataCacheFactory fact = new DataCacheFactory(); DataCache myCache = fact.GetCache("democache2"); string someKey = "myKey"; string someValue = "testing"; // anything [Serializable] myCache.Put(someKey, someValue); string result = (string) myCache[someKey]; DataCacheFactory fact = new DataCacheFactory(); DataCache myCache = fact.GetCache("democache2"); string someKey = "myKey"; string someValue = "testing"; // anything [Serializable] myCache.Put(someKey, someValue); string result = (string) myCache[someKey];

VCache01 VCache02 VCache03 Cache: default.NET Client Prod-1 Prod-2 Prod-4 Prod-3 DataCache defaultcache = GetCache("default"); Product prod = GetProduct(...); defaultcache.Put("Prod-1",prod); DataCache defaultcache = GetCache("default"); Product prod = GetProduct(...); defaultcache.Put("Prod-1",prod); defaultcache.Put("Prod-2",prod2); defaultcache.Put("Prod-3",prod3); defaultcache.Put("Prod-4",prod4); defaultcache.Put("Prod-2",prod2); defaultcache.Put("Prod-3",prod3); defaultcache.Put("Prod-4",prod4); Other named caches …

Scaling size More machines == more memory Scaling throughput More machines == higher throughput „Local Cache“ Directly at client == massively lower latency Higher throughput when reading But also: items are older, can get stale

Velocity #1 Velocity #2 Velocity #3 Prod-1.NET Client Dynamic Routing Table Prod-2 Prod-4 Prod-3 defaultcache.Put("Prod-1",prod);

Velocity #1 Velocity #2 Velocity #3 Prod-1.NET Client Dynamic Routing Table Prod-2 Prod-4 Prod-3 object p1 = defaultcache["Prod-1"]; if (p1==null) { p1 = GetProductFromDatabase(...) defaultcache.Put("Prod-1", p1); } object p1 = defaultcache["Prod-1"]; if (p1==null) { p1 = GetProductFromDatabase(...) defaultcache.Put("Prod-1", p1); } Prod-1

Optional All elements in a region live on the same node Can be tagged Allow BulkGet and bulk delete

Reference Data: "never" changes (catalog data, price lists, …) Activity data: non-concurrent changes (session data, shopping cart, …) Resource data: high concurrency data, constantly changing (inventory level, …)

Performance – Throughput and latency Consistency – Guaranteed or eventual Recoverability – Can the data be restored from DB (cache eviction?) Availability – What happens at node failure

Chosen in config or code In practice: often code, because only specific parts should be cached locally (DataCacheFactory) Good for reference data Synchronization Age of items Notification

Pub/sub on cache item changes Callbacks for complete cache, for a region or for a single item Are currently (beta 2) queued at server side and regularily polled by the client Cache has to be configured for notifications New-Cache -NotificationsEnabled true

Optimistic and pessimistic locking DataCacheItemVersion ver = default(DataCacheItemVersion); object itm = defaultCache.Get("region", "key", ref ver); // after change (throws an exception if modified in meantime) defaultCache.Put("region","key", itm, ver); DataCacheItemVersion ver = default(DataCacheItemVersion); object itm = defaultCache.Get("region", "key", ref ver); // after change (throws an exception if modified in meantime) defaultCache.Put("region","key", itm, ver); DataCacheLockHandle lockHandle; object itm = defaultCache.GetAndLock("region", "key", TimeSpan.FromSeconds(30), out lockHandle); // after change: defaultCache.PutAndUnlock("region", "key", itm, lockHandle, null); DataCacheLockHandle lockHandle; object itm = defaultCache.GetAndLock("region", "key", TimeSpan.FromSeconds(30), out lockHandle); // after change: defaultCache.PutAndUnlock("region", "key", itm, lockHandle, null);

Velocity #1 Velocity #2 Velocity #3 Sess-1 (Primary) Sess-1 (Primary) sessionCache.put("Sess-1", se1); Sess-1 (Secondary) Sess-2 (Primary) Sess-2 (Primary) Sess-2 (Secondary) sessionCache.put("Sess-1", se1); sessionCache.put("Sess-2", se2); sessionCache.put("Sess-1", se1); sessionCache.put("Sess-2", se2);

Velocity #1 Velocity #2 Velocity #3 Sess-1 (Primary) Sess-1 (Primary) sessionCache.put("Sess-1", se1); Sess-1 (Secondary) Sess-2 (Primary) Sess-2 (Primary) Sess-2 (Secondary) sessionCache.put("Sess-1", se1); sessionCache.put("Sess-2", se2); sessionCache.put("Sess-1", se1); sessionCache.put("Sess-2", se2); Sess-2 (Primary) Sess-2 (Primary) Sess-2 (Secondary) Sess-1 (Secondary) Sess-1 (Secondary)

Powershell New-Cache -Secondaries 1 Maybe also: –Eviction None –NotExpirable true Starting with Beta2: Only supported on Enterprise (and Data Center) operating system editions