当前位置:网站首页>[technology planting grass] talk about the system design and architecture of large-scale shopping platform

[technology planting grass] talk about the system design and architecture of large-scale shopping platform

2022-06-24 01:12:00 Regan Yue

Talk about the system design and architecture of large-scale shopping platform

One 、 Functional requirements

1. Search for

Whether customers can find the goods they want to buy and whether we need to show the goods we can't provide to current customers .

such as , If the customer is in a place where express delivery is controlled because of the epidemic , So do we give customers search results for products .

2. The shopping cart

Shopping cart is necessary , The shopping cart can increase the users' purchase of things they like or want . And through the shopping cart , Can understand the user's preferences , Better push users what they need .

3. Settle accounts

This is where the user confirms the order and pays .

4. Check the order

Through this function , Users can view their past orders . Users can also view the express information and estimated arrival time of recent shopping orders through this function .

Two 、 Nonfunctional requirements

1. Low latency

This shopping platform should require very low latency , If you encounter a delay in the shopping process, it will greatly affect the shopping experience .

2. High availability

search algorithm 、 Order algorithm and other algorithms need high availability . The system cannot fail for a long time , This will lose users' trust in the platform .

3. High consistency

Payment related data and user information must be highly consistent . The shopping platform deals with money , There should be no data inconsistency in multiple places , Otherwise, it will cause economic losses or loss of users .

3、 ... and 、 Large shopping platform architecture

  1. Elasticsearch colony

Elasticsearch colony Is a set of nodes with the same attributes , When a node joins or leaves , The cluster will undergo a reorganization .Elasticsearch colony Distribute data evenly among all available nodes . It is mainly used in the search system .

2. Cassandra colony

Cassandra It is a point-to-point distributed system , Consists of a set of nodes , Any of these nodes can accept read or write requests . Used in historical order system and recommendation service system .

3. Redis colony

We use it when we place an order Redis colony .

4. MongoDB colony

MongoDB There are two different distributed configurations . The first is “ Replica set ”, Multiple servers carry the same data to avoid failure . The second is “ Fragmentation cluster ”, Each of the several servers hosts only one segment of the entire dataset , To achieve greater performance and store larger data sets .

It is mainly used to store the data of various systems in the shopping platform . Like a shopping cart 、 Order processing system, etc .

5. Kafka colony

This cluster is mainly used to coordinate the work of various systems . Let the right data appear in the right place in the right form .

6. Spark

Spark It is for big data analysis , Mainly to better recommend products to users .

7. Restful Web Service

Restful Web Service It's based on REST Lightweight architecture 、 Maintainable and extensible services .Restful Web Service To be safe 、 Unified 、 A stateless way to put... In an application API Exposed to the calling client . The calling client can use Restful service Perform predefined actions .

8. Load balancer

Use load balancing in the calculation process , It can make the overall processing more efficient .

原网站

版权声明
本文为[Regan Yue]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/11/20211119215540706n.html