Dibya Sarothi
Dibya Sarothi
Backend SystemsArchitecture ValidatedSeptember 2026

Primus

Enterprise Data Reliability, Integrity & Recovery Platform

Fault-tolerant disaster recovery architecture with distributed replication and state reconciliation.

Primus overview
Project Overview

Primus is a specialized backend data reliability platform engineered to monitor, validate, and restore critical operational datasets across distributed databases. Focused on data verification invariants, automated consistency audits, and zero-data-loss recovery workflows.

Problem Statement

Modern microservices frequently suffer from silent data drift, split-brain write anomalies, and unverified backups that fail when disaster strikes.

Engineering Rationale

Backups that are not automatically validated are simply theoretical. Enterprise systems require continuous integrity auditing and verified restore simulations.

Engineering Objectives

Continuous automated database snapshot verification.
Merkle tree-based data reconciliation across distributed replicas.
Zero-downtime recovery playbook automation.
Architecture Blueprint

System Architecture

Microservice orchestrator written in Python and TypeScript, leveraging transactional log inspection and cryptographic hash chains to prove state synchronization.

01

Cryptographic Hash Audit

Computes periodic chunk hashes across table partitions to detect bit-rot and out-of-order writes.

Core & Backend Implementation

  • Automated snapshot inspector evaluating PostgreSQL WAL (Write-Ahead Logs).
  • Asynchronous recovery simulation workers validating target restores in isolated sandboxes.
  • Alert notification dispatchers with multi-channel escalation rules.

Client & Interface Layer

  • Operational health dashboard displaying data replication lag and restore audit histories.

Data & Schema Design

Engine / Tier: PostgreSQL & TimescaleDB

Audit-first time-series schema recording backup verification benchmarks and integrity snapshots.

Core Models & Entities
ReplicaNodeIntegrityBenchmarkDisasterRecoverySimulationAuditAnomaly

Authentication & Security Controls

Auth Model: mTLS service-to-service authentication and audited API keys
  • End-to-end encryption for backup metadata and strict role separation.

Engineering Challenges & Technical Decisions

Key Challenges Solved

Challenge: Auditing multi-gigabyte databases without degrading live transactional performance.
Engineering Solution: Read from read-replicas using chunked parallel index scans during off-peak windows.

Trade-Off Decisions

Decision: Read-Replica State Auditing
Architectural Rationale: Guarantees primary database throughput is unaffected while executing rigorous integrity audits.

Testing & Verification Methodology

Frameworks & Approach: Pytest, Docker Compose Chaos Suite
  • Simulated split-brain network partition recovery tests.

Results & Engineering Takeaways

Mastered low-level database replication dynamics and recovery time objectives (RTO/RPO).