AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture...

23
AppFabric Caching Services: Utilizing AppFabric Caching Services On- Premise and Beyond to Optimize Performance

Transcript of AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture...

Page 1: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

AppFabric Caching Services:Utilizing AppFabric Caching

Services On-Premise and Beyond to Optimize Performance

Page 2: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

• About Me• Overview of Caching• Server AppFabric Caching Architecture• Demo: Server AppFabric Configuration• Server AppFabric Caching Concepts• Demo: Implementing Application Cache• Beyond On-Premise Caching• Demo: Azure AppFabric Caching• Conclusion

Page 3: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

About Me

• Microsoft Certified Professional• Phoenix Connected Systems User Group

Leadership Team• 6+ years building mid-tier solutions using

Microsoft technology including, but not limited to, • BizTalk Server (2006, 2010)• MSSQL Server (2000, 2005, 2008)• .NET Framework (1.1, 2.0, 3.5, 4.0)

• Windows Communication Foundation• Microsoft.Web.Services3• .NET Remoting

• Currently working for Cable One, Inc.

Page 4: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Overview of AppFabric

• Provides hosting services• Provides caching services• Provides robust tools and services for managing

applications on-premise and off-premise• Tracing• Dashboard

• Key point: Difference between Server AppFabric and Azure AppFabric• Windows Server AppFabric is on-premise• Windows Azure AppFabric is in the cloud• APIs attempt to be seemless

Page 5: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

The Dilemma

• Even though we’re light years beyond the traditional paper filing method of the past, users still find the application driven processes too slow. Users will be happy to learn that technology once again has provided a solution: Caching

Page 6: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Common Questions

• How do we increase the speed of data access and the application as a whole?

• How can we make our caching solutions more scalable?

• How do we ensure our application is not only fast and scalable, but also maintain it’s robustness?

Page 7: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Cache Concepts

• Cache– Storing a copy of data closer to application logic, and away from

it’s source– Increases application speed

• Distributed Caching– A set of nodes in a farm that coordinate to create a unified view

of a cache to a caching client– Assists in creating a scalable caching solution

• Expiration and Eviction– When an object is removed from the cache because of stalenes or

due to low memory conditions– Assists in maintaining a robust caching solution

Page 8: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Caching Overview

Page 9: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Server AppFabric Cache Architecture

• Runs on top of Windows Server and IIS via Windows Server AppFabric Caching Services

• Cache Host exists on the server as a windows service• Multiple cache servers can run in a clustered environment• Administered through PowerShell• Configuration can be shared across multiple servers

through the use of a database or XML file located on a UNC share

• Cache client communicates with the cluster rather than just an individual server

Page 10: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Architecture Diagram

Page 11: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Demo 1: Server AppFabric Configuration

Page 12: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Implementing AppFabric Cache

• “You've effectively got a big, partitionable distributed (and optionally highly available) hashtable across multiple machines.”—Scott Hanselman

• Hashtable of objects that take the form of their System.Object base class• Requires type conversion to restore them to their original type

• Cache clusters are logically segmented into named caches and regions• A named cache, also referred to as a cache, is a configurable unit of

in-memory storage that all applications use to store data in the distributed cache

• Regions are an additional data container that you can place in the cache

• Regions can be used to segregate like data by allowing you to search all cached objects in the region using descriptive strings, also known as “tags”.

Page 13: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Named Caches and Regions

Page 14: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Demo 2: Implementing Application Cache

Page 15: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Recap: Benefits of Server AppFabric Caching

• Scalable: • Can restart the application without

losing valuable cached data• Applications can spread session objects

across the cache cluster, providing scalability

• Caches any serializable CLR object and provides access through simple cache APIs

Page 16: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Where to Now??

Page 17: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Azure: Off-Premise Caching• Windows Azure provides a simple to maintain solution that allows

the business to leverage Microsoft’s servers in order to save money• Implemented in code almost identically to Server AppFabric, with

the only exception that Azure AppFabric Caching does not support user-created regions or tag-based searches

• Unlike Windows Server AppFabric, Windows PowerShell is not used to manage the provisioned caches or the cache cluster• The Windows Azure Administration Portal is extremely easy to use and

allows businesses to get a cache up and running in as little as 60 seconds• Libraries are nearly interchangeable which makes migrating from

Windows Server AppFabric to Windows Azure AppFabric Caching a nearly seemless

Page 18: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Demo 3:Migrating from Windows Server AppFabric Cache to Windows

Azure Cache

Page 19: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Other Cache Providers– Off-Premise

• Amazon ElastiCache

– On-premise• Memcached

– Proven in one blog online to be a bit faster– More oftenly stated to be more difficult to set up– Supports C#– API converts objects to strings– Object size limit: 1MB– Not as many features as Coherence and AppFabric

• Coherence– On paper, appears to support more features that Server AppFabric caching– Supports C#

• Redis– Not as many features as other cache providers– Does not support as many languages

Page 20: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Recap• Server AppFabric caching helped make our stock

web service ~7.5 times faster• Azure AppFabric caching, although a bit slower,

still saw decrease in response time by a multiple of 4

• Azure cache host configured and started in around 60 seconds or often times less

• Code can easily be migrated between off-premise and on-premise AppFabric caching solutions

Page 21: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Questions?

Page 22: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

References• Introduction to Caching with Windows Server AppFabric (Beta): http://

msdn.microsoft.com/library/cc645013.aspx• Module 1–Windows AppFabric Cache (AppFabric Demos)• Windows Server AppFabric Caching Logical Architecture Diagram: http://

msdn.microsoft.com/en-us/library/ee790985.aspx • Differences Between Caching On-Premises and in the Cloud: http://

msdn.microsoft.com/en-us/library/windowsazure/gg185678.aspx• Wade Wegner works at Microsoft and is the Technical Evangelist Lead for

Windows Azure: http://www.wadewegner.com/ • Distributed Caching Showdown – Memcached vs Velocity:

http://www.briandrought.com/blog/?p=29• Installing, Configuring and Using Windows Server AppFabric and the "Velocity"

Memory Cache in 10 minutes: http://www.hanselman.com/blog/InstallingConfiguringAndUsingWindowsServerAppFabricAndTheVelocityMemoryCacheIn10Minutes.aspx

Page 23: AppFabric Caching Services:. About Me Overview of Caching Server AppFabric Caching Architecture Demo: Server AppFabric Configuration Server AppFabric.

Aditional Information• Email– [email protected][email protected]

• Blog– http://bloggedbychris.com/

• Phoenix Connected Systems User Group– http://pcsug.org/