With the rapid development of information technology and the continuous expansion of user scale,community e-commerce is a new shopping model that emerged during the epidemic.It provides community residents with portable life and shopping services through the method of group leader plus self-report.Facing a large number of consumer groups and huge traffic,how to quickly handle a large number of requests and ensure the high availability of the system has become the key and difficult point in designing a community e-commerce platform.The article mainly explains and implements the four modules of membership,discounts,orders,and shopping carts.In terms of system architecture,the front-end adopts the We Chat applet native framework for module development to improve the compatibility and scalability of the system.The system background is quickly developed based on the Spring Boot framework,and Spring Cloud distributed components are used to provide suitable solutions in the microservice registration center,configuration center,service invocation,service gateway,circuit breaker,link tracking,etc.The database is divided by service,and the database is divided into tables to reduce the pressure on the database.Use Redis caching technology to improve the concurrency and response performance of services in the shopping cart and homepage hot commodity service modules,use Rabbit Mq message middleware to decouple communication between services,handle asynchronous tasks,and perform traffic peak reduction in high concurrent traffic scenarios.At the same time,the system uses Elastic Search as a component of product and order retrieval,which improves the efficiency of users in retrieving product and order information.In terms of service deployment,using Docker containerization technology to configure the operating environment and deploy multi-instance clusters,a highly available and scalable community e-commerce platform was designed and implemented.In terms of performance,this system uses the Jmeter stress testing tool to test the spike interface.Compared with the stand-alone mode under the micro-service architecture cluster mode(two instances),the concurrency has increased by 66.7%,the response time has decreased by 49.0%,and the throughput has increased.At the same time,the CPU usage rate is higher in cluster mode.This system uses the Docker platform for containerized testing and deployment,which improves the efficiency of test environment construction and deployment,and saves computer hardware resources.After testing,the usability of the system is enhanced. |