Skip to content

Architecture Decision Records (ADR Log) ​

This log records every major architectural and technical decision made during the development of OmniPost (20-notification-delivery-platform).


ADR IDDecision TitleStatusDeciding FactorsChosen SolutionTrade-Off AcceptedRevisit When
ADR-01Database Engine ChoiceAcceptedNeed for strict ACID unique constraints on (tenant_id, idempotency_key).PostgreSQL / SQLite with async SQLAlchemy.Lower write throughput than Cassandra.Volume exceeds 500M records.
ADR-02Template SandboxingAcceptedPrevention of Server-Side Template Injection (SSTI) attacks.Jinja2 SandboxedEnvironment.Slightly higher CPU rendering latency.Throughput requires pre-compiled bytecode.
ADR-03Priority Queue ArchitectureAcceptedGuarantee that 2FA OTP codes bypass marketing broadcasts.Multi-tier priority queue with lease-based locking.Database lock contention at high worker concurrency.Scale exceeds 10,000 concurrent workers.
ADR-04Rate Limiting AlgorithmAcceptedNeed to allow legitimate bursts while strictly bounding average RPS.In-memory Token Bucket rate limiter.Process-local state rather than shared cluster state.Multi-node deployment requires Redis.
ADR-05Credential SecurityAcceptedZero-trust protection of third-party API keys in database.Fernet AES-128 symmetric encryption with log masking.Key management requires environment variable distribution.Enterprise deployment adopts AWS KMS / HashiCorp Vault.
ADR-06Webhook AuthenticationAcceptedVerification of webhook payload integrity and anti-replay defense.HMAC-SHA256 timestamped signatures (X-Signature-SHA256).Receiving clients must implement HMAC verification.Clients demand mTLS or asymmetric RSA.
ADR-07Timezone Quiet HoursAcceptedCompliance with telecom quiet-hours laws and Daylight Saving Time.Native Python 3.9+ zoneinfo module with midnight wrap-around.Requires system tzdata updates.Real-time GPS-based geolocation routing needed.