
Custom Polygons vs. Uber's H3: Building a High-Performance Geofencing Backend in Go
When building logistics and telemetry platforms, processing thousands of GPS pings per second is just a regular Tuesday. The core challenge isn't just receiving the data; it's figuring out exactly where that data is in relation to your business logic. Is the truck inside the warehouse? Did it cross a restricted zone? If you are building a geofencing architecture, you will inevitably face the dilemma: Should you use exact Custom Polygons (PostGIS) or spatial indexing grids like Uber's H3? Spoiler alert: For a truly scalable and user-friendly system, you need both. Here is how we handle this hybrid architecture using Go and PostGIS. The Reality: Users Don't Think in Hexagons From a purely mathematical standpoint, Uber’s H3 is a masterpiece. But from a UX perspective, telling a warehouse manager to draw their loading dock using only rigid hexagons is a terrible idea. Real-world facilities (like a CEDIS or a distribution center) are irregular. Users need to draw custom polygons on a map. I
Continue reading on Dev.to
Opens in a new tab




