> ## Documentation Index
> Fetch the complete documentation index at: https://ryvn.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How the managed runtime works

> What the cloud platform blueprints add on top of the base platform, which features depend on them, and when you get them

Every Ryvn environment runs a platform blueprint, which is the set of components Ryvn installs and keeps up to date in
the cluster. The platform comes in two layers, and the second layer is what the docs call the **managed runtime**.

## The base platform

Every environment gets the base platform (`base-platform`), whether Ryvn built the cluster or you
[connected an existing one](https://ryvn.ai/docs/provision/existing-cluster.md):

* The [Ryvn Agent](https://ryvn.ai/docs/guides/ryvn-agent.md), which runs deployments and reports state back to Ryvn
* The Ryvn collector and kube-state-metrics, which forward logs and metrics to Ryvn
* KEDA, for event-driven autoscaling

That is enough to deliver Helm charts, Terraform, Pulumi, and blueprints into the environment, and to control how each
release reaches it. Everything in the Documentation tab works on the base platform.

## The managed runtime

When Ryvn provisions the environment in [AWS](https://ryvn.ai/docs/provision/aws.md), [Google Cloud](https://ryvn.ai/docs/provision/google-cloud.md), or
[Azure](https://ryvn.ai/docs/provision/azure.md), the environment's platform blueprint is `aws-platform`, `gcp-platform`, or
`azure-platform`. It builds the cluster and its network, includes the base platform, and adds the components that
servers and jobs rely on:

| Component | What it does |
| - | - |
| Managed gateway | An Istio-based gateway with an internal and a public load balancer. It terminates TLS and routes requests to installations by hostname and path. On AWS, the AWS Load Balancer Controller creates the load balancers. |
| cert-manager and a cluster issuer | Issue and renew TLS certificates for the environment's domains. |
| external-dns | Creates the DNS records for exposed ports and custom domains. |
| Node autoscaling | Karpenter on AWS, and the cluster's own node pools on Google Cloud and Azure. |
| metrics-server (AWS) | Provides the CPU and memory metrics that autoscaling reads. |

The platform blueprint also publishes the environment's network details, such as the VPC and private subnets, so other
blueprints can create cloud resources inside that network.

## What depends on it

These features need the managed runtime, so they're documented in the Managed runtime tab:

* **Servers and jobs.** Ryvn builds the container, deploys it, and runs its pre-deploy command and health checks. See
  [Servers](https://ryvn.ai/docs/deploy/service-types/server.md) and [Jobs](https://ryvn.ai/docs/deploy/service-types/job.md).
* **Networking.** Exposing a port, domains and TLS, routes, and outbound IPs use the managed gateway, cert-manager, and
  external-dns. See [Networking](https://ryvn.ai/docs/networking/overview.md).
* **Autoscaling and node pools.** Scaling servers on CPU and memory, and adding nodes for them, uses the node
  autoscaler and resource metrics. See [Scaling](https://ryvn.ai/docs/configure/scaling.md).
* **Managed datastores.** The Postgres, cache, and bucket blueprints create cloud resources in the environment's
  network, so they need the network details only a Ryvn-provisioned environment publishes.

## Choosing between them

If you already run your own clusters, or you only ship Helm charts and Terraform, connect an
[existing cluster](https://ryvn.ai/docs/provision/existing-cluster.md). Ryvn installs only the base platform there, and ingress, DNS, and
certificates stay yours to run.

If you want Ryvn to run your services end to end, including builds, endpoints, TLS, and autoscaling, let Ryvn provision
the environment. Start with the [Managed runtime overview](https://ryvn.ai/docs/managed-runtime.md).
