Backend Development 11 min read

Practices of Asynchronous and Reactive Technologies in Gaode Yuntu Backend

Gaode Yuntu transformed its backend from a blocking servlet architecture to an asynchronous, event‑driven reactive stack using Vert.x, Spring WebFlux, Project Reactor and OpenResty, achieving a 480% QPS boost, higher resource efficiency, stable latency, and plans for RSocket back‑pressure and domain‑driven design.

Amap Tech
Amap Tech
Amap Tech
Practices of Asynchronous and Reactive Technologies in Gaode Yuntu Backend

Background Gaode Yuntu provides more than 700 search and navigation service interfaces, serving over 400,000 applications with daily request volume exceeding 10 billion and peak QPS over one million. The traditional synchronous‑blocking server model wastes resources and cannot scale dynamically under burst traffic.

Asynchronous and Reactive The article explains two asynchronous task handling models: thread‑pool based and event‑driven (epoll). Reactive programming reacts immediately to events, failures, and user requests, based on an event‑stream model (Reactor). Java 8/9, Spring WebFlux, and Vert.x are highlighted as mainstream reactive frameworks.

Lightweight Front‑End Pre‑Processing The traffic‑ingress layer, consisting of authentication and rate‑limiting, is implemented with OpenResty (lua‑nginx‑module) to leverage Nginx’s event‑driven model and Lua’s development efficiency.

From Servlet to Servlet‑less Many services originally used synchronous Java Servlets, which block threads even with Servlet 3.1 NIO. To overcome this, the team selected Vert.x for the Apple Maps request dispatch service. Vert.x’s advantages include lightweight high performance, readable source code, low learning curve, and an Actor‑like model using Verticles and EventBus.

Vert.x implementation uses Java 8 CompletableFuture for asynchronous interfaces and Verticle‑based modules for business isolation. Verticle instances share a fixed-size EventLoopGroup , enabling thread‑resource isolation and multi‑tenant simulation.

From Future to Reactive The limitations of CompletableFuture (complex task orchestration, lack of streaming, limited error handling, no delayed execution) are addressed by Reactive streams. Example code shows a Future‑based implementation and its Reactive counterpart using Project Reactor’s Flux and Mono operators, demonstrating clearer, more composable logic.

Open Platform LBS API Service The LBS API aggregates multiple downstream services (geocoding, routing engine, etc.). A Reactive implementation using Mono and Flux simplifies concurrency management and error handling, improving code readability.

The migration from Servlet to Reactive (Project Reactor + Spring WebFlux) yielded a 480% QPS increase in short‑distance navigation scenarios. Resource utilization improved dramatically, and latency remained stable under traffic spikes.

Future Work The team plans to add Backpressure support across micro‑services via RSocket and to apply domain‑driven design for complex industry services.

Conclusion Asynchronous reactive architecture can significantly boost throughput and simplify business orchestration in cloud‑native environments, though it requires a shift in developer mindset and end‑to‑end refactoring.

JavaPerformance Optimizationbackend architectureAsynchronousReactive ProgrammingSpring WebFluxVert.x
Amap Tech
Written by

Amap Tech

Official Amap technology account showcasing all of Amap's technical innovations.

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.