Microservice Refactoring of DeWu Community Platform
DeWu transformed its monolithic PHP‑based community platform, which had grown to over 10 million daily users, into a Java/Go microservice architecture using Docker, Kubernetes, gRPC, and modern CI/CD pipelines, establishing clear service boundaries, unified data models, enhanced monitoring, and plans for further scalability and resilience.
DeWu's community started as a simple news feed and evolved over five years into a rich content platform with articles, short videos, live streams, and Q&A. Rapid growth pushed daily active users from zero to over 10 million, creating performance and scalability challenges.
The early architecture was a monolithic PHP stack on Alibaba Cloud, using MySQL, Redis, and Elasticsearch. As traffic grew, the system was split at the server level and databases were vertically partitioned, but the application remained a single codebase, leading to coupling, frequent failures, and maintenance difficulties.
Key pain points identified include insufficient business abstraction, an oversized project with unclear responsibilities, performance and stability limitations of the legacy PHP stack, and complex deployment and routing rules.
To address these issues, the team embarked on a microservice transformation. Core services were identified as Feed, Content, Interaction, and User. Each service now has a unified data model, clear boundaries, and dedicated APIs. The new tech stack centers on Java and Go, with Go chosen for its ease of adoption by PHP developers and strong performance.
Infrastructure was modernized to Docker and Kubernetes, with inter‑service communication via gRPC. Configuration is managed by Apollo, and CI/CD pipelines use GitLab, Drone, and Spinnaker to automate building, containerization, and deployment.
Monitoring and tracing were enhanced with comprehensive metrics for MySQL, Redis, Elasticsearch, MQ, HTTP, and RPC, along with trace IDs for end‑to‑end request visibility. Alerts are fine‑tuned to notify responsible engineers promptly.
Future plans focus on further business layering, independent databases per service, circuit breaking, rate limiting, degradation strategies, and expanded monitoring to improve stability and developer productivity.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
DeWu Technology
A platform for sharing and discussing tech knowledge, guiding you toward the cloud of technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
