--- title: "Runtimes and hardware" description: "The CPU hardware a function runs on, the language runtimes offered, and how to choose between a runtime and a custom container." content_type: "concept" product: "functions" platform: "MyAccount" url: "/myaccount/functions/concepts/runtimes-and-hardware/" --- # Runtimes and hardware Every function runs on CPU hardware. You choose between **CPU Functions**, which runs your code from a runtime template, and **Custom Container Image**, which runs your own Docker image. The runtime you choose decides which languages and frameworks you can use. Both are billed the same way; see [Billing](/myaccount/functions/concepts/billing/). ## Hardware choices - **CPU Functions** is the general-purpose choice. It suits REST APIs and webhooks, backends for a frontend, microservices, automation and AI agents, and data processing such as CSV and ETL jobs. CPU and container functions can keep dedicated replicas running to avoid cold starts. - With **Custom Container Image**, you deploy your own Docker image instead of using a provided runtime. It runs on CPU hardware and is billed as a CPU function. Your image must be built for `linux/amd64` and run as a non-root user. By default it must listen on port 8080. To use another port, see [Deploy a custom container image](/myaccount/functions/how-to/deploy-a-custom-container-image/). ## Language runtimes Pick the runtime that matches the language and framework you write in. The runtime list in **Create Function** shows these labels: | Runtime | Code file | Requirements file | | --------------------------------------------------------------------------------------------------------------------- | ---------- | ----------------- | | Python 3.9 (Http), Python 3.10 (Http), Python 3.11 (Http), Python 3.12 (Http), Python 3.13 (Http), Python 3.14 (Http) | func.py | requirements.txt | | Python 3.11 (FastAPI) | func.py | requirements.txt | | Python 3.11 (Flask) | func.py | requirements.txt | | Node 20.x (Http), Node 22.x (Http), Node 24.x (Http) | index.mjs | package.json | | Node 18.x (Express), Node 20.x (Express) | index.js | package.json | | Go 1.21 (Http) | handle.go | go.mod | | C# .Net 7.0 (Http) | Handler.cs | Function.csproj | | PHP 8.2 (Http) | index.php | composer.json | | Custom Container Image | Dockerfile | DOCS.md | For **Custom Container Image**, the second tab is `DOCS.md`. It sits where the other runtimes show their requirements file and holds the platform's guidelines for writing the `Dockerfile`. Choosing **Custom Container Image** gives one runtime of the same name. Every other runtime is under **CPU Functions**. The Python HTTP runtimes run on Debian Linux, from the official Python slim image. The FastAPI, Flask, and Express runtimes run an ordinary app with its own routes. For how each runtime receives a request, see [Requests and responses](/myaccount/functions/concepts/requests-and-responses/). ## How much CPU each memory size gets Each memory choice comes with a share of a CPU. The more memory you give a function, the more CPU it gets: | Memory | CPU share | | ------- | ------------ | | 128 MB | 0.3 of a CPU | | 256 MB | 0.5 of a CPU | | 512 MB | 0.7 of a CPU | | 1024 MB | one full CPU | ## Choosing a runtime Start with **CPU Functions** for most functions. Choose **Custom Container Image** for an application you already run in a container, or for a runtime or library the provided runtimes do not cover. For Python: - **Python 3.11 (FastAPI)** for most new applications: REST APIs, microservices, AI APIs, and apps that need request validation or OpenAPI documentation. - **Python 3.11 (Flask)** to move an existing Flask app, for lightweight services, and to use Flask extensions. - A Python HTTP runtime, such as **Python 3.11 (Http)**, for webhooks and event processing, and to keep cold starts small. For Node.js, use a Node (Http) runtime, such as **Node 24.x (Http)**, for new functions. Use a Node (Express) runtime, such as **Node 20.x (Express)**, to move an existing Express.js application. For the runtimes that suit each kind of job, see [What you can build](/myaccount/functions/concepts/what-you-can-build/#choosing-a-runtime-for-the-job). See [Create a function](/myaccount/functions/how-to/create-a-function/) to put a runtime and hardware choice to work, or [Deploy a custom container image](/myaccount/functions/how-to/deploy-a-custom-container-image/) to use your own image.