SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
Azure App Fabric Caching


                          Sachin Sancheti

                     sachin@cumulux.com
                        www.cumulux.com




   www.cumulux.com                 Page 1
•   Introduction to Azure App Fabric Cache
•   Configuration and Usage
•   Session State Provider Gotchas
•   Tracing
•   Understanding Quota & Common Errors
•   Local Cache option
•   Limitations of Azure Appfabric Cache
•   Guidelines




                       www.cumulux.com       Page 2
• The Caching service
   – is a distributed, in-memory, application cache that can be used to
     accelerate the performance of Windows Azure applications
   – Provided as “PaaS”
   – Built on top of Windows Server
     Appfabric Cache (Velocity)
• Caching Usage
   – Frequently Accessed Data Caching
   – ASP.Net Session State
   – ASP.Net Output Caching




                          www.cumulux.com                                 Page 3
• Configuration (.config)
   – Portal Demo
       •   Login to Windows Azure Portal
       •   Create/Select the cache namespace
       •   Click on View Client Configuration
       •   This configuration provides instructions to configure Azure AppFabric
           caching for data caching
             – Session State Provider
             – Output Caching
   – .config based configuration




                               www.cumulux.com                                     Page 4
• Configuration (Code)
   – Code Block
   –   // Declare array for cache host.          DataCacheServerEndpoint[] servers = new DataCacheServerEndpoint[1];
   –   servers[0] = new DataCacheServerEndpoint("demo101.cache.windows.net", 22233);
   –   // Setup DataCacheSecurity configuration.
   –   string strACSKey = "<copy and paste security key from Azure portal or from the client configuration file>";
   –   var secureACSKey = new System.Security.SecureString();
   –    foreach (char a in strACSKey)
   –    {
   –   secureACSKey.AppendChar(a);
   –    }
   –   secureACSKey.MakeReadOnly();
   –    DataCacheSecurity factorySecurity = new DataCacheSecurity(secureACSKey);
   –   // Setup the DataCacheFactory configuration.
   –   DataCacheFactoryConfiguration factoryConfig = new DataCacheFactoryConfiguration();
   –    factoryConfig.Servers = servers;          factoryConfig.SecurityProperties = factorySecurity;
   –   // Create a configured DataCacheFactory object.
   –    DataCacheFactory cacheFactory = new DataCacheFactory(factoryConfig);
   –    // Get a cache client for the default cache.
   –   DataCache defaultCache = cacheFactory.GetDefaultCache();
   –   // Add and retrieve a test object from the default cache.
   –   defaultCache.Add("key", "valueobject");
   –   string strObject = (string)defaultCache.Get("key");




                                              www.cumulux.com                                                          Page 5
• Usage                                                              Only one instance of
  – Data Cache (Explicit)                                            DataCache is created
                                                                         per instance of
      DataCacheFactory cacheFactory = new DataCacheFactory();          DataCacheFactory
                                                                               and
      dataCache = cacheFactory.GetDefaultCache();                      GetDefaultCache()
                                                                        returns back the
      dataCache.Add(“key”,object,[Timeout]);                          same instance each
      Object o = dataCache.Get(“key”);                                         time


  – ASP.Net Session State (Implicit)
      • .config DistributedCacheSessionStateStoreProvider
  – ASP.Net Output Caching (Implicit)
      • .config DistributedCacheOutputCacheProvider          One DataFactory
                                                            instance used per
                                                               role instance




                            www.cumulux.com
                                  2                                                  Page 6
• Expiration
   – By default, items in a Windows Azure AppFabric cache do not expire
   – We can explicitly set a timeout while adding an item into the cache
• Eviction
   – When exceeds maximum cache size, the least recently used items in the
     cache are evicted




                           www.cumulux.com                                   Page 7
• Configuration
   <sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider">
     <providers>
      <add name="AppFabricCacheSessionStoreProvider"
          type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider,
   Microsoft.Web.DistributedCache"
          cacheName="default"
          useBlobMode="true“
          applicationName=“demo101”
          dataCacheClientName="default" />
     </providers>
    </sessionState>

• Gotchas
         • By default, site name is considered as applicationName
               – Causes issue in Development Emulator due to different site names
                 for multiple instances
         • Avoid temptation to change useBlobMode to “false”
               – Microsoft Support declared it unsupported for Windows Azure




                                      www.cumulux.com                                       Page 8
• Client Side Tracing
   – <dataCacheClient>
       <tracing sinkType="DiagnosticSink" traceLevel="Verbose"/>
       <!-- ... -->
      </dataCacheClient>
• Request Tracking
   – Used by Microsoft Support to diagnose unexpected failures
   – Enabling Client Side Tracing is a must
   – Each request to the Windows Azure Appfabric cache has a request identifier (GUID)
     attached to it. This request identifier is available from the client-side logs




                               www.cumulux.com                                           Page 9
• 128 MB cache for $45.00/month

• 256 MB cache for $55.00/month

• 512 MB cache for $75.00/month

• 1 GB cache for $110.00month

• 2 GB cache for $180.00/month

• 4 GB cache for $325.00/month



                    www.cumulux.com   Page 10
• Memory Quota
   – Cache Size selected/updated for consumption
   – Surpass Situation
      • After maximum size is reached the cache item eviction would
        happen with LRU algorithm




                         www.cumulux.com                              Page 11
Bandwidth
• Network Quota                                Cache Size
                                                                  Transactions
                                                                  Per Hour
                                                                                      MB Per
                                                                                                        Concurrent
                                                                                                        Connections
• Transactions (Reset every hour)                                                     Hour
• Bandwidth (Reset every hour)                 128MB              400000              1400              5
• Concurrent Connections (Static)              256MB              800000              2800              10
                                               512MB              1600000             5600              20
                                               1GB                3200000             11200             40
                                               2GB                6400000             22400             80

• Surpass Situation                            4GB                12800000            44800             160

    – Transactions & Bandwidth
         •   Microsoft.ApplicationServer.Caching.DataCacheException:
             ErrorCode<ERRCA0017>:SubStatus<ES0009>:There is a temporary failure. Please retry later. (The
             request failed because user exceeded quota limits for this hour. If you experience this often,
             upgrade your subscription to a higher one)
    – Connections
         •   ErrorCode<ERRCA0017>:SubStatus<ES0009>:There is a temporary failure. Please retry later. (The
             request failed, because you exceeded quota limits for this hour. If you experience this often, upgrade your
             subscription to a higher one). Additional Information : Throttling due to resource : Connections.




                                         www.cumulux.com                                                              Page 12
• Microsoft.ApplicationServer.Caching.DataCacheException:
  ErrorCode<ERRCA0017>:SubStatus<ES0009>:There is a temporary failure. Please retry
  later. (The request failed because user exceeded quota limits for this hour. If you
  experience this often, upgrade your subscription to a higher one)

• ErrorCode<ERRCA0017>:SubStatus<ES0009>:There is a temporary failure. Please retry
  later. (The request failed, because you exceeded quota limits for this hour. If you
  experience this often, upgrade your subscription to a higher one). Additional Information :
  Throttling due to resource : Connections.

• ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry
  later. (One or more specified cache servers are unavailable, which could be caused
  by busy network or servers. For on-premises cache clusters, also verify the following
  conditions. Ensure that security permission has been granted for this client account, and
  check that the AppFabric Caching Service is allowed through the firewall on all cache
  hosts. Also the MaxBufferSize on the server must be greater than or equal to the
  serialized object size sent from the client.)




                                  www.cumulux.com                                          Page 13
• Faster Cache
     – Cache object is served from the local cache (if exists ) and saves a round
       trip to AppFabric Cache Server
• Configuration
     – <dataCacheClients>
         <dataCacheClient name="default">
         <localCache isEnabled=“true" ttlValue="300" objectCount="10000"/>
            …….
         </dataCacheClient>
•   Supports only TimeoutBased cache invalidations. As of now doesn’t
    support NotificationBased cache invalidations




                              www.cumulux.com                                  Page 14
• The maximum size of a post-serialized object is 8 MB
• Notifications
   – Notifications are not supported in Windows Azure AppFabric Caching.
     This also means that you cannot use notifications to invalidate the local
     cache. In Windows Azure AppFabric, local cache can use only a timeout
     based invalidation policy
• Regions and Tags
   – Windows Azure AppFabric Caching does not support user-created
     regions or tag-based searches
• No support for Named Cache
   – Supports only GetDefaultCache
• No Clear All
• No Get All



                            www.cumulux.com                                  Page 15
• Avoid only “Cache Size Based” selection, also consider bandwidth and
  connection quota too

• Implement Cache Aside Model
    –   Due to Eviction policy applications should be designed to anticipate that items might be
        missing and require reloading at any time.
         • Decorator pattern might come handy in such scenarios where one class implements the
             storage with AppFabric Cache and the decorator does it for persistent storage

• Carefully Enable LocalCache
    –   Since it doesn’t support Notifications, application might get stale data
    –   Generally used for reference data e.g. Country Names, Zip Codes etc.

• DataCacheFactory
    – Fewer the cache factories recreated better is the performance
    – Do not let the DataCacheFactory object get disposed. The life of the DataCache object
      is tied to the DataCacheFactory object
    – Only one instance of DataCache is created per instance of DataCacheFactory and
      GetDefaultCache() returns back the same instance each time




                                     www.cumulux.com                                          Page 16
• Plan for Quotas
   – Transaction, Bandwidth Limits
      • Implement Cache Aside Policy
      • Be aware while load testing and plan accordingly
   – Connection Limits
      • Each DataCacheFactory can create a number of connections. By
        default, a single DataCacheFactory will only create one connection
      • maxConnectionsToServer
          – Specifies the maximum number of channels to open to the cache
            cluster
          – <dataCacheClient name="default"
             maxConnectionsToServer=“2">
      • Singleton implementation would help implement one connection
        per web role instance for DataCacheFactory
      • Do not forget the implicit connections consumed by providers
        (Session and Output Cache providers)




                           www.cumulux.com                                   Page 17
Q&A

      Thank You



www.cumulux.com   Page 18

Mais conteúdo relacionado

Mais procurados

Scaling Wix with microservices architecture and multi-cloud platforms - Reve...
 Scaling Wix with microservices architecture and multi-cloud platforms - Reve... Scaling Wix with microservices architecture and multi-cloud platforms - Reve...
Scaling Wix with microservices architecture and multi-cloud platforms - Reve...Aviran Mordo
 
Alfresco WCM For High Scalability
Alfresco WCM For High ScalabilityAlfresco WCM For High Scalability
Alfresco WCM For High ScalabilityAlfresco Software
 
Scaling wix with microservices architecture devoxx London 2015
Scaling wix with microservices architecture devoxx London 2015Scaling wix with microservices architecture devoxx London 2015
Scaling wix with microservices architecture devoxx London 2015Aviran Mordo
 
ECS19 Anil Erduran and Ryan Pothecary - SQL Server On AWS RDS and Andamazone EC2
ECS19 Anil Erduran and Ryan Pothecary - SQL Server On AWS RDS and Andamazone EC2ECS19 Anil Erduran and Ryan Pothecary - SQL Server On AWS RDS and Andamazone EC2
ECS19 Anil Erduran and Ryan Pothecary - SQL Server On AWS RDS and Andamazone EC2European Collaboration Summit
 
Migrating Customers to Microsoft Azure: Lessons Learned From the Field
Migrating Customers to Microsoft Azure: Lessons Learned From the FieldMigrating Customers to Microsoft Azure: Lessons Learned From the Field
Migrating Customers to Microsoft Azure: Lessons Learned From the FieldIdo Flatow
 
The Essentials of Building Cloud-Based Web Apps with Azure
The Essentials of Building Cloud-Based Web Apps with AzureThe Essentials of Building Cloud-Based Web Apps with Azure
The Essentials of Building Cloud-Based Web Apps with AzureIdo Flatow
 
Trials and Tribulations of Managed Metadata
Trials and Tribulations of Managed MetadataTrials and Tribulations of Managed Metadata
Trials and Tribulations of Managed MetadataScott Hoag
 
Enterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and RedundancyEnterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and RedundancyJohn Giaconia
 
Scaling the Platform for Your Startup
Scaling the Platform for Your StartupScaling the Platform for Your Startup
Scaling the Platform for Your StartupAmazon Web Services
 
Architetture Serverless con SQL Server e Azure Functions
Architetture Serverless con SQL Server e Azure FunctionsArchitetture Serverless con SQL Server e Azure Functions
Architetture Serverless con SQL Server e Azure FunctionsMassimo Bonanni
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...Amazon Web Services
 
Shopzilla - Performance By Design
Shopzilla - Performance By DesignShopzilla - Performance By Design
Shopzilla - Performance By DesignTim Morrow
 
Wix Architecture at Scale - QCon London 2014
Wix Architecture at Scale - QCon London 2014Wix Architecture at Scale - QCon London 2014
Wix Architecture at Scale - QCon London 2014Aviran Mordo
 
Choosing the right Cloud Database
Choosing the right Cloud DatabaseChoosing the right Cloud Database
Choosing the right Cloud DatabaseJanakiram MSV
 
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!Marco Obinu
 
The Best of Both Worlds: Implementing Hybrid IT with AWS (ENT218) | AWS re:In...
The Best of Both Worlds: Implementing Hybrid IT with AWS (ENT218) | AWS re:In...The Best of Both Worlds: Implementing Hybrid IT with AWS (ENT218) | AWS re:In...
The Best of Both Worlds: Implementing Hybrid IT with AWS (ENT218) | AWS re:In...Amazon Web Services
 
Implementing SharePoint on Azure, Lessons Learnt from a Real World Project
Implementing SharePoint on Azure, Lessons Learnt from a Real World ProjectImplementing SharePoint on Azure, Lessons Learnt from a Real World Project
Implementing SharePoint on Azure, Lessons Learnt from a Real World ProjectK.Mohamed Faizal
 

Mais procurados (20)

Scaling Wix with microservices architecture and multi-cloud platforms - Reve...
 Scaling Wix with microservices architecture and multi-cloud platforms - Reve... Scaling Wix with microservices architecture and multi-cloud platforms - Reve...
Scaling Wix with microservices architecture and multi-cloud platforms - Reve...
 
Alfresco WCM For High Scalability
Alfresco WCM For High ScalabilityAlfresco WCM For High Scalability
Alfresco WCM For High Scalability
 
Scaling wix with microservices architecture devoxx London 2015
Scaling wix with microservices architecture devoxx London 2015Scaling wix with microservices architecture devoxx London 2015
Scaling wix with microservices architecture devoxx London 2015
 
ECS19 Anil Erduran and Ryan Pothecary - SQL Server On AWS RDS and Andamazone EC2
ECS19 Anil Erduran and Ryan Pothecary - SQL Server On AWS RDS and Andamazone EC2ECS19 Anil Erduran and Ryan Pothecary - SQL Server On AWS RDS and Andamazone EC2
ECS19 Anil Erduran and Ryan Pothecary - SQL Server On AWS RDS and Andamazone EC2
 
Cnam azure 2015 storage
Cnam azure 2015  storageCnam azure 2015  storage
Cnam azure 2015 storage
 
Migrating Customers to Microsoft Azure: Lessons Learned From the Field
Migrating Customers to Microsoft Azure: Lessons Learned From the FieldMigrating Customers to Microsoft Azure: Lessons Learned From the Field
Migrating Customers to Microsoft Azure: Lessons Learned From the Field
 
AWS database services
AWS database servicesAWS database services
AWS database services
 
The Essentials of Building Cloud-Based Web Apps with Azure
The Essentials of Building Cloud-Based Web Apps with AzureThe Essentials of Building Cloud-Based Web Apps with Azure
The Essentials of Building Cloud-Based Web Apps with Azure
 
Trials and Tribulations of Managed Metadata
Trials and Tribulations of Managed MetadataTrials and Tribulations of Managed Metadata
Trials and Tribulations of Managed Metadata
 
Azure Data Storage
Azure Data StorageAzure Data Storage
Azure Data Storage
 
Enterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and RedundancyEnterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and Redundancy
 
Scaling the Platform for Your Startup
Scaling the Platform for Your StartupScaling the Platform for Your Startup
Scaling the Platform for Your Startup
 
Architetture Serverless con SQL Server e Azure Functions
Architetture Serverless con SQL Server e Azure FunctionsArchitetture Serverless con SQL Server e Azure Functions
Architetture Serverless con SQL Server e Azure Functions
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
 
Shopzilla - Performance By Design
Shopzilla - Performance By DesignShopzilla - Performance By Design
Shopzilla - Performance By Design
 
Wix Architecture at Scale - QCon London 2014
Wix Architecture at Scale - QCon London 2014Wix Architecture at Scale - QCon London 2014
Wix Architecture at Scale - QCon London 2014
 
Choosing the right Cloud Database
Choosing the right Cloud DatabaseChoosing the right Cloud Database
Choosing the right Cloud Database
 
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
 
The Best of Both Worlds: Implementing Hybrid IT with AWS (ENT218) | AWS re:In...
The Best of Both Worlds: Implementing Hybrid IT with AWS (ENT218) | AWS re:In...The Best of Both Worlds: Implementing Hybrid IT with AWS (ENT218) | AWS re:In...
The Best of Both Worlds: Implementing Hybrid IT with AWS (ENT218) | AWS re:In...
 
Implementing SharePoint on Azure, Lessons Learnt from a Real World Project
Implementing SharePoint on Azure, Lessons Learnt from a Real World ProjectImplementing SharePoint on Azure, Lessons Learnt from a Real World Project
Implementing SharePoint on Azure, Lessons Learnt from a Real World Project
 

Destaque

Extend Your Application to the Cloud with SQL Azure Database
Extend Your Application to the Cloud with SQL Azure DatabaseExtend Your Application to the Cloud with SQL Azure Database
Extend Your Application to the Cloud with SQL Azure DatabaseKyle Cressman
 
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...Spiffy
 
Microsoft Windows Azure Platform Appfabric for Technical Decision Makers
Microsoft Windows Azure Platform Appfabric for Technical Decision MakersMicrosoft Windows Azure Platform Appfabric for Technical Decision Makers
Microsoft Windows Azure Platform Appfabric for Technical Decision MakersMicrosoft Private Cloud
 
A Lap Around the Windows Azure AppFabric
A Lap Around the Windows Azure AppFabricA Lap Around the Windows Azure AppFabric
A Lap Around the Windows Azure AppFabricWade Wegner
 
Windows Azure AppFabric
Windows Azure AppFabricWindows Azure AppFabric
Windows Azure AppFabricDavid Chou
 
Covering the earth and the cloud the next generation of spatial in sql server...
Covering the earth and the cloud the next generation of spatial in sql server...Covering the earth and the cloud the next generation of spatial in sql server...
Covering the earth and the cloud the next generation of spatial in sql server...Texas Natural Resources Information System
 
Creando vms con azure power shell
Creando vms con azure power shellCreando vms con azure power shell
Creando vms con azure power shellVíctor Moreno
 
Sql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & IkeSql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & IkeIke Ellis
 
Entendendo Microsoft Application Server: Windows Server AppFabric, WF, WCF, W...
Entendendo Microsoft Application Server: Windows Server AppFabric, WF, WCF, W...Entendendo Microsoft Application Server: Windows Server AppFabric, WF, WCF, W...
Entendendo Microsoft Application Server: Windows Server AppFabric, WF, WCF, W...Evilázaro Alves
 
SQL Azure Federation and Scalability
SQL Azure Federation and ScalabilitySQL Azure Federation and Scalability
SQL Azure Federation and ScalabilityEduardo Castro
 
Microsoft Windows Azure - Platfrom Appfabric Service Bus And Access Control P...
Microsoft Windows Azure - Platfrom Appfabric Service Bus And Access Control P...Microsoft Windows Azure - Platfrom Appfabric Service Bus And Access Control P...
Microsoft Windows Azure - Platfrom Appfabric Service Bus And Access Control P...Microsoft Private Cloud
 
Scaling with SQL Server and SQL Azure Federations
Scaling with SQL Server and SQL Azure FederationsScaling with SQL Server and SQL Azure Federations
Scaling with SQL Server and SQL Azure FederationsMichael Rys
 
Migrating Data-Centric Applications to Windows Azure
Migrating Data-Centric Applications to Windows AzureMigrating Data-Centric Applications to Windows Azure
Migrating Data-Centric Applications to Windows AzureBrian Bendera
 
Bases de datos SQL Azure en Microsoft Azure con C#
Bases de datos SQL Azure en Microsoft Azure con C#Bases de datos SQL Azure en Microsoft Azure con C#
Bases de datos SQL Azure en Microsoft Azure con C#Víctor Moreno
 
Hands-On with U-SQL and Azure Data Lake Analytics (ADLA)
Hands-On with U-SQL and Azure Data Lake Analytics (ADLA)Hands-On with U-SQL and Azure Data Lake Analytics (ADLA)
Hands-On with U-SQL and Azure Data Lake Analytics (ADLA)Jason L Brugger
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersMichael Rys
 
Azure Data Lake and U-SQL
Azure Data Lake and U-SQLAzure Data Lake and U-SQL
Azure Data Lake and U-SQLMichael Rys
 
Azure Data Lake Intro (SQLBits 2016)
Azure Data Lake Intro (SQLBits 2016)Azure Data Lake Intro (SQLBits 2016)
Azure Data Lake Intro (SQLBits 2016)Michael Rys
 

Destaque (19)

SQL Azure
SQL AzureSQL Azure
SQL Azure
 
Extend Your Application to the Cloud with SQL Azure Database
Extend Your Application to the Cloud with SQL Azure DatabaseExtend Your Application to the Cloud with SQL Azure Database
Extend Your Application to the Cloud with SQL Azure Database
 
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
 
Microsoft Windows Azure Platform Appfabric for Technical Decision Makers
Microsoft Windows Azure Platform Appfabric for Technical Decision MakersMicrosoft Windows Azure Platform Appfabric for Technical Decision Makers
Microsoft Windows Azure Platform Appfabric for Technical Decision Makers
 
A Lap Around the Windows Azure AppFabric
A Lap Around the Windows Azure AppFabricA Lap Around the Windows Azure AppFabric
A Lap Around the Windows Azure AppFabric
 
Windows Azure AppFabric
Windows Azure AppFabricWindows Azure AppFabric
Windows Azure AppFabric
 
Covering the earth and the cloud the next generation of spatial in sql server...
Covering the earth and the cloud the next generation of spatial in sql server...Covering the earth and the cloud the next generation of spatial in sql server...
Covering the earth and the cloud the next generation of spatial in sql server...
 
Creando vms con azure power shell
Creando vms con azure power shellCreando vms con azure power shell
Creando vms con azure power shell
 
Sql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & IkeSql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & Ike
 
Entendendo Microsoft Application Server: Windows Server AppFabric, WF, WCF, W...
Entendendo Microsoft Application Server: Windows Server AppFabric, WF, WCF, W...Entendendo Microsoft Application Server: Windows Server AppFabric, WF, WCF, W...
Entendendo Microsoft Application Server: Windows Server AppFabric, WF, WCF, W...
 
SQL Azure Federation and Scalability
SQL Azure Federation and ScalabilitySQL Azure Federation and Scalability
SQL Azure Federation and Scalability
 
Microsoft Windows Azure - Platfrom Appfabric Service Bus And Access Control P...
Microsoft Windows Azure - Platfrom Appfabric Service Bus And Access Control P...Microsoft Windows Azure - Platfrom Appfabric Service Bus And Access Control P...
Microsoft Windows Azure - Platfrom Appfabric Service Bus And Access Control P...
 
Scaling with SQL Server and SQL Azure Federations
Scaling with SQL Server and SQL Azure FederationsScaling with SQL Server and SQL Azure Federations
Scaling with SQL Server and SQL Azure Federations
 
Migrating Data-Centric Applications to Windows Azure
Migrating Data-Centric Applications to Windows AzureMigrating Data-Centric Applications to Windows Azure
Migrating Data-Centric Applications to Windows Azure
 
Bases de datos SQL Azure en Microsoft Azure con C#
Bases de datos SQL Azure en Microsoft Azure con C#Bases de datos SQL Azure en Microsoft Azure con C#
Bases de datos SQL Azure en Microsoft Azure con C#
 
Hands-On with U-SQL and Azure Data Lake Analytics (ADLA)
Hands-On with U-SQL and Azure Data Lake Analytics (ADLA)Hands-On with U-SQL and Azure Data Lake Analytics (ADLA)
Hands-On with U-SQL and Azure Data Lake Analytics (ADLA)
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for Developers
 
Azure Data Lake and U-SQL
Azure Data Lake and U-SQLAzure Data Lake and U-SQL
Azure Data Lake and U-SQL
 
Azure Data Lake Intro (SQLBits 2016)
Azure Data Lake Intro (SQLBits 2016)Azure Data Lake Intro (SQLBits 2016)
Azure Data Lake Intro (SQLBits 2016)
 

Semelhante a Azure appfabric caching intro and tips

More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)Michael Collier
 
Rails Caching: Secrets From the Edge
Rails Caching: Secrets From the EdgeRails Caching: Secrets From the Edge
Rails Caching: Secrets From the EdgeFastly
 
Rails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeRails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeMichael May
 
More Cache for Less Cash
More Cache for Less CashMore Cache for Less Cash
More Cache for Less CashMichael Collier
 
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricScale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricWim Van den Broeck
 
VMworld 2013: Extreme Performance Series: Storage in a Flash
VMworld 2013: Extreme Performance Series: Storage in a Flash VMworld 2013: Extreme Performance Series: Storage in a Flash
VMworld 2013: Extreme Performance Series: Storage in a Flash VMworld
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webC2B2 Consulting
 
Accelerating Rails with edge caching
Accelerating Rails with edge cachingAccelerating Rails with edge caching
Accelerating Rails with edge cachingMichael May
 
Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsDavide Carnevali
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...ColdFusionConference
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Shailendra Prasad
 
Where is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleWhere is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleRafał Leszko
 
Cloud computing 3702
Cloud computing 3702Cloud computing 3702
Cloud computing 3702Jess Coburn
 
EXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application ClusteringEXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application ClusteringEXPERTALKS
 
Four Ways to Improve ASP .NET Performance and Scalability
 Four Ways to Improve ASP .NET Performance and Scalability Four Ways to Improve ASP .NET Performance and Scalability
Four Ways to Improve ASP .NET Performance and ScalabilityAlachisoft
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWSTom Laszewski
 

Semelhante a Azure appfabric caching intro and tips (20)

More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)
 
Rails Caching: Secrets From the Edge
Rails Caching: Secrets From the EdgeRails Caching: Secrets From the Edge
Rails Caching: Secrets From the Edge
 
Rails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeRails Caching Secrets from the Edge
Rails Caching Secrets from the Edge
 
More Cache for Less Cash
More Cache for Less CashMore Cache for Less Cash
More Cache for Less Cash
 
AppFabric Velocity
AppFabric VelocityAppFabric Velocity
AppFabric Velocity
 
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricScale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabric
 
VMworld 2013: Extreme Performance Series: Storage in a Flash
VMworld 2013: Extreme Performance Series: Storage in a Flash VMworld 2013: Extreme Performance Series: Storage in a Flash
VMworld 2013: Extreme Performance Series: Storage in a Flash
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-web
 
Accelerating Rails with edge caching
Accelerating Rails with edge cachingAccelerating Rails with edge caching
Accelerating Rails with edge caching
 
Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cacheMini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
 
Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limits
 
Caching in Kentico 11
Caching in Kentico 11Caching in Kentico 11
Caching in Kentico 11
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
 
Where is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleWhere is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by example
 
Cloud computing 3702
Cloud computing 3702Cloud computing 3702
Cloud computing 3702
 
EXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application ClusteringEXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application Clustering
 
Four Ways to Improve ASP .NET Performance and Scalability
 Four Ways to Improve ASP .NET Performance and Scalability Four Ways to Improve ASP .NET Performance and Scalability
Four Ways to Improve ASP .NET Performance and Scalability
 
Deep Dive Amazon EC2
Deep Dive Amazon EC2Deep Dive Amazon EC2
Deep Dive Amazon EC2
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
 

Último

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Último (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

Azure appfabric caching intro and tips

  • 1. Azure App Fabric Caching Sachin Sancheti sachin@cumulux.com www.cumulux.com www.cumulux.com Page 1
  • 2. Introduction to Azure App Fabric Cache • Configuration and Usage • Session State Provider Gotchas • Tracing • Understanding Quota & Common Errors • Local Cache option • Limitations of Azure Appfabric Cache • Guidelines www.cumulux.com Page 2
  • 3. • The Caching service – is a distributed, in-memory, application cache that can be used to accelerate the performance of Windows Azure applications – Provided as “PaaS” – Built on top of Windows Server Appfabric Cache (Velocity) • Caching Usage – Frequently Accessed Data Caching – ASP.Net Session State – ASP.Net Output Caching www.cumulux.com Page 3
  • 4. • Configuration (.config) – Portal Demo • Login to Windows Azure Portal • Create/Select the cache namespace • Click on View Client Configuration • This configuration provides instructions to configure Azure AppFabric caching for data caching – Session State Provider – Output Caching – .config based configuration www.cumulux.com Page 4
  • 5. • Configuration (Code) – Code Block – // Declare array for cache host. DataCacheServerEndpoint[] servers = new DataCacheServerEndpoint[1]; – servers[0] = new DataCacheServerEndpoint("demo101.cache.windows.net", 22233); – // Setup DataCacheSecurity configuration. – string strACSKey = "<copy and paste security key from Azure portal or from the client configuration file>"; – var secureACSKey = new System.Security.SecureString(); – foreach (char a in strACSKey) – { – secureACSKey.AppendChar(a); – } – secureACSKey.MakeReadOnly(); – DataCacheSecurity factorySecurity = new DataCacheSecurity(secureACSKey); – // Setup the DataCacheFactory configuration. – DataCacheFactoryConfiguration factoryConfig = new DataCacheFactoryConfiguration(); – factoryConfig.Servers = servers; factoryConfig.SecurityProperties = factorySecurity; – // Create a configured DataCacheFactory object. – DataCacheFactory cacheFactory = new DataCacheFactory(factoryConfig); – // Get a cache client for the default cache. – DataCache defaultCache = cacheFactory.GetDefaultCache(); – // Add and retrieve a test object from the default cache. – defaultCache.Add("key", "valueobject"); – string strObject = (string)defaultCache.Get("key"); www.cumulux.com Page 5
  • 6. • Usage Only one instance of – Data Cache (Explicit) DataCache is created per instance of DataCacheFactory cacheFactory = new DataCacheFactory(); DataCacheFactory and dataCache = cacheFactory.GetDefaultCache(); GetDefaultCache() returns back the dataCache.Add(“key”,object,[Timeout]); same instance each Object o = dataCache.Get(“key”); time – ASP.Net Session State (Implicit) • .config DistributedCacheSessionStateStoreProvider – ASP.Net Output Caching (Implicit) • .config DistributedCacheOutputCacheProvider One DataFactory instance used per role instance www.cumulux.com 2 Page 6
  • 7. • Expiration – By default, items in a Windows Azure AppFabric cache do not expire – We can explicitly set a timeout while adding an item into the cache • Eviction – When exceeds maximum cache size, the least recently used items in the cache are evicted www.cumulux.com Page 7
  • 8. • Configuration <sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider"> <providers> <add name="AppFabricCacheSessionStoreProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" useBlobMode="true“ applicationName=“demo101” dataCacheClientName="default" /> </providers> </sessionState> • Gotchas • By default, site name is considered as applicationName – Causes issue in Development Emulator due to different site names for multiple instances • Avoid temptation to change useBlobMode to “false” – Microsoft Support declared it unsupported for Windows Azure www.cumulux.com Page 8
  • 9. • Client Side Tracing – <dataCacheClient> <tracing sinkType="DiagnosticSink" traceLevel="Verbose"/> <!-- ... --> </dataCacheClient> • Request Tracking – Used by Microsoft Support to diagnose unexpected failures – Enabling Client Side Tracing is a must – Each request to the Windows Azure Appfabric cache has a request identifier (GUID) attached to it. This request identifier is available from the client-side logs www.cumulux.com Page 9
  • 10. • 128 MB cache for $45.00/month • 256 MB cache for $55.00/month • 512 MB cache for $75.00/month • 1 GB cache for $110.00month • 2 GB cache for $180.00/month • 4 GB cache for $325.00/month www.cumulux.com Page 10
  • 11. • Memory Quota – Cache Size selected/updated for consumption – Surpass Situation • After maximum size is reached the cache item eviction would happen with LRU algorithm www.cumulux.com Page 11
  • 12. Bandwidth • Network Quota Cache Size Transactions Per Hour MB Per Concurrent Connections • Transactions (Reset every hour) Hour • Bandwidth (Reset every hour) 128MB 400000 1400 5 • Concurrent Connections (Static) 256MB 800000 2800 10 512MB 1600000 5600 20 1GB 3200000 11200 40 2GB 6400000 22400 80 • Surpass Situation 4GB 12800000 44800 160 – Transactions & Bandwidth • Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0009>:There is a temporary failure. Please retry later. (The request failed because user exceeded quota limits for this hour. If you experience this often, upgrade your subscription to a higher one) – Connections • ErrorCode<ERRCA0017>:SubStatus<ES0009>:There is a temporary failure. Please retry later. (The request failed, because you exceeded quota limits for this hour. If you experience this often, upgrade your subscription to a higher one). Additional Information : Throttling due to resource : Connections. www.cumulux.com Page 12
  • 13. • Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0009>:There is a temporary failure. Please retry later. (The request failed because user exceeded quota limits for this hour. If you experience this often, upgrade your subscription to a higher one) • ErrorCode<ERRCA0017>:SubStatus<ES0009>:There is a temporary failure. Please retry later. (The request failed, because you exceeded quota limits for this hour. If you experience this often, upgrade your subscription to a higher one). Additional Information : Throttling due to resource : Connections. • ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.) www.cumulux.com Page 13
  • 14. • Faster Cache – Cache object is served from the local cache (if exists ) and saves a round trip to AppFabric Cache Server • Configuration – <dataCacheClients> <dataCacheClient name="default"> <localCache isEnabled=“true" ttlValue="300" objectCount="10000"/> ……. </dataCacheClient> • Supports only TimeoutBased cache invalidations. As of now doesn’t support NotificationBased cache invalidations www.cumulux.com Page 14
  • 15. • The maximum size of a post-serialized object is 8 MB • Notifications – Notifications are not supported in Windows Azure AppFabric Caching. This also means that you cannot use notifications to invalidate the local cache. In Windows Azure AppFabric, local cache can use only a timeout based invalidation policy • Regions and Tags – Windows Azure AppFabric Caching does not support user-created regions or tag-based searches • No support for Named Cache – Supports only GetDefaultCache • No Clear All • No Get All www.cumulux.com Page 15
  • 16. • Avoid only “Cache Size Based” selection, also consider bandwidth and connection quota too • Implement Cache Aside Model – Due to Eviction policy applications should be designed to anticipate that items might be missing and require reloading at any time. • Decorator pattern might come handy in such scenarios where one class implements the storage with AppFabric Cache and the decorator does it for persistent storage • Carefully Enable LocalCache – Since it doesn’t support Notifications, application might get stale data – Generally used for reference data e.g. Country Names, Zip Codes etc. • DataCacheFactory – Fewer the cache factories recreated better is the performance – Do not let the DataCacheFactory object get disposed. The life of the DataCache object is tied to the DataCacheFactory object – Only one instance of DataCache is created per instance of DataCacheFactory and GetDefaultCache() returns back the same instance each time www.cumulux.com Page 16
  • 17. • Plan for Quotas – Transaction, Bandwidth Limits • Implement Cache Aside Policy • Be aware while load testing and plan accordingly – Connection Limits • Each DataCacheFactory can create a number of connections. By default, a single DataCacheFactory will only create one connection • maxConnectionsToServer – Specifies the maximum number of channels to open to the cache cluster – <dataCacheClient name="default" maxConnectionsToServer=“2"> • Singleton implementation would help implement one connection per web role instance for DataCacheFactory • Do not forget the implicit connections consumed by providers (Session and Output Cache providers) www.cumulux.com Page 17
  • 18. Q&A Thank You www.cumulux.com Page 18