Download presentation
Presentation is loading. Please wait.
Published byReynard Ray Modified over 9 years ago
1
virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric
2
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 virtual techdays INDIA │ 18-20 august 2010 S E S S I O N A G E N D A
3
virtual techdays INDIA │ 18-20 august 2010 Typical Web App Application / Web Tier Application UsersUsers DatabaseDatabase Data Tier Application ASP.Net App Session Cart Hosted in memory ASP.Net App Session Cart Hosted in memory Load Balancer Sticky Routing Load Balancer Sticky Routing Catalog sits in Database Application
4
virtual techdays INDIA │ 18-20 august 2010 … Web Tier (ASP.Net) (ASP.Net) UsersUsers Database Data Tier Application Web Site’s too slow!! Servers are crashing Database is hot!! Where did my shopping cart go? Fast Forward in time
5
virtual techdays INDIA │ 18-20 august 2010 Cache to the rescue Cache described Unified Cache View 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 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
6
virtual techdays INDIA │ 18-20 august 2010 Cache to the rescue Where cache fits … Web Tier (ASP.Net) (ASP.Net) UsersUsers DatabaseDatabase CloudCloud Data Tier Application Caching Access Layer Caching Service Cache Tier
7
virtual techdays INDIA │ 18-20 august 2010 Why use AppFabric Caching? 1. Share Data Across Applications – No more sticky routing 2. Performance OperThroughputLatencyBulk Fetch Read28, 000/ sec (2k)1-2ms200k/sec (512 bytes) Write20,000 / sec (2k)3 ms - OperationServersThroughput Read 2k128,000 ops/ sec Read 2k252, 500 ops/ sec Read 2k378, 000 ops/ sec 3. Scale out by adding more boxes 4. High Availability Protect from Web & Cache Server Failure
8
virtual techdays INDIA │ 18-20 august 2010 Cache Overview Key features High Availability Expiry/Cache Invalidation Notifications Local Cache Named Regions/Tag based search Locks Optimistic/Pessimistic Concurrency Model Bulk Fetch Cache Features
9
virtual techdays INDIA │ 18-20 august 2010 Host – Physical processes hosting AppFabric Caching instance. Named Caches – Can span across machines Cache Item – Key, Payload (Object ), Tags, TTL, Timestamps, Version Regions – Physically co-located Container of Cache Items – May be implicit or explicitly created Regions Region A Key Payload Tags 121 xxxx “Toy” “Child” 123 yyyy “Toy” “Chair”.. Machine -> Cache Host -> Named Caches -> Regions -> Cache Items -> Objects Named Cache : Product Catalog Named Cache : Electronics Inventory AppFabric Caching Service Cache Overview Cache Logical Hierarchy
10
virtual techdays INDIA │ 18-20 august 2010 Cache Overview Cache Data Distribution Scale on Data Size - More machines => More memory to cache Scale on Cache Throughput - More machines => keys distributed across more machines => better throughput … Web Tier Cache Tier Cache Service UsersUsers AA CC EEDD BB GGIIHH FF ASP.Net App Caching Client ASP.Net App Caching Client ASP.Net App Caching Client AACC EE DDBB GG IIHH FF
11
virtual techdays INDIA │ 18-20 august 2010 Cache availability and Roadmap 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 AppFabric Cache 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
12
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 virtual techdays INDIA │ 18-20 august 2010 S E S S I O N A G E N D A
13
virtual techdays INDIA │ 18-20 august 2010 Cache API // Create instance of cachefactory (reads appconfig) DataCacheFactory fac = 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"); // Simple Get/Put catalog.Put("toy-101", new Toy("Puzzle",.,.)); // From the same or a different client Toy toyObj = (Toy)catalog.Get("toy-101"); <host name="BL1CDB8083714“ cachePort="22233" cacheHostName="DistributedCacheService"/> ….. <host name="BL1CDB8083714“ cachePort="22233" cacheHostName="DistributedCacheService"/> ….. Typical flow
14
virtual techdays INDIA │ 18-20 august 2010 Cache API Cache Aside (Explicit Caching) // Read from Cache Toy toyObj = (Toy) catalog.Get("toy-101"); // Read from Cache Toy toyObj = (Toy) catalog.Get("toy-101"); Application 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; } // If Not present in the cache if (toyObj == null) { // Read from backend.. toyObj = ReadFromDatabase(); // Populate Cache catalog.Put("toy-101", toyObj); return toyObj; } Caching Access Layer
15
virtual techdays INDIA │ 18-20 august 2010 DEMO: Provisioning a cache on Azure Jatin Kakkar │ Sr. Program Manager, AppFabric
16
virtual techdays INDIA │ 18-20 august 2010 DEMO: Cache API Sample on Azure Jatin Kakkar │ Sr. Program Manager, AppFabric
17
virtual techdays INDIA │ 18-20 august 2010 DEMO: Cache as a session state provider:- On-prem and Azure Jatin Kakkar │ Sr. Program Manager, AppFabric
18
virtual techdays INDIA │ 18-20 august 2010 RESOURCES Windows AppFabric Cache Download link -- Benefit/Details Windows Azure AppFabric Cache CTP link -- https://portal.appfabriclabs.com/https://portal.appfabriclabs.com/ Survey on Cache Service in Azure -- Feedback and Discussion AppFabric Forum link --
19
virtual techdays THANKS │ 18-20 august 2010 jakakkar@microsoft.com │
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.