2. So, whatâs in an E-Commerce Store?
Slide 2
Catalogs
State
Discounts
Inventory
Fulfillment
Social Integration
Payment
Note: This image is for illustrative purposes only. MindTree does not recommend or associate itself with either this site, or the products displayed here. Any copyrights belong to their respective owners
Analytics
Cross-sell
Content
Search
Seasonality
00000
Ads
Personalization
Cust. Service
5. The Key to ScalabilityâŚ
Slide 5
â˘Ability of a system to handle or be enlarged to handle growing amounts of work
gracefully
⌠is to understand what it is
â˘Identify bottlenecks, and mitigate
â˘Identify load sources, and minimize
⌠is to keep principles simple
â˘âHow scalable do you want it?â (Do you have the NFRs?)
⌠is to understand whatâs expected
â˘If my look-to-book ratio is 90:10, can I scale differently?
â˘Do I always need to depend on the scalability of my partners?
â˘Do all of my subsystems need to scale equally?
â˘If my load is seasonal, should I be safe and overprovision?
⌠is to exploit system characteristics
6. IntegrationMiddleware
So whatâs Different?
Slide 6
Lots of integration â
and dependencies
Combo of content
and Data
Complicated rules
spanning entities
Rich and useful data
to be analyzed and
mined
The breadwinner!
Many different
channels â and loadLots of these guys
(hopefully!)
Some typical usage
patterns
Lots of potential plus
lots of load
7. Mapping to Scalability Considerations
ďŹMultiple channels
ďŹUser behavior
ďŹSocial Content
Slide 7
ďŹContent + Data
ďŹRules and analytics
ďŹIntegration â and dependencies
8. Scalability Strategies: Multiple Channels
⢠Scale out
⢠Minimize state for better load balancing, and to reduce memory footprint
⢠Use CDNs to farm out traffic to other sites, or consider A/A DCâs
⢠Exploit client capability, and minimize traffic
⢠Leverage device profile to serve appropriate content
⢠Scale out
⢠Minimize state for better load balancing, and to reduce memory footprint
⢠Use CDNs to farm out traffic to other sites, or consider A/A DCâs
⢠Exploit client capability, and minimize traffic
⢠Leverage device profile to serve appropriate content
Frontends
⢠Use lightweight protocols
⢠Split between presentation services and interface services and choose
granularity
⢠Use lightweight protocols
⢠Split between presentation services and interface services and choose
granularity
Services
Slide 8
9. Scalability Strategies: Content, Social Traffic
⢠Content and data scale differently â so scale them independently
⢠Mash up content, UGC, and catalog data in a portal
⢠Leverage CMSâ caching as far as possible
⢠Consider publishing static HTML
⢠Organize CMS structures appropriately
⢠Use CDNs or servers appropriate to the purpose
⢠Content and data scale differently â so scale them independently
⢠Mash up content, UGC, and catalog data in a portal
⢠Leverage CMSâ caching as far as possible
⢠Consider publishing static HTML
⢠Organize CMS structures appropriately
⢠Use CDNs or servers appropriate to the purpose
Content
⢠Separate onto other servers
⢠Leverage existing social network platforms
⢠Separate onto other servers
⢠Leverage existing social network platforms
UGC
Slide 9
10. Scalability Strategies: User Behavior
Slide 10
â˘Separate reads and writes; scale out read nodes using replication / master-slave, âŚ
â˘Split functionality between database instances
â˘Use sharding (carefully) to partition and scale out writes
â˘Choose optimistic reads (carefully) to minimize locks
â˘Separate reads and writes; scale out read nodes using replication / master-slave, âŚ
â˘Split functionality between database instances
â˘Use sharding (carefully) to partition and scale out writes
â˘Choose optimistic reads (carefully) to minimize locks
Data
â˘A fair bit of data changes slowly â cache aggressively: catalogs, content, âŚ
â˘Try and cache inventory levels as well, based on thresholds
â˘A fair bit of data changes slowly â cache aggressively: catalogs, content, âŚ
â˘Try and cache inventory levels as well, based on thresholds
Minimize I/O
â˘Create private clouds or leverage public / hybrid cloudsâ˘Create private clouds or leverage public / hybrid clouds
Elasticity
11. Scalability Strategies: Rules and Analytics
Slide 11
⢠Classify into cross-sell rules, transaction processing rules
⢠Cross-sell rules more heavily used, use more data
⢠Pre-compute results - not everything needs to be real-time
⢠Reduce target datasets - not everything is against the universe
⢠Classify into cross-sell rules, transaction processing rules
⢠Cross-sell rules more heavily used, use more data
⢠Pre-compute results - not everything needs to be real-time
⢠Reduce target datasets - not everything is against the universe
Rules
⢠Separate analytics from transactional systems
⢠Run them off of their own instance
⢠Separate analytics from transactional systems
⢠Run them off of their own instance
Analytics
12. Scalability Strategies: Integration
Slide 12
⢠Use synchronous calls only when needed (for example, payments)
⢠Use queuing for durability and throttling
⢠Have a fallback mechanism:
⢠Last dayâs inventory in case the inventory system isnât coping
⢠Backend payment if payment gateway isnât coping
⢠Consider batch mode integration vs. real-time always
⢠Use synchronous calls only when needed (for example, payments)
⢠Use queuing for durability and throttling
⢠Have a fallback mechanism:
⢠Last dayâs inventory in case the inventory system isnât coping
⢠Backend payment if payment gateway isnât coping
⢠Consider batch mode integration vs. real-time always
Dependencies
13. Strategies for Commerce Engines
ďŹUse products (commercial | open source) for commerce, content,
search, etc.
ďŹChoose taxonomy and design carefully
ďŹCatalogs, virtual catalogs, materialized catalogs, catalog sets, page
snapshots, âŚ
ďŹContent taxonomy
ďŹCache appropriately
ďŹContent caching at browser, CDN, CMS, commerce engine, âŚ
ďŹCommerce caching for catalogs, ad rules, pricing and inventory, âŚ
ďŹScale appropriately
ďŹConsider data volumes (catalog sizes, user base, âŚ) for sharding or
partitioning
ďŹFollow vendor best practices for scaling
Slide 13
14. General Scalability Strategies
ďŹ Use statelessness to scale better
ďŹ Choose shared-nothing models to scale best
ďŹ Choose shared-(something) or externalized state models with due considerations
ďŹ Reduce HTTP requests and payload
ďŹ Use techniques like file versioning, sprites, inline images, compression, âŚ
ďŹ Be asynchronous where possible
ďŹ When calling backend systems, for example
ďŹ Choose faster (or lesser) I/O to minimize latency
ďŹ Cache aggressively
ďŹ Use faster I/O where possible
ďŹ Keep data small and archive aggressively to scale I/O and DBs
ďŹ Keep data close helps use network better and to reduce latency
ďŹ Write good code!
Slide 14
15. In Summary
ďŹKnow what you are looking to achieve
ďŹNFRs, business outlook
ďŹExploit usage characteristics
ďŹRead/write ratios, acceptable lags, functional separation
ďŹDesign for scale
ďŹStatelessness, service granularity, protocols
ďŹReduce load
ďŹPre-compute data, cache aggressively, offload
ďŹIdentify subsystem scalability needs
ďŹScale whatâs needed, not everything
ďŹLeverage others!
ďŹProduct capabilities, CDNs, cloud providers, social networking platforms
Slide 15