Welcome to my Spring life

Profile Picture

About Me

The PHP department was closed after 3 years due to the company's business transformation, and the Java department was established. I have been engaged in Java development for over 7 years, which opened my Spring life.


Marllon E-commerce Platform

Published on:

Large-scale B2C e-commerce platform core system with millions of users, processing tens of thousands of orders daily. Using SpringCloud microservices architecture with service governance and gateway for automatic service registration, discovery, and invocation.


Technology stack and difficulties: The system adopts the SpringCloud microservice framework, splitting the entire system into multiple services, each of which is responsible for different functional modules. Through service governance and service gateway, automatic registration, discovery, and invocation of services are realized, and a unified RESTful API interface is provided to the outside. At the same time, due to the presence of a large number of asynchronous tasks in the system, we have also introduced xxl-job as a distributed task scheduling framework to realize the scheduling and execution of tasks.
In addition to the above-mentioned technical selections, various open-source middleware are also used for support, such as RabbitMQ as the message queue, ELK as the log system, and Dubbo as the RPC framework. In terms of operation and maintenance, we use Nacos for service registration and configuration management, and Sentinel for traffic control as well as circuit breaking and degradation.
At that time, there were a total of 5 engineers in the team involved in development and operation. I was responsible for the coupon module. Coupons usually have quantity limits, so in high-concurrency scenarios, the efficiency of users receiving coupons is easily restricted. If traditional database locks are used to implement this, it will lead to performance degradation and even deadlocks. To solve the problem of low collection efficiency, I adopted a method similar to flash sales, putting the coupon collection operations into the RabbitMQ message queue for asynchronous processing to avoid high-concurrency read and write operations on the database. I also used Redis to cache the quantity and status of coupons to reduce the pressure on the database.