How Didi’s Open‑Source Rdebug Enables Real‑Traffic Debugging for Backend Services

Rdebug, Didi’s open‑source real‑debugger, records live traffic and replays it locally, letting developers debug, test and develop micro‑service backends without deploying downstream dependencies, thereby boosting efficiency, cutting testing costs, and reducing production incidents.

Didi Tech
Didi Tech
Didi Tech
How Didi’s Open‑Source Rdebug Enables Real‑Traffic Debugging for Backend Services

Background

Micro‑service architectures split a monolithic application into many small services, increasing the number of services to maintain and the frequency of RPC calls. Maintaining a stable offline environment becomes costly, and writing unit tests that mock numerous downstream services is labor‑intensive and often fails to reflect real traffic.

Purpose of Rdebug

Rdebug (Real Debugger) records real production traffic and replays it locally, enabling rapid development, debugging, and testing without setting up downstream services. This improves developer productivity and helps safeguard code quality.

Key Features

Deploy only the module code locally; no need to build or run downstream services.

Local replay on macOS without remote server login.

Supports common protocols such as FastCGI, HTTP, Redis, Thrift, MySQL.

Fast replay speed—each replay completes in seconds.

Path Redirection

When online deployment paths differ from local paths, Rdebug can redirect paths via simple configuration, avoiding invasive code changes.

Time Offset

During replay, timestamps are automatically shifted to the recorded time point, ensuring time‑sensitive business logic behaves correctly.

File Mock

Rdebug can mock files by specifying a file path and its content, allowing configuration “re‑creation” by combining with the reporting feature.

Elastic Search

Traffic stored in Elasticsearch can be searched by URI, input/output keywords, downstream calls, etc., and replay can be driven by search results.

Xdebug Integration

Rdebug links with Xdebug so developers can set breakpoints and debug using real traffic, facilitating code inspection, issue diagnosis, and downstream response analysis.

Rich Reporting

Replay reports compare input, output, and results between online and offline runs. Downstream call reports list all calls with protocol, request content, matched responses, and similarity scores, highlighting exact matches, noise, missing, or new calls. Coverage reports generated via Xdebug show which code paths were executed.

For installation, usage instructions, and FAQs, refer to the official repository and documentation:

GitHub: https://github.com/didi/rdebug

Wiki: https://github.com/didi/rdebug/wiki

Documentation: https://github.com/didi/rdebug/blob/master/doc/DocList.md

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.

Microservicestraffic replayTesting Automationopen-source toolsbackend debuggingRdebug
Didi Tech
Written by

Didi Tech

Official Didi technology account

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.