Coupang Rocket Delivery: Spatial Index-Based Delivery Zone Management System
Key point
Coupang precisely manages delivery zones on a map basis using the H3 spatial index.
Details
Rocket Delivery needs to accurately identify delivery addresses, find the most suitable delivery zone, and guide routes to the delivery drivers (kuchin). The existing text-address- and postal-code-centered approach couldn't keep up with complex operational demands, so starting in 2021 a new management system was designed that could be directly edited on a map.
There were three core goals. 1) Make delivery zones easy to visualize on a map, 2) enable stakeholders to easily view, create, modify, and share them, and 3) manage them continuously as spatial data rather than postal codes or string addresses.
For the spatial unit, H3 was adopted. W3W is difficult to adjust resolution for, and S2 can introduce distortion during the square projection process, whereas H3's hexagonal grid and parent-child hierarchical structure made it advantageous in terms of scalability and implementation.
The resolution was set to H3 level 14 to fit operational purposes. Level 12 is about 300m², while level 14 is about 6.3m², which allowed handling more precise locations such as blocks, building entrances, and mailboxes. All of South Korea is divided into about 432 million hexagons at level 12, growing to 3.1 billion at level 13 and 21.7 billion at level 14.
Rather than scattering hexagon IDs directly across an RDBMS, the data was designed so that each delivery zone holds the hexagon information within itself. However, since large zones could result in excessively large data, features like H3 compaction were reviewed, and the system was designed to move between finer/coarser resolutions as needed to reduce memory usage.
For actual storage, instead of keeping only a list of hexagon IDs, the implementation converts a polygon into level-14 hexagons via H3 polyfill, then re-stores the boundary as a polygon. When a user draws a rectangle or arbitrary polygon on the map UI, the server converts it into a polygon filled with hexagons; for complex shapes, the original polygon is stored first and then converted asynchronously to reduce processing time.
In the actual system, selecting a postal code displays the corresponding area on the map, and the user can freely draw zones within it. For example, selecting 06961 shows two apartment complex areas, and during editing, the original polygon and the H3-based converted area are visualized together, enabling modification and regeneration.
With this approach, delivery zones are no longer tied to postal codes or address strings, and instead become subjects of absolute statistics and spatial-based analysis. This has enabled delivery difficulty assessment, distance measurement between zones, travel time analysis, dynamic zone management, and route recommendations, and even when zone changes occur, performance can now be compared using the same criteria.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.