Learn. Connect. Explore. Learn. Connect. Explore.
Learn. Connect. Explore.Learn. Connect. Explore.
Introduction to Microsoft Azure Redis Cache
Pradeep Kumar C
Cloud Integration Engineer
Angshuman Nayak
Cloud Integration Engineer
http://blogs.msdn.com/cie
Agenda• What is Caching ?
• Microsoft Azure Cache Offerings
• What is Redis Cache?
• Azure Redis Cache
• Azure Redis Cache Patterns
• Recommendations
What is Caching ?
A distributed, in-memory, flexible cache for all data types that can be used to speed up applications and reduce database load.
What can I cache?• Product catalogs
• Employee data
• User profiles
• Images
• Session state
• Shopping cart
• Game scores and state
• Social feeds
• Query output results
• Airline seating charts
• Inventory management system
• Game leaderboards
• Weather
• Stock quotes
Reference DataRead-heavy, changes infrequently
Microsoft Azure Cache Offerings
• Redis Cache
• Managed Cache
• Role based Cache
What is Redis ?
“
“
Redis is an open source, BSD licensed, advanced key-
value cache and store. It is often referred to as a data
structure server since keys can
contain strings, hashes, lists, sets, sorted
sets, bitmaps and hyperloglogs “ - redis.io
“Redis has many different use cases. The simplest way
to describe it is something between a traditional
database and doing computations in memory. Redis
exposes data structures that are accessed in memory
via a set of commands”. - Salvatore
Core Redis Features• Low latency, high throughput key-value store
• Per Key expiry, choice of eviction policies
• Atomic operations on data types
• Strings, hashes, lists, sets, sorted sets
• Publisher-Subscriber pattern
• LUA scripting
• Transaction
• Client libraries in multiple languages
Azure Redis• MS Open Tech ported Redis to Windows OS
• Cache hosted and managed by Microsoft
• One dedicated machine per cache (At-least)
• Sizes: 256 MB, 1 GB, 2.8 GB, 6 GB, 13 GB, 26 GB, 53 GB
• Available in all Azure Regions
• Basic SKU : Single cache node
• Standard SKU: Cache node + replica/slave node
• Availability SLA of 99.9%
#devconnections
Demo (Azure Redis)
HIGH Availability (Standard SKU only)
#devconnections
High Availability
Availability Set
Master Slave
High Availability
Availability Set
Master Slave
High Availability
Availability Set
Master Slave
High Availability
Availability Set
Master Slave
Monitoring and Alerting
#devconnections
Redis usage patterns
Query by Customer Name
Azure Web Site
Redis Cache
Wilber Finely: 0001:0032
Wilber Fryling: 0002:8051
Zachery Zega: 0001:9480
…
…
Azure Table Storage
0001:0032 Wilber Finely:234 1st st:20.0:…
0002:8051 Wilber Fryling:11 Larry ave:…
0001:9480 Zachery Zega:817 Main st:…
…
…
Wilber Finely0001:0032 0001:0032
Wilber Finely:234 1st st:20.0…
Demo (Redis Cache as a secondary index)
Recommendations • For running the Windows ported Redis Server locally you
need the Microsoft Visual C++ 2012 Redistributable Package
• Make the ConnectionMultiplexer Class as Singleton and reuse the same object for connections.
• By default the ConnectionTimeout and SyncTimeout are 1 sec. Increase them to a higher value.
Which Azure Cache offering is right for me?
Redis Cache Pricing DetailsCache Name Cache Size Basic Standard
C0 250 MB₹1.33 per hour
(~₹984 /month)
₹3.31 per hour
(~₹2,459 /month)
C1 1 GB₹3.31 per hour
(~₹2,459 /month)
₹8.30 per hour
(~₹6,170 /month)
C2 2.8 GB₹5.41 per hour
(~₹4,024 /month)
₹13.52 per hour
(~₹10,059 /month)
C3 6 GB₹10.82 per hour
(~₹8,047 /month)
₹27.04 per hour
(~₹20,118 /month)
C4 13 GB₹12.62 per hour
(~₹9,389 /month)
₹31.55 per hour
(~₹23,471 /month)
C5 26 GB₹25.24 per hour
(~₹18,777 /month)
₹63.10 per hour
(~₹46,941 /month)
C6 55 GB₹50.48 per hour
(~₹37,553 /month)
₹126.19 per hour
(~₹93,881 /month)
Redis usage patterns
Fireworks
new firework
new firework
1
23
Demo (Redis Cache as a Publisher-Subscriber channel)
In Review: Session Objectives And Takeaways
•Session Objective(s):• Introduce Azure Redis Cache
• Discuss Azure Cache Strategy
•Key Takeaways : • Azure Redis Cache is the recommended cache offering on
Azure.
• Azure Redis Cache is already a compelling offering and will only get better.
Q & A
Your Feedback is Important
OPTION 3: Feedback stations outside the hall
Fill out evaluation of this session and help shape future events.
OPTION 1 OPTION 2
Replace this space with the
actual QR Code
ReferencesRelated references for you to expand your knowledge on the subject
• http://redis.io/commands
• http://redis.io/clients
• http://msopentech.com/opentech-projects/redis/
• https://github.com/MSOpenTech/redis
• http://msopentech.com/blog/2013/05/09/redis-on-windows-new-version-and-nuget-pac
• http://azure.microsoft.com/en-us/documentation/articles/cache-dotnet-how-to-use-azure-redis-cache/
technet.microsoft.com/en-in
aka.ms/mva
msdn.microsoft.com/
Follow us online
Facebookfacebook.com/MicrosoftDeveloper.India
twitter.com/msdevindia
http://blogs.msdn.com/cieEmail:[email protected]/[email protected]