With the rapid development of Internet technology,online shopping as an important part of e-commerce has made rapid progress.With the advantages of efficiency and convenience,online shopping has become an indispensable new way of life.In recent years,the ecommerce platforms of major Internet companies have achieved great success by repeatedly reaching huge transaction volumes in emerging shopping festivals such as the "Double 11" and the 618 mid-year promotion.For these platforms,the technical challenge is how to cope with the high traffic volume in a short period of time and ensure the high performance of the transaction system while ensuring error-free transactions.This paper describes the implementation of an online shopping mall based on the Spring Boot framework,focusing on the technical challenges of dealing with high concurrent access to the mall system.Java and Lua were used as the programming languages and My SQL and Redis were used as the database,and database tables were designed to store registered user information,product information and promotion information.The Spring MVC architecture was then used to integrate the persistence,representation and business layers,completing the basic functionality of registration,login,order placement and promotions.The distributed architecture was then introduced,with user requests being reverse-proxied through an Nginx server and distributed to two servers with a polling strategy to reduce server load and improve access efficiency.The distributed session management is achieved by using a token+Redis structure that is more in line with modern Internet transport characteristics and facilitates the management of users logging into the mall.Different multi-level caching options were then discussed and a three-level cache consisting of Nginx Shared Dic,Redis and Guava Cache was chosen to optimise query capabilities and improve system performance;after introducing the cache,different data consistency options were investigated and message queues and transactional messaging techniques were chosen to ensure consistency between stock and cached data,supplemented by This was complemented by business logic and code level optimisation,resulting in a qualitative improvement in the performance of the mall system.The final section uses Jmeter to set up thread groups to simulate high concurrency usage scenarios,and stress tests are conducted on the mall system’s queries,data consistency and database server respectively,and the results prove to be sufficient to cope with the onslaught of peak traffic.The results proved to be sufficient to cope with peak traffic. |