Skip to main content

What are scopes?

A scope is an isolated deployment environment where your application runs. Think of it as the infrastructure behind a specific environment — like production, staging, or a temporary preview for a feature branch.

Each application in nullplatform can have multiple scopes. This lets you deploy the same application to different environments, regions, or configurations without duplicating anything in your codebase.

How scopes relate to applications

Scopes live under applications in the nullplatform resource hierarchy:

Organization → Account → Namespace → Application → Scope

When you create a scope for an application, nullplatform provisions the infrastructure needed to run it. Once the scope is active, you can deploy builds to it, route traffic, and manage configuration — all from the same platform.

For more on how this hierarchy works, see NRN (Nullplatform Resource Name).

What you can do with scopes

Scopes are flexible by design. Here are some common ways teams use them:

  • Separate environments — create scopes for development, staging, and production
  • Distribute across regions — deploy the same app to different geographic locations
  • Isolate workloads — separate read-heavy from write-heavy traffic
  • Rightsize infrastructure — allocate different resources to different scopes
  • Preview changes — spin up temporary scopes for feature branches

You can create as many scopes as you need. Combine these patterns to match your infrastructure strategy.

Scope lifecycle

Every scope goes through a series of states as it's created, used, and eventually removed.

StateWhat it means
pendingThe scope has been requested but provisioning hasn't started yet
creatingCloud resources are being provisioned
activeThe scope is ready — you can deploy to it and route traffic
updatingConfiguration changes are being applied
stoppingResources are being scaled down (not destroyed)
stoppedThe scope is suspended. Resources are paused but can be restarted
deletingCloud resources are being torn down
deletedThe scope has been fully removed
failedSomething went wrong during provisioning or deletion
recreatingA previously failed scope is being re-provisioned
note

Only Kubernetes-based scopes can be recreated from a failed state. Other scope types need to be deleted and created again.

Public and private scopes

When you create a scope, you choose whether it's public or private:

  • Public scopes are accessible from the internet. Use these for user-facing applications that receive external traffic.
  • Private scopes can only be reached by other applications inside your account. This is the right choice for internal services, APIs consumed only by other apps, and backend workers.
tip

Start with private scopes unless your application needs to receive direct traffic from the internet.

Next steps

  • Scope types: see all available scope types and choose between them.
  • Containers: the default scope type for Kubernetes workloads.
  • Scheduled tasks: run periodic jobs on Kubernetes using CronJobs.