KatInterview

Design a Cloud-Based Development Workspace Service

System DesignModel answer
MediumModel answerSystem Designcloud-infrastructurecontainersstate-management

Last updated

Build a system that provisions on-demand containerized development environments with browser-based editing, terminal access, and port forwarding.

You're tasked with designing a service that provisions remote development workspaces in the cloud. Engineers should be able to spin up a fresh workspace from a Git repository, write and run code through a web interface, access running services via their browser, then pause and later restart the workspace without losing their work.

Core Requirements

The system must support:

  • Launching a workspace from any Git repository and branch
  • Providing a browser-based code editor and shell
  • Running arbitrary processes (compilers, test runners, web servers) inside the workspace
  • Exposing running services so they're reachable from the engineer's browser
  • Pausing a workspace and resuming it later with all files preserved

Engineers will execute untrusted code—builds, scripts, local servers—so isolation is critical.

Scope and Assumptions

  • The platform serves thousands of concurrent workspaces across multiple cloud regions
  • Workspace launch should complete in under 60 seconds; resume should be faster
  • Offer multiple machine sizes (2 CPU / 4 GB up to 16 CPU / 64 GB)
  • Repositories may include a configuration file declaring the base image, install steps, and tooling
  • Browser access only; desktop editor integration is out of scope for now
  • Paused workspaces are retained for 30 days; running workspaces are billed per minute
  • Multi-user collaboration is deferred

Focus on architecture, isolation strategy, storage durability, startup performance, secure network access, and cost management.

Hints

Hint 1

Think about how you'll isolate untrusted workloads and what trade-offs each approach brings

Hint 2

Consider what parts of a workspace must survive a stop-start cycle and where that state lives

Hint 3

Fast startup often means preparing assets ahead of time or keeping capacity warm