Cloud Native 10 min read

Microservice Transformation of the CheZhiTou Advertising System

This article details the migration of the CheZhiTou advertising platform from a monolithic, tightly‑coupled architecture to a Spring Cloud‑based microservice system, describing the business context, service decomposition, governance with Eureka, CI/CD pipelines, encountered pitfalls, and the performance and operational benefits achieved.

HomeTech
HomeTech
HomeTech
Microservice Transformation of the CheZhiTou Advertising System

The CheZhiTou system originally used a centralized Apache‑Tomcat‑MySQL stack, which led to strong coupling, slower deployments, high maintenance cost, and limited scalability as business complexity grew.

To address these issues, the platform was re‑architected into a microservice‑based solution, considering business growth, technology maturity, and team expertise.

Business background : The system consists of an operation support module (customer, user, plan, material, reporting, inventory, screenshot management) and an ad‑slot management module (slot and price list management).

Advertising system architecture diagram
Advertising system architecture diagram

Legacy architecture (1.0) : Apache handled static pages and request forwarding, Tomcat served the application, MySQL stored data, with Apache‑Tomcat providing active‑passive failover, HTTP communication with the media system, and Kafka for asynchronous engine communication.

Microservice introduction : Microservices enable independent deployment, scaling, and upgrades, with each service focused on a specific business capability.

Framework selection : After evaluating Spring Cloud, Motan, gRPC, and Dubbo, Spring Cloud was chosen for its comprehensive feature set, team familiarity with Spring Boot, rich documentation, and active community.

Framework comparison
Framework comparison

New architecture (2.0) splits the system by business modules into layers: API layer (REST), service layer (Spring Boot), service governance (Eureka, Hystrix), scheduled tasks & messaging, caching (Redis), persistence (sharded MySQL, MongoDB).

Key services include ad‑plan, ad‑group, material, slot, price list, user center, inventory, async task, and distribution services.

Service governance : Spring Cloud Eureka provides registration, discovery, health monitoring, and load balancing. Eureka clients cache registration data and send heartbeats every 30 seconds; the server stores data in memory and synchronizes clusters via full‑pull incremental sync.

Eureka architecture
Eureka architecture

Continuous Integration & Deployment : Git as the code repository, Jenkins for build and CI, and a unified release system for deployment.

Future plans : Introduce Docker, configuration service, Hystrix circuit breaker, and API gateway.

Pitfalls encountered :

Tomcat POST size limit – solved by extending TomcatEmbeddedServletContainerFactory to set custom parameters.

Hibernate JPA session – disabled default OpenSessionInView with spring.jpa.open-in-view=false to avoid data inconsistency.

Shiro permission control – migrated XML bean definitions to Spring Boot configuration, ensuring global filter activation.

Shiro configuration in traditional web
Shiro configuration in traditional web

Results :

High‑scalable microservice architecture supporting future business growth.

Reduced development cost by splitting a monolith into seven independent services.

Testing cost reduced by 70 %.

API average response time decreased by 31 % (7 s → 1 s).

SQL execution time reduced from seconds to milliseconds.

Deployment time shortened from 30 hours to 5 minutes.

Service isolation prevents a single service failure from taking down the entire system.

Conclusion : Adopting a microservice architecture modernizes the platform, enables independent development, continuous integration, flexible technology stacks per service, and centralized management, greatly simplifying product delivery.

Author : Xu Shiwei, joined Autohome Commercial Technology in 2017, led the CheZhiTou microservice migration and now maintains the system.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

BackendarchitectureMicroservicesSpring Cloudservice governance
HomeTech
Written by

HomeTech

HomeTech tech sharing

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.