Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Scalable Caching for Microservices

Scalable Caching for Microservices

As enterprises move towards hierarchical microservices architecture, Architects are often tasked to develop performant and scalable microservices which necessitates the need for data caching. A platform managed Caching solution inside Pivotal Cloud Foundry(PCF) makes it easy for these microservices to consume low latency caching while delivering self-provisioning for developers and automated Day 2 operations. In this talk, you will learn about how Pivotal Cloud Cache(PCC) helps enterprises boost microservices app performance and deliver the seamless user experiences to their customers!

AMEY BANARSE

April 29, 2019
Tweet

More Decks by AMEY BANARSE

Other Decks in Technology

Transcript

  1. Internet Scale Caching @ Netflix 3 “The Netflix customer experience

    relies heavily on caches to provide a high-volume, low latency, globally available data layer that backs our stateless services. Throughout a typical customer experience, from sitting down on the couch through playing a movie, caches play a role in every interaction.” #CachesEverywhere http://bit.ly/netflix-caching-2016
  2. Create Service Plans Define Quotas Deploy PCC Broker Quotas -

    Max Cluster Size - Max # of Clusters On-Demand Service Broker - OpsMan Tile - Register with Marketplace Define Plans - Define VMs - Define Memory - Define CPU - Define Disk Size
  3. On-Demand Service • Eliminate the “noisy neighbor” problem when one

    application hogs resources on a shared cluster • No need to pre-provision a fixed quantity of IaaS resources • Scale resource consumption linearly with need, without having to plan for pre-provisioning • App developers get more control over resources, and do not have to acquire them through the operator
  4. Scalable Data and Session Caching • • • • 1

    2 Cache Server Cache Server Cache Server Locator 1 2 3 3 1 Locator PCC Client Connection Pool 54.209.251.110 54.209.251.111 54.209.251.112 Locator Cache Server 2 54.209.251.113 PCF AZ 1 PCF AZ 2
  5. PCC Topology Members Cache Server • In-Memory Storage for Data

    Regions • Standard PCC Process with one Cache Server per JVM Cache Server Cache Server Cache Server Locator Locator • Cluster Discovery & Config • Load Balancing for Servers • Cache Server Cache Server Cache Server Locator
  6. Regions 17 • Synonymous to a Table in NoSQL terminology

    • Stores Data in <Key,Value> pairs with unique Keys • Divided into buckets across Cache Members
  7. Data Aware Clients Locator PCC Client Connection Pool Cache Server

    Cache Server Partitioned Region Cache Server 0 23 4 11 44 45 72 18 Total 113 Buckets (Configurable) 2 3 Target Bucket = Hash(Key) % Number of Buckets 1
  8. Failing data copies are replaced transparently Data is replicated to

    other clusters and sites (WAN) Split Brain Detection is enabled Client and cluster disconnections are handled gracefully Data is persisted on local disk for ultimate durability “split brain”
  9. Cross PCF Foundations Active-Active Replication Pivotal Application Service Pivotal Application

    Service East Foundation Central Foundation Services Network 10.0.16.0/26 ERT Network 10.0.8.0/24 Services Network 10.0.24.0/26 ERT Network 10.0.8.0/24 Google VPN Gateway Secure VPN Tunnel Pivotal Application Service Google VPN Gateway
  10. Client Side Eventing Client Subscriptions ◦ Client interest in server

    side event changes ◦ Filter events based on RegEx Interest Continuous Query(CQ) ◦ Register interest through server side queries ◦ Suitable for creating dashboards