Service Refactoring and Performance Optimization for 58 Rental Business System
This article presents a comprehensive case study on how the 58 rental platform refactored its services and optimized performance by splitting common modules, adopting async interfaces, leveraging nginx + swoole, implementing data caching and pre‑loading, resulting in significant reductions in page rendering time and service latency across major app pages.
Background – Rapid growth of the rental business led to accumulated redundant logic, high code coupling, and degraded development efficiency, especially on the APP side, prompting a need for a system upgrade and optimization.
Current Business Situation – After a 2017 service‑oriented refactor, the system still suffered from increasing complexity as business expanded. The focus shifted solely to rental services in 2019, requiring a redesign that balances extensibility with avoidance of over‑engineering.
Problems & Design Solutions – Development Efficiency – Issues included unreadable legacy code, tightly coupled modules, poor reusability, and unclear responsibilities. The solution involved extracting four independent sub‑systems (recommendation, list, micro‑chat/phone, landlord info) to improve modularity and reuse.
Problems & Design Solutions – User Experience – Issues such as slow interface loading, perceived lag, unreasonable interface splitting, and lack of request merging were addressed by:
Asynchronously splitting module data and caching first‑screen data.
Implementing concurrent requests using nginx + swoole coroutine to merge IO‑intensive calls.
Embedding low‑frequency core data (regions, subway, filters) in the APP with versioned updates for seamless switching.
Pre‑loading shared data from upstream pages to downstream pages to reduce latency.
Specific Implementation Examples
APP main category page – First‑screen “golden position” displayed first, then updated via a configuration platform with cached data; other modules loaded asynchronously.
APP list page – Region, subway, school data embedded; filter and list data split into separate interfaces; non‑core data timed out and reported.
APP detail page – First‑screen data pre‑loaded; interfaces split into house, landlord/agent, community, and recommendation modules; each module cached and requested concurrently.
Results
Performance metrics show substantial improvements: first‑screen rendering time decreased by 60% on the main page, 55% on the list page, and 72% on the detail page; service interface latency dropped by 65%‑80% respectively, demonstrating the effectiveness of the refactor and optimization.
Team Introduction – The 58 Rental Technology Team, using a PHP and Java stack, focuses on enhancing user experience and development efficiency, with extensive experience in performance and stability improvements.
58 Tech
Official tech channel of 58, a platform for tech innovation, sharing, and communication.
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.