Notification Database

Overview

PostgreSQL database storing notification preferences, delivery logs, and notification history for audit and analytics.

Database Schema

Technical Details

Specifications:

  • Version: PostgreSQL 15.x
  • Size: 200 GB
  • Backup: Daily full backup
  • Replication: Multi-AZ with 1 read replica
  • Encryption: AES-256 encryption at rest, TLS 1.3 in transit

Performance:

  • IOPS: 5,000 provisioned
  • Connections: Max 200 concurrent
  • Query Performance: P95 < 50ms
  • Write Throughput: 2,000 writes/second
  • Uptime SLA: 99.9%

Data Management

📊 Data Retention

Delivery logs automatically archived after 90 days, preferences stored indefinitely.

  1. Active Data

    Recent notifications and delivery logs (90 days)

  2. Archival

    Older delivery logs moved to cold storage

  3. Preferences

    User preferences retained indefinitely

  4. Cleanup

    Automated cleanup jobs for old batches

Access Patterns

  • Notification Service: Read/write preferences, write delivery logs
  • Email Service: Read templates and preferences
  • Analytics Service: Read delivery metrics
  • User Settings API: Read/write user preferences

Disaster Recovery

  • RPO: 24 hours (maximum data loss)
  • RTO: 4 hours (recovery time objective)
  • Backup Retention: 30 days
  • Geographic Redundancy: Single region (non-critical data)