Net Distributed Caching

Click here to load reader

  • date post

  • Category


  • view

  • download


Embed Size (px)


A deck on distributed caching, using a open source framework (cachesharp) I developed for .net.

Transcript of Net Distributed Caching

  • 1. .Net Distributed CachingPaul FryerSoftware Architect, Fiserv

2. About Me 3. PortlandHipster 4. WHAT IS CACHE? 5. cache /kaSH/verbStore away in hiding orfor future use. 6. Use of phrase caching in books, last200 years 7. WHAT IS A DISTRIBUTED CACHE? 8. Horizontal Scale 9. Online search interest for variouscache providers 10. HOW TO CACHE 11. Pattern: Read Through Cache 12. Cache ScopesA = ApplicationT = TenantU = UserS = Session 13. Where to Cache Application / Tenant Data = Local Cache Session / User Data = Distributed Cache 14. Cache Key Pattern{Scope}.{Identity}.{Uniqueness}A.WebUI.DefaultThemeA.WebUI.Exchanges.Page1.PageSize10T.TenantB.MaxHistoryT.TenantC.ContactInformationU.johnB22.ProfileIconU.sallyP1.LastPostS.2928328387.RequiresSecondFactorAuthenticationS.2050988830.TransactionHistory.Page2.PageSize20 15. Time to Live How critical is the data? How current does it have to be? Is eventual consistency ok? 16. TTL Performance RelationshipTime to livePerformance 17. Consistency Events that invalidate cached data should causethe cached data to update or remove if possible. You often only able to capture events within yourapplication. Underlying changes to the source can causecached data to be out of sync. Mitigate this withappropriate TTL. Pub/Sub capabilities exist on some distributedcaches. 18. Code Examples Adding a read through cache pattern to a slowservice. Consolidating the caching behavior into areusable attribute. Using a distributed cache to track statisticsabout connections, like number or requestsper second. Performance testing. 19. Resources CacheSharp abstraction layer that maps intomultiple cache providers. Useful for establishingbaselines and comparing different providers. Redis Session State Provider ASP.Net webapplication session state provider. Useful for webapps that want to move session state out ofprocess. CacheCow HTTP Caching framework. Useful forimplementing HTTP caching in web applications. 20. Connect LinkedIn My Blog