If I need to design the system architecture for a scalable site like amazon/BestBuy, what can be high level system architecture. googled it but did not get much data points.

Below is the high level system diagram based on mine understanding

enter image description here

To illustrate mine understanding I will take two use cases

  1. Inventory addition to system by seller
  2. Product search by user

Inventory addition to system by seller :- Seller can upload individual product or he can do bulk upload though any agreed upon format say Excel, CSV etc.

  1. Once he does seller upload call will go web server (thru load balancer)
  2. Some business services will exist with in that webserver. For example If I use tomcat(java based web server), java based services can lie with in tomcat. some other service in other/same language can exists as separate process with in same/different machine based on hardware configuration.
  3. web server will execute seller upload service which will segregate the products based on category and upload it in memcached cluster. This will ensure seller gets the fast response time. There will be separate multiple memcached servers for each category(they will be replicated to handle the server crash)
  4. Asynch batch jobs in the background will read the data from these memcached clusters and stores it in DB(Mongo DB). Once stored it will update the memcached entry with productId

Product search by user:- user can type any product name and search . This seems to me trick from scaling point of view. I can think of two approaches here

Cached based approach

  1. Keep list of product in memcache say phone.This phone list can contain map where key can be brandName and can be map again. This nested map will contain model as key and product detail as key. Product detail can further contain list of sellers etc.

  2. Now search servive will execute multi get requests(probably map reduce can be leveraged here) to all products stored cache lusters
    as system does not know what is the category that name belongs

Fetch it from DB

  1. As we have sharded DB . load is already distributed on DB server. So we can hit the DB, makes use of DB index and fetch details

  2. This point will be same as point 2 in above approach.

Not sure which one is more appropriate and used by any of the major ecommerce app ?

Also Does this architecture looks scalable ? Any improvement points ?

  • Stackexchange.com (.NET) and basecamp.com (Ruby) have documented how they have built and scaled their sites. Search for those. You'll probably fined the cached approach is something they have in common.
    – JeffO
    Mar 20 '17 at 12:37
  • Thanks JeffO for pointers. I think you are referring the resources like nickcraver.com/blog/2016/02/17/… and stackexchange.com/performance. I have started going through it. Do you have any suggestion/take on mine understanding of above architecture ? Mar 20 '17 at 14:17
  • Sorry, this is way too broad and an answer in this format shouldn't even be attempted.
    – JeffO
    Mar 20 '17 at 19:11
  • @JeffO Ok. Posted another question to confirm the technical understanding on particular one aspect of ecommerce i.e. product search . Here is the question softwareengineering.stackexchange.com/questions/344742/… . See if you can provide inputs there Mar 23 '17 at 1:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.