KatInterview

Build a Remote Development Workspace Platform

System DesignModel answer
HardModel answerSystem Designdistributed-systemsinfrastructuresecurity

Last updated

Architect a service that provisions isolated development environments accessible via SSH, with persistent storage, scheduled automation, and fault tolerance.

Problem

You're tasked with architecting a platform that provides remote development environments. Engineers can provision personal workspaces, connect to them securely over SSH, and run automated background jobs. The platform must ensure data safety, user isolation, and graceful recovery from infrastructure failures.

Requirements

Core Functionality

  • Provision and terminate development environments on demand
  • Secure remote access via SSH to individual environments
  • Background job scheduling (build automation, testing, linting) with cron-like syntax
  • Filesystem persistence across power cycles and network interruptions

Quality Attributes

  • Fault Tolerance: Environment data must survive host crashes; workspaces should relocate to healthy infrastructure automatically
  • Security: Strong isolation preventing users from accessing the host system or other users' environments
  • Responsiveness: SSH connections should establish quickly, both initially and when reconnecting
  • Resource Management: Enforce per-user limits on CPU, memory, and storage to prevent monopolization

What to Deliver

  1. System architecture showing major components and their interactions
  2. API design for workspace lifecycle and job scheduling
  3. Data persistence strategy including schema for environments, users, jobs, and execution history
  4. SSH authentication and routing mechanism with security considerations
  5. Failure recovery approach: detection, data protection, and workspace migration strategy

Consider scale, concrete trade-offs, and failure modes in your design.

Hints

Hint 1

Think about the isolation boundary: containers share kernels, but users may need root access

Hint 2

Network-attached storage separates compute from state, enabling mobility

Hint 3

Certificate-based SSH with short lifetimes avoids long-lived credentials

Hint 4

Use generation numbers or fencing tokens to prevent split-brain when relocating workspaces