Back to Projects

HA-NVS

High Availability NIN Verification System

The Problem

NIMC needed to verify National Identification Numbers in real time against a national identity database that keeps growing past 250 million records, with government agencies, banks, telcos, and other licensed partners all depending on it staying fast and available.

Constraints

  • Verification requests had to resolve in under a second, even as the source database grows past 250M+ records.
  • 99.99% uptime, 24/7, sitting in the critical path for other systems, including billing.
  • Verification nodes are physically distributed across authorized partner data centers, not one central location.
  • Has to comply with the OSIA identity standard and NIMC data protection policy.
  • As a government identity system, policy required data like enrolment files to stay hosted entirely in-house rather than on public cloud storage, ruling out the usual managed-storage shortcuts.

How It Was Solved

  • Split into six purpose-built services: an ETL pipeline, a verification record store, a history/audit store, a messaging engine, a gateway managing the distributed nodes, and the verification nodes themselves, so no single service had to do everything.
  • An event-driven messaging layer (built on Kafka) propagates enrolment changes out to distributed nodes so each one can serve verifications locally instead of round-tripping to a central server.
  • New enrolments and edits replicate to every node within 24 hours, trading a small propagation delay for consistent sub-second reads under load.
  • File data (enrolment documents, biometric artifacts) had to stay in-house per policy, so instead of reaching for a managed object store, we built a dedicated file service on Spring Boot backed by MongoDB, running entirely on our own infrastructure.
  • Enrolled citizen data is sourced from NIMC's national identity database over Oracle, the existing system of record, rather than duplicating it elsewhere.

What I Built

  • Built backend verification services in Spring Boot, with Redis caching on the hot path to help meet the sub-second SLA.
  • Used Redis Stack's full-text search to keep demographic verification lookups fast without standing up a separate search cluster.
  • Implemented authorization on Keycloak using per-service client IDs and secrets, scopes, and profiles, so each internal service only had exactly the access it was granted, nothing more.
  • Added CI/CD automation and observability (Prometheus, Grafana) so the team could see node health across a distributed deployment.

Result

  • Sub-second response time sustained past 250M+ records
  • 99.99% uptime
  • New enrolments replicated to every verification node within 24 hours
  • Integrates with CBS so verification usage is billed automatically
JavaSpring BootRedisRedis StackApache KafkaPostgreSQLMongoDBOracleDockerKeycloak