CDX-201b · Module 1

Resource Limits & Constraints

3 min read

Cloud microVMs operate within defined resource limits: CPU cores, memory, disk space, and execution time. These limits prevent runaway tasks from consuming unbounded resources. Understanding the limits helps you scope tasks appropriately — a full-repo refactor that needs 30 minutes of build time may hit the execution time limit, while a focused module change completes comfortably.

Network access in cloud microVMs follows a policy similar to local sandboxing but with cloud-specific nuances. By default, tasks can access package registries (npm, PyPI, etc.) for dependency installation but cannot reach arbitrary external services. If your build or test process requires network access (API calls, external services, Docker pulls), you may need to configure the task accordingly or restructure to use mocks.

# Typical cloud resource limits

CPU:           Up to 4 cores
Memory:        Up to 8 GB RAM
Disk:          Up to 10 GB
Exec time:     Up to 30 minutes per task
Network:       Package registries allowed by default
               Custom endpoints require configuration

# When limits are hit:
- CPU/memory: Task may slow or OOM-kill
- Disk: Task fails with "no space left on device"
- Time: Task terminates with timeout error
- Network: Connection refused for blocked endpoints

Do This

  • Break large tasks into focused, modular units that fit within resource limits
  • Verify that your test suite completes within the execution time limit before automating
  • Use mock services for tests that depend on external APIs in cloud tasks
  • Check disk usage if your build process generates large artifacts

Avoid This

  • Submit tasks that require more than 30 minutes of execution time
  • Assume cloud microVMs have the same specs as your development machine
  • Ignore timeout errors — they indicate the task scope is too broad
  • Depend on stateful network services that the microVM cannot reach