Skip to main content
Version: 2.2.0

Deployment

This document provides comprehensive guidance on deploying the MSR (Multi-Session Replay) module backend infrastructure in production environments. A successful deployment consists of the MSR backend server and supporting infrastructure for change data capture. The frontend interface is provided through the MSR modlet installed in web-base projects.

Prerequisites

Before deploying MSR, ensure you have:

  • Container Runtime: Docker or Podman with compose support
  • Module Dependencies: Deployed instance of iams module for authentication
  • Network Access: Connectivity between MSR components and dependency services
  • Storage: Adequate disk space for TimescaleDB and Redpanda data retention
  • Environment File: Properly configured .env file with required variables

Container Images

The MSR backend deployment uses the following container images:

ComponentImagePurpose
MSR Appghcr.io/mssfoobar/msr/msr-app:latestMain backend server
MSR Databaseghcr.io/mssfoobar/msr/timescaledb:2.21.1-pg17-aohTimescaleDB for session data
Redpandadocker.redpanda.com/redpandadata/redpanda:latestKafka-compatible streaming platform
Redpanda Consoledocker.redpanda.com/redpandadata/console:latestRedpanda management interface
Kafka Connectghcr.io/mssfoobar/debezium-connect:latestCDC connectors with Debezium
Frontend Interface

The MSR frontend interface is provided through the MSR modlet, which is installed into web-base projects using npx cli install msr. No separate frontend container deployment is required.

tip

Use specific version tags instead of latest for production deployments to ensure consistency and easier rollbacks.

Deployment Steps

1. Deploy Infrastructure

Deploy the infrastructure components using the dev-containers setup:

# From dev-containers directory
docker compose --env-file .env -f msr/compose.yml -f compose.override.yml up -d

This deploys:

  • Database: TimescaleDB instance for time-series data storage
  • Redpanda: Kafka-compatible streaming platform
  • Kafka Connect: CDC pipeline with Debezium connectors

See the Kafka Connect configuration guide for detailed connector setup.

2. Deploy Application

Deploy the MSR backend application:

Artifact: ghcr.io/mssfoobar/msr/msr-app:latest

Ensure the application is configured with proper environment variables. See the configuration section for required variables.

3. Frontend Integration

The MSR frontend is provided through a modlet that developers install into their web-base projects:

# Install MSR modlet into web-base project
npx cli install msr

Developers can then build custom replay interfaces using the provided components. See the quickstart guide for implementation details.

Architecture Overview

The MSR deployment follows a CDC (Change Data Capture) architecture:

  • MSR Backend: Handles session recording, storage, and replay API
  • MSR Database: TimescaleDB instance optimized for time-series data
  • CDC Pipeline: Debezium + Kafka Connect + Redpanda for real-time data capture
  • Frontend: Provided via modlet components in web-base projects
  • Dependencies: IAMs for authentication, source databases with CDC-enabled tables

For detailed architectural concepts, see the MSR overview.

Network and Security Considerations

Port Requirements

ServicePortPurposeAccess
MSR Backend8080API and web serverInternal
MSR Database5432PostgreSQL connectionInternal
Kafka Connect8083REST APIInternal
Redpanda9092Kafka protocolInternal
Redpanda Console8080Management UIInternal

Security Best Practices

  • Database Credentials: Use strong passwords and rotate regularly
  • Network Isolation: Deploy in private networks with controlled access
  • TLS/SSL: Enable encryption for inter-service communication
  • IAMs Integration: Leverage centralized authentication for access control
  • Resource Limits: Configure container resource constraints

Monitoring and Maintenance

Scaling Considerations

  • Database Performance: Monitor TimescaleDB performance and consider read replicas
  • Kafka Connect: Scale connector tasks based on CDC volume
  • Redpanda: Adjust partition count and replication factor for throughput

Development and Testing

MSR Web Container (Internal Use Only)

The MSR module includes a containerized web interface (ghcr.io/mssfoobar/msr/msr-web:latest) that is used exclusively for internal testing and modlet development purposes. This container:

  • Is NOT deployed in production environments
  • Is NOT used by project developers
  • Serves only as a testing artifact for modlet development
  • Provides a standalone interface for validating backend functionality

Project developers should use the MSR modlet installed via npx cli install msr instead of this container.

Troubleshooting

For common deployment issues, see the FAQ section which covers:

  • CDC pipeline problems
  • Connector configuration issues
  • Database connection problems
  • Performance optimization