Summary

This is a high overview of an online eCommerce store for millions of users on a global scale. 

The architecture takes under consideration:

  1. DB configuration depending on needs such as read optimized, write optimized.
  2. DB configuration Consistency vs Availability
  3. Integration and possible issues with external entities such as Shipping and Payment
  4. Analytics e.g. Merchants knowledge on product visits – real time data, historical projected trends
  5. Multiple geo locations
  6. Spikes of availability (sales season, holidays)

Architecture Patterns:

Event driven

  1. Lambda Architecture (Speed, Batch layers)
  2. CQRS Pattern


Process followed:

  1. Gathering Functional/Non-Functional Requirements
  2. Diagram – Sequence / Addressing interactions
  3. Defining the System API
  4. Architecture / Addressing Requirements

 

 What is not represented:

  1. Relations between entities
  2. Global Load Balancing Service
  3. Multiple Data Centers

Requirements

Functional Requirements

Merchants

  1. Digital product(ebooks, music) or physical products
  2. What products does merchant provide
  3. What data do we need to provide to the merchant
  4. What operations can a merchant perform

Product Management system

  1. Signup
  2. Create products
  3. Update product properties
  4. Update product inventory
  5. View product data

Product Analytics

  1. View real time product page visitors
  2. View historical/projected product performance

Buyers

1. Can anyone browse and purchase or need register?

  1. Review rating -No
  2. Search capabilities – no

2. What parts of checkout exp we need 

3. Mobile and/or browser

Requirements

  1. Physical limited inventory-> Title description categories images etc

Interface

Storefront 

  1. Browse search products based on title, categories, description
  2. No registration
  3. No reviews 

Store checkout

  1. Navigate to checkout page – full info price +tax
  2. Complete purchase providing shipping + payment info
  3. Send order update via email/push notifications to user

Complexity 

  1. Multiple actors (merchants, users)
  2. External services (payment API, delivery system API)

Quality attributes requirements

Merchants 

Scalability (not very high)

  1. Just hundreds of merchants
  2. Low traffic
  3. Thousand of products only

Performance

  1. Response time <1 second at 50th percentile – dont need super fast

Consistency vs Availability

  1. CP database(s) – always need most correct data

 

High Availability

1.Not that critical so 99.5% uptime

End Users

Scalability most important 10s of millions in different countries, holidays, sales

Performance <200 ms 50p, 500ms 99p

Consistency vs Availability-> Storefront: AP, Checkout: CP

High availability -> no external SLA, internal SLA uptime of 99.9%