Backend Development 12 min read

Design and Evolution of a High‑Performance Massive Distance‑Calculation Service at Dada Group

This article details Dada Group’s transition from a Redis‑based, low‑throughput distance‑calculation system to a high‑concurrency, low‑cost architecture leveraging GEOHASH indexing, cache sharing, and asynchronous processing, achieving billions of daily point‑pair calculations with sub‑100 ms latency and high value‑rate.

Dada Group Technology
Dada Group Technology
Dada Group Technology
Design and Evolution of a High‑Performance Massive Distance‑Calculation Service at Dada Group

Background : Dada Group, a leading on‑demand retail and delivery platform, requires massive distance calculations for rider‑store, freight, recommendation, dispatch, and customer proximity scenarios, with daily volumes reaching billions.

Current Situation Analysis : The existing framework relies on direct map‑service calls and ad‑hoc estimations, leading to high QPS, low cache hit rates, and inability to meet precision and latency demands.

Problem Decomposition : Data‑funnel analysis revealed that only ~34% of point‑pair requests need external vendor computation, while many pairs are duplicate, near‑zero distance, or cache‑able; GEOHASH‑based approximations can satisfy accuracy requirements for most cases.

New Architecture Evolution : The redesigned system introduces a storage‑cleaning module, a GEOHASH module with ultra‑compact MySQL tables, a straight‑line distance module, asynchronous miss‑handling, a shared cache layer, and off‑peak batch jobs to pre‑compute distances. A new call sequence reduces external calls and latency.

Online Verification and Summary : After rollout in August 2020, daily point‑pair traffic exceeded 6‑8 hundred million with cache hit rates around 45‑80%, value‑rates above 96%, and average response times under 80 ms (dispatch) and 25 ms (recommendation). Peak traffic during 2021’s Qixi Festival reached over 90 billion calculations with only five timeout alerts, demonstrating the architecture’s scalability and cost‑effectiveness.

Future Considerations : Anticipating traffic growth to 300 billion daily calculations, the team questions the architecture’s ability to maintain high value‑rates and ultra‑low latency under further load.

Author : Wu Jun, head of the Efficiency Platform Core Services team at Dada Group.

Join Us : Dada Group is hiring technical talent; interested candidates can apply via the provided link.

system architecturecachinghigh concurrencygeohashbig data analysisDistance Calculation
Dada Group Technology
Written by

Dada Group Technology

Sharing insights and experiences from Dada Group's R&D department on product refinement and technology advancement, connecting with fellow geeks to exchange ideas and grow together.

0 followers
Reader feedback

How this landed with the community

login 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.