3. Business Context
• Omni-channel order management
• Over 250K order lines per hour
• Multiple complex rules based on order line type
• Orchestrate fulfillment and bridge a number of dependent systems
• Inventory operations and promising
• 1500 tps at present
• Roadmap to 30,000 tps
4. Existing Applications
• Evolved over many years
• Critical business functions
• SOA compliant for the most part
• Not that beautiful, always
• Challenging to keep pace with desired state of change
• Risk Management with big bang deploys
5. Architectural Transformation
• Break down large monoliths into micro-services
• Deployed on Cloud foundry
• On IAAS of choice
• Cloud
• Hybrid
• On prem
• Polyglot persistence strategy
• Relational
• Distributed No Sql
• Search Engines
• In-Memory – Redis
• Redis usage on PAAS ubiquitous
6. Architectural Transformation - How
• Take on the pieces that can be easily offloaded into a new process.
• Keep the current flow as fall back
• Strangler pattern the most useful
• Deploy for subset of volume and maintain low risk
• Polyglot persistence
7. Specific challenge
• Scaling a critical monolithic application on rdbms
• Not enough time to redo critical portions completely
• Enter Redis
8. Patterns of Usage – Concurrency management
• Managing concurrency for critical entities
• Challenges with wait events on rdbms
• Database degradation, quickly
• Detecting contract violations
• Wrapper around the existing system to manage concurrency.
• Reduced wait times
• Improved DB health and reduced blocks by over 95%
• The best usage of 1G of RAM
• Distributed Lock Manager
• Considered ZK but leveraged Redis
• Custom backing store with Cassandra – setting up Redis cluster
9. Patterns of Usage – Cache
• Read cache
• Loaded most of catalog data
• Variety of master data as a pattern
• Leader board and transactional data
10. Patterns of Usage – Cache
• Write-through Cache
• Live transactional data
• Write-back cache
• Log buffering and filtering on PAAS
• Make up for flooding infrastructure otherwise
• CQRS - limited scenarios which fit in-memory
11. Patterns of Usage – Trace and troubleshoot
• Transaction timer system
• Set the exact entry-exit exit points
• Call Stacks
• Trace transaction flow
• Detect and push anomalies to dashboards and ops
• Leverage Sorted Sets and Pub/Sub
• Track stats for the process
12. Patterns of Usage – Trace and troubleshoot
• Transaction timer system
13. Patterns of Usage – Powering algorithms
• Implement key inventory computation algorithms
• Sorted Sets and Redis Geo
• Inventory sourcing
• Calculation of ATP with event within supply chain
14. Patterns of Usage – Powering algorithms
• Lists, Sets and Hashes
• Shared data/ aggregated views across processes
• Hyperloglog for count distinct
• How many unique customers
• How many sales per item
• How many sales per item category
• Multi attribute uniqueness match
• Compare against about 200 mil records
• Hash + Search
• Reduced DB CPU by 8%
15. Next Steps
• Setup Cluster
• So far using NoSQL/SQL as failover
• Provision redis servers on-demand
• On-prem
• Off-prem
• Onboard familiar patterns
• Identify others