fastAddress: Hyper-Performant Address Autocomplete Engine

How we engineered a custom Go REST API and CLI tool to deliver sub-millisecond fuzzy address search across millions of UK postal records.
View Live Project
fastAddress: Hyper-Performant Address Autocomplete Engine
Published 2026

Executive Summary

Address auto-completion is a critical checkout and registration bottleneck. For businesses processing transactions, delays or typing mistakes lead directly to cart abandonment and logistical errors. Off-the-shelf address APIs charge expensive per-lookup fees and introduce high network round-trip latencies, slowing down forms.

AHM Labs built FastAddress UK: a specialized, self-hosted address auto-completion engine written in Go. By processing and indexing raw UK postcode, EPC, and land registry datasets, we created a single-purpose API that handles heavy concurrent search spikes with sub-millisecond latency profiles (P50 < 1.5ms) on modest hardware.


1. The Challenge of Scale & Cost

Indexing millions of detailed address rows (including coordinate details and suffix variations) normally requires massive database clusters or expensive software-as-a-service (SaaS) subscription tiers.

Our goal was to build a system that:

  1. Low-Latency Fuzzy Autocomplete: Returns exact matching suggestions in under 5ms.
  2. Low Hardware Resource Footprint: Runs on lightweight VPS instances without needing heavy server clusters.
  3. No Expensive Subscriptions: Uses open UK address/postal registries ingested locally.

2. Technical Stack & Optimization

We engineered a dual-stage pipeline focusing on Go and database optimizations:

[CSV Data Source] ──(CLI Ingest)──> [SQLite FTS5 DB] <──(REST API Server) ── [LRU Cache]


                                                                       [GET /autocomplete]

Ingestion CLI

  • Processes raw postcode and EPC CSV files (over 21.1+ million property records).
  • Normalizes address strings, standardizes flat/unit numbers, and compresses coordinate types into small binary allocations.
  • Compiles the dataset into a local SQLite database utilizing the FTS5 (Full-Text Search) extension with custom tokenizers.

High-Concurrency Go API Server

  • Built using a high-concurrency Go HTTP server communicating via the purego-based Turso driver.
  • Bypasses CGO dependencies to run entirely containerized with zero library overhead.
  • Implements an app-level, in-memory Least Recently Used (LRU) Cache to immediately resolve popular search terms in microseconds.

3. Proven Benchmark Performance

To validate the engine, we simulated extreme spike traffic replicating typical retail sales events:

MetricMeasured ValueBusiness Benefit
Simulated Concurrent Load3,000 requests/secHandles high-traffic product launches effortlessly.
P50 Query Latency1.2 msUser feels zero lag while typing.
P99 Query Latency4.8 msGuarantees reliability even during search spikes.
Idle Memory Consumption< 100 MBExtremely cheap to host on micro VPS instances.

4. Conclusion & In-Depth Technical Teardown

With fastAddress, AHM Labs proves that moving off bloated SaaS providers to high-performance, single-purpose Go microservices can cut operating costs to near zero while significantly improving application responsiveness.