appfabric caching how it works and when you should use it l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
AppFabric Caching: How It Works and When You Should Use It PowerPoint Presentation
Download Presentation
AppFabric Caching: How It Works and When You Should Use It

Loading in 2 Seconds...

play fullscreen
1 / 22

AppFabric Caching: How It Works and When You Should Use It - PowerPoint PPT Presentation


  • 93 Views
  • Uploaded on

MID302. AppFabric Caching: How It Works and When You Should Use It . Jon Flanders Senior Consultant MCW Technologies. Agenda. Why Caching? What is AppFabric Cache? On-Premise and in Azure Demo, demo, demo. Typical Web Architecture. Problems with typical architecture.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'AppFabric Caching: How It Works and When You Should Use It' - ellery


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
appfabric caching how it works and when you should use it
MID302

AppFabric Caching: How It Works and When You Should Use It

Jon Flanders

Senior Consultant

MCW Technologies

agenda
Agenda
  • Why Caching?
  • What is AppFabric Cache?
  • On-Premise and in Azure
  • Demo, demo, demo
problems with typical architecture
Problems with typical architecture
  • Storing session in memory leads to scalability problems
    • Sticky sessions solve this
    • Most cloud providers don’t enable
  • Data tier is difficult to scale out
    • Portioning is one way
    • No product gives you this automatically
how do you scale this architecture
How do you scale this architecture?
  • Caching data from the data tier has been one typical pattern
  • Reduces load on database
  • Reduces network round-trips
  • Caching in memory of web tier can lead to cache coherency problems
    • CEO gets one good financial report from Web Node 1 – refreshes and gets bad financial report from Web Node 2
    • One of these is stale
definitions
Definitions
  • Caching
    • Storing a copy of data closer to application logic, away from its source
  • Distributed Caching
    • A set of nodes in a farm that coordinate to create a unified view of a cache to a caching client
  • Expiration
    • When an object is removed from the cache because of staleness
  • Eviction
    • When an object is removed from the cache due to low memory conditions
what is appfabric cache
What is AppFabric Cache?
  • A distributed cache for “data”
    • An in-memory cache (no paging to disk or persistence layer)
  • The “Data” can be
    • Any (serializable) CLR Object
    • XML
    • Binary data
  • Optimized for the cache-aside pattern (in this version)
    • Programming against the cache uses explicit API
    • Changing the cache doesn’t update the original data store
windows server appfabric cache
Windows *Server* AppFabric Cache
  • Cache runs on N nodes
    • Nodes that share configuration are part of a single Cache Cluster
    • Runs as a Windows Service (one service per server node)
    • Typically not the same servers as the client (web) tier
    • More memory is better
    • In-memory copy cache is optional setting (“Local Cache”)
  • All the cache nodes in a cluster are part of a fabric
    • Share configuration
    • Communicate
    • Cooperate
windows azure appfabric cache
Windows *Azure* AppFabric Cache
  • Essential if you are building Azure Web or Worker roles
  • APIs are identical
  • You don’t have to manage cache cluster
    • Can increase and decrease capacity using configuration rather than physical hosts
    • 128MB to 4GB per named cache – you don’t lose data when you increase cache size
    • Normal eviction policies apply if you decrease cache size
appfabric cache advantages
AppFabric Cache advantages
  • Native .NET API
  • Scalability
  • Performance
    • Typically linear as more nodes are added
    • LocalCache increases raw performance
  • High Availability
    • Distributed nature safeguards against cache client and server failures
current deltas between server and azure
Current deltas between server and Azure
  • Some server features not available ATM
    • No Notifications, HA, Tags/Regions
    • Expiration
      • No way to change expiration on a cache –but can be changed on a per-object basis
    • Eviction
      • No way to change eviction settings
  • Connections
    • Server: one connection ==multiple named caches
    • Azure: one connection == named default cache
    • Azure – create multiple namespace reservations
when to use it
When to use it:
  • Reference data
  • Activity data
  • Resource data
asp net session state provider
ASP.NET Session State Provider
  • Included OOB with the Cache
  • Simple configuration change
    • Enables session state to be cached across a cluster
session state provider
Session state provider
  • <sessionStatemode="Custom"customProvider="SessionStoreProvider">
  • <providers>
  • <addname="SessionStoreProvider"type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider, Microsoft.ApplicationServer.Caching.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"cacheName="BlueYonderSession"/>
  • </providers>
  • </sessionState>
summary
Summary
  • Windows Server AppFabric Cache is a distributed application cache
  • Caching is important to application scalability
  • Explicit caching API available to .NET 3.5 SP1 and .NET 4.0
  • ASP.NET Session provider an implicit way to take advantage of the Cache’s capabilities
track resources

Required Slide

Track PMs will supply the content for this slide, which will be inserted during the final scrub.

Track Resources
  • Windows Azure Platform Training Kit
  • Windows Server AppFabric Training Kit
  • BizTalk 2010 Developer Training Kit
  • AppFabric Team Blog
  • Windows Azure AppFabric on MSDN
  • Windows Server AppFabric on MSDN
resources
Resources
  • Connect. Share. Discuss.

http://northamerica.msteched.com

Learning

  • Sessions On-Demand & Community
  • Microsoft Certification & Training Resources

www.microsoft.com/teched

www.microsoft.com/learning

  • Resources for IT Professionals
  • Resources for Developers

http://microsoft.com/technet

http://microsoft.com/msdn