Skip to main content
Version: Next

Codesphere Reactives

Part of Runtimes

This is a detailed guide for Codesphere Reactives. For an overview of all runtime types and how to choose between them, see Runtimes Overview.

Codesphere Reactives are a runtime environment that lets you define your application environment using standard bash commands exactly as you would on a local machine or VM while the platform handles all infrastructure management automatically. You get the freedom of imperative Linux configuration without building, managing, or thinking about containers. The runtime combines the power of traditional server environments with automatic scaling and minimal infrastructure overhead when not running.

Overview

Unlike traditional serverless platforms that are stateless and limited to short-lived function executions, or traditional VMs that consume resources continuously, Codesphere Reactives combine benefits from both paradigms:

FeatureTraditional ServerlessTraditional VMsCodesphere Reactives
Environment ConfigurationNo - Constrained runtimesYes - Full OS management requiredYes - Standard bash commands
State PersistenceNo - StatelessYes - Full stateYes - Shared filesystem
Resource EfficiencyYes - Pay per useNo - Always runningYes - Off-when-unused
Startup TimeSecondsMinutesSeconds
Long-running ProcessesNo - Time limitsYes - UnlimitedYes - Unlimited
Environment ControlNo - LimitedYes - Full controlYes - Flexible via Nix
Infrastructure ManagementYes - AutomaticNo - Manual setup & maintenanceYes - Automatic

Architecture

Codesphere Reactives are fully functional Ubuntu open standard containers orchestrated using our patented deployment orchestration for improved startup performance. For private cloud deployments, the base image can be freely customized by organization administrators. Our architecture enables the rapid startup times that make Reactives the technology powering all Codesphere Workspace cockpit deployments. Each instance receives a network filesystem volume that persists across restarts and replicas, allowing you to write to the filesystem as you would on a local machine. When idle, Reactives automatically scale to zero, releasing compute resources while preserving the filesystem state. On the next request, they restart from a pre-warmed pool.

Reactive Runtime Architecture

Key Components

Shared Network Filesystem

Each Reactive has access to a high-performance network filesystem that provides persistent storage across restarts and replicas. You can mount any file or directory from the network filesystem to any destination in your container. By default, files in /home/user/app are preserved, while other locations use ephemeral storage.

Resource Management

Pooled compute instances across multiple nodes enable instant startup and automatic resource deallocation during idle periods. Unused resources are immediately available to other workloads, and wakeup logic restarts services on-demand.

Kubernetes-Based Orchestration

Built on Kubernetes with health monitoring, load balancing, auto-scaling, and graceful shutdowns - all managed by the platform without requiring any Kubernetes knowledge.

When to Use Codesphere Reactives

Development Use Cases

Reactives excel during development because you can run code scalably without needing to rebuild container images constantly. This makes iteration fast and efficient:

  • Rapid prototyping and testing
  • Quick dependency changes without Docker/Container Image rebuilds
  • Instant code changes with hot reload
  • Scalable development environments that mirror production

Production Use Cases

Reactives are used in production by customers scaling to 70+ replicas and large enterprises who value the ease of use and minimal DevOps overhead:

  • Web services and APIs with automatic scaling
  • Microservices architectures
  • Stateful applications with persistent storage needs
  • Low to high traffic services with efficient resource utilization
  • Cost-sensitive workloads that benefit from off-when-unused behavior

Migration from VMs

Reactives work well for applications migrating from traditional VMs, particularly when:

  • The application can run without root access
  • Local dependencies (installed via Nix or package managers) are sufficient
  • You want to modernize without extensive refactoring

Production Considerations

When using Reactives in production, ensure reproducibility by:

  • Pinning dependency versions explicitly in your prepare steps
  • Documenting all application setup steps in the ci.yml
  • Testing the full prepare and run cycle to ensure consistency
  • Using Nix for deterministic dependency installation

When to Consider Managed Containers Instead

Use Managed Containers when:

  • You need a specific base OS or distribution
  • You have existing OCI images
  • You want dependencies pre-baked for guaranteed reproducibility
  • You require specific system-level packages not available via Nix

Configuration & Lifecycle

Codesphere Reactives are configured through the ci.yml file in your repository. For comprehensive guides on configuring and managing Reactives, see: