190 likes | 304 Vues
Join Jatin Kakkar, Sr. Program Manager for AppFabric, in this insightful session on AppFabric Cache from the 2010 Virtual TechDays. Understand the challenges of traditional data management, discover the robust solutions offered by AppFabric Cache, and explore its core features such as high availability, data distribution, and API integration. Learn how to effectively provision caching on Azure, enhance application performance, and scale out seamlessly with easy cache management, ensuring better throughput and reduced session state issues in cloud and on-prem environments.
E N D
INDIA │ 22-24 November2010 virtual techdays AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric
INDIA │ 18-20 august2010 virtual techdays • Overview of AppFabric Cache • The Problem • To the rescue -- App Fabric Cache • Cache Overview • Cache availability and Roadmap • Programming • Cache API Sample • Demo – • Provisioning on Azure • Cache API Sample on Azure • Cache in Session state:: On-prem and Azure S E S S I O N A G E N D A
INDIA │ 18-20 august2010 virtual techdays Typical Web App Users Load Balancer Sticky Routing Application / Web Tier ASP.Net App Session Cart Hosted in memory Application Application Application Data Tier Catalog sits in Database Database
INDIA │ 18-20 august2010 virtual techdays Fast Forward in time Users Web Site’s too slow!! Where did my shopping cart go? … Web Tier (ASP.Net) Application Application Application Servers are crashing Database is hot!! Data Tier Database
INDIA │ 18-20 august2010 virtual techdays • An explicit, distributed, in-memory application cache for all kinds of data • (CLR objects, rows, XML, Binary data etc.) • Fuse "memory" across machines into a unified cache Cache to the rescue Cache described Caching clients can be across machines or processes Clients Access the Cache as if it was a large single cache Cache Layer distributes data across the various cache nodes Unified Cache View
INDIA │ 18-20 august2010 virtual techdays Cache to the rescue Users Where cache fits Caching Access Layer Caching Access Layer Caching Access Layer … Web Tier (ASP.Net) Application Application Application Caching Service Caching Service Cache Tier Caching Service Data Tier Database Cloud
INDIA │ 18-20 august2010 virtual techdays Why use AppFabric Caching? 1. Share Data Across Applications • No more sticky routing 2. Performance 3. Scale out by adding more boxes 4. High Availability Protect from Web & Cache Server Failure
INDIA │ 18-20 august2010 virtual techdays • Key features • High Availability • Expiry/Cache Invalidation • Notifications • Local Cache • Named Regions/Tag based search • Locks • Optimistic/Pessimistic Concurrency Model • Bulk Fetch Cache Overview Cache Features
INDIA │ 18-20 august2010 virtual techdays Cache Overview AppFabric Caching Service AppFabric Caching Service AppFabric Caching Service Cache Logical Hierarchy Named Cache : Product Catalog Named Cache : Electronics Inventory Regions Key Payload Tags Region A 121 xxxx “Toy” “Child” 123 yyyy “Toy” “Chair”.. • Machine -> Cache Host -> Named Caches -> Regions -> Cache Items -> Objects • Cache Item • Key, Payload (Object ), Tags, TTL, Timestamps, Version • Regions • Physically co-located Container of Cache Items • May be implicit or explicitly created • Host • Physical processes hosting AppFabric Caching instance. • Named Caches • Can span across machines
INDIA │ 18-20 august2010 virtual techdays Users Cache Overview Cache Data Distribution … Web Tier G H I D E F A B C ASP.Net App ASP.Net App ASP.Net App Caching Client Caching Client Caching Client E G B D H A I C F Cache Service Cache Service Cache Tier Cache Service Scale on Data Size - More machines => More memory to cache Scale on Cache Throughput - More machines => keys distributed across more machines => better throughput
INDIA │ 18-20 august2010 virtual techdays Cache is available both On-premise and on Cloud • Windows AppFabric Cache • Availability on Windows Server platform • V1.0 RTM’ed in mid 2010 • Windows Azure AppFabricCache • CTP October 2010 • Commercial launch in the first half of 2011 • Based off the proven Windows Server AppFabric Caching capabilities • Customers can simply request for cache on demand • No overhead of cluster provisioning or management • Ability to add/remove capacity as per prevailing conditions • Comes with ASP.NET session state and page output caching provider Cache availability and Roadmap
INDIA │ 18-20 august2010 virtual techdays • Overview of AppFabric Cache • The Problem • To the rescue App Fabric Cache • Cache Overview • Cache availability and Roadmap • Programming • Cache API Sample • Demo – • Provisioning on Azure • Cache API Sample on Azure • Cache in Session state:: On-prem and Azure S E S S I O N A G E N D A
INDIA │ 18-20 august2010 virtual techdays Cache API Typical flow <hosts> <host name="BL1CDB8083714“ cachePort="22233" cacheHostName="DistributedCacheService"/> ….. </hosts> <localCacheisEnabled=“true" ../> <security … /> // Create instance of cachefactory (reads appconfig) DataCacheFactoryfac = new DataCacheFactory(); // Get a named cache from the factory DataCache catalog = fac.GetCache(“default"); // Simple Get/Put catalog.Put("toy-101", new Toy("Puzzle", .,.)); // From the same or a different client Toy toyObj = (Toy)catalog.Get("toy-101");
INDIA │ 18-20 august2010 virtual techdays Cache API Cache Aside (Explicit Caching) Application // Read from Cache Toy toyObj = (Toy) catalog.Get("toy-101"); Caching Access Layer Caching Service // If Not present in the cache if (toyObj == null) { // Read from backend.. toyObj = ReadFromDatabase(); // Populate Cache catalog.Put("toy-101", toyObj); return toyObj; } Database
INDIA │ 18-20 august2010 virtual techdays DEMO: Provisioning a cache on Azure Jatin Kakkar │ Sr. Program Manager, AppFabric
INDIA │ 18-20 august2010 virtual techdays • DEMO: Cache API Sample on Azure Jatin Kakkar │ Sr. Program Manager, AppFabric
INDIA │ 18-20 august2010 virtual techdays • DEMO: Cache as a session state provider:- On-prem and Azure Jatin Kakkar │ Sr. Program Manager, AppFabric
INDIA │ 18-20 august2010 virtual techdays • Windows AppFabric Cache • Download link -- • Benefit/Details • Windows Azure AppFabric Cache • CTP link -- https://portal.appfabriclabs.com/ • Survey on Cache Service in Azure -- • Feedback and Discussion • AppFabric Forum link -- RESOURCES
THANKS│18-20 august2010 virtual techdays jakakkar@microsoft.com│