For the complete documentation index, see llms.txt. This page is also available as Markdown.

Architecture Overview

How All ID works and how components interact.

System architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Client    β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚ HTTPS
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Load Balancer   β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚ HTTP:1302
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Peer Service   │──────▢│   Facematch    β”‚
β”‚  β€’ Orchestrates β”‚HTTP   β”‚   β€’ Face match β”‚
β”‚  β€’ Exposes API  β”‚:8080  β”‚   β€’ Anonymize  β”‚
β”‚  β€’ Stores data  β”‚       β”‚   β€’ Extract    β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚ MySQL:3306
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MySQL Database β”‚
β”‚  β€’ Profiles     β”‚
β”‚  β€’ Identifiers  β”‚
β”‚  β€’ Transactions β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Peer Service

The Peer Service is the main application component.

What it does:

  • Exposes REST API endpoints (/profiles, /profiles/biometric-validation)

  • Validates incoming requests

  • Orchestrates biometric operations

  • Stores and retrieves data from MySQL

  • Calls Facematch Service for facial recognition

  • Can communicate with Certta Router Service for distributed operations

  • Returns responses to clients

Technology: Node.js application

Requires: Facematch Service, MySQL Database

Facematch Service

The Facematch Service handles facial recognition operations.

What it does:

  • Receives biometric images from Peer

  • Extracts facial features using ML models

  • Calculates similarity scores between faces

  • Anonymizes biometric images

  • Returns feature vectors and scores to Peer

Technology: Machine learning service with embedded models

Requires: None (self-contained, models included in image)

Router Service (Certta-hosted)

The Router Service is an orchestration component hosted and managed by Certta (not deployed by you).

What it does:

  • Routes biometric queries across multiple customer Peer instances

  • Enables distributed profile lookups across regions

  • Coordinates cross-instance operations for multi-region deployments

Communication:

  • Your Peer β†’ Certta Router: HTTP requests for distributed queries

  • Certta Router β†’ Your Peer: HTTP callbacks with results

When used: Multi-region deployments where profile data is distributed across geographic locations

You do not deploy or manage the Router Service. It runs on Certta's infrastructure and your Peer Service connects to it when needed for distributed operations.

MySQL Database

Persistent storage for all biometric data.

What it stores:

  • Biometric profiles (facial features, metadata)

  • User identifiers (CPF, name, etc.)

  • Transaction history

  • Validation results

Technology: MySQL 8.0+ or Aurora MySQL 3.10.0+

Schema: Provided by Certta during setup

Data flows

Profile creation flow

Biometric validation flow

Distributed validation flow (with Certta Router)

The Router Service is hosted by Certta. You only need to configure your Peer Service to connect to Certta's Router endpoint.

Service discovery

Your services locate each other using DNS:

Configure via environment variables (FACEMATCH_IP, MYSQL_IP, etc.)

For distributed deployments, configure Certta Router endpoint (provided by Certta) in DS_IP and DS_PORT variables.

Scaling strategy

Horizontal scaling (recommended):

  • Add more Peer instances β†’ handle more API requests

  • Add more Facematch instances β†’ process more matches in parallel

  • Use database read replicas β†’ handle more read queries

Vertical scaling:

  • Increase Peer resources β†’ faster request processing

  • Increase Facematch resources β†’ faster matching (limited benefit, horizontal preferred)

  • Increase database resources β†’ faster query processing

High availability

Multi-instance deployment:

  • Deploy 2+ Peer instances behind load balancer

  • Deploy 2+ Facematch instances

  • Use Multi-AZ database

Health checks:

  • Peer: GET /health on port 1302

  • Facematch: GET /health on port 8080

  • Database: MySQL ping

Automatic failover:

  • Load balancer removes unhealthy Peer instances

  • Peer discovers healthy Facematch instances via DNS

  • Database fails over to standby (Multi-AZ)

Security architecture

Network tiers:

Authentication:

  • Client β†’ Load Balancer: Implement authentication (API keys, OAuth2, etc.)

  • Services: Communicate within private network without authentication

Encryption:

  • Client traffic: HTTPS (TLS)

  • Database connections: TLS enabled

  • Data at rest: Database encryption enabled

Last updated