You can increase throughput for your workloads by configuring the number of workers to launch per container. For example, if you have 4 workers on 1 container, you can run 4 tasks at once.Workers are especially useful for CPU workloads, since you can increase throughput by adding workers and additional CPU cores, rather than using autoscaling to additional containers.
from beam import Image, QueueDepthAutoscaler, task_queue@task_queue( cpu=4, # 1 CPU core per worker is a good rule of thumb workers=4, # Launch 4 workers per container to increase throughput image=Image(python_version="python3.11", python_packages=["pandas", "csaps"]), autoscaler=QueueDepthAutoscaler(max_containers=5, tasks_per_container=1),)def handler(): import pandas as pd print(pd) import time time.sleep(5) return {"result": True}
Workers are always orchestrated together. When the container launches, all the workers launch.This can result in higher throughput than using multiple containers with horizontal autoscaling.
Workers allow you to increase your per container throughput, vertically.
Autoscaling allows to scale the number of containers and increase throughput
horizontally
Each worker will share the CPU, Memory, and GPU defined in your app. This means that you’ll usually need to increase these values in order to utilize more workers.For example, let’s say your model uses 3Gi of GPU memory, and your app is deployed on a T4 GPU with 16Gi of GPU memory. Four model copies would use 12Gi, with additional memory needed to handle requests. Measure peak memory usage before choosing the worker count.It’s not always possible to fit multiple workers onto a single machine. In order to use workers effectively, you’ll need to know how much compute is consumed by your task.When you’ve added multiple workers, you’ll be able to see each time a new worker is started in your logs:
Was this page helpful?
⌘I
{"docsConfig":{"theme":"linden","$schema":"https://mintlify.com/docs.json","name":"Beam","description":"Beam provides CPU and GPU machines for agents, billed by the millisecond: persistent VMs that pause with their memory intact, sandboxes that boot in seconds, and GPU endpoints for inference.","colors":{"primary":"#477ff7","light":"#93c5fd","dark":"#2563eb"},"logo":{"light":"https://mintcdn.com/slai-beam/StmwwthCMFzpzgft/logo/dark-logo.svg?fit=max\u0026auto=format\u0026n=StmwwthCMFzpzgft\u0026q=85\u0026s=23387d001289bc6dcbe6be3f49769690","dark":"https://mintcdn.com/slai-beam/StmwwthCMFzpzgft/logo/light-logo.svg?fit=max\u0026auto=format\u0026n=StmwwthCMFzpzgft\u0026q=85\u0026s=0e0baef0b1593f56b60113ffd67fd744"},"favicon":"https://mintcdn.com/slai-beam/ZujHWu-L9dNBQS2M/logo/favicon.png?fit=max\u0026auto=format\u0026n=ZujHWu-L9dNBQS2M\u0026q=85\u0026s=b6614f50c2766c80749cc429d96a3a05","navbar":{"links":[{"href":"https://join.slack.com/t/beam-cloud/shared_invite/zt-4bf7jalhy-KI0ebGXk4vKpcDofwDjCLA","label":"Community"},{"href":"https://status.beam.cloud","label":"Status"}],"primary":{"type":"button","label":"Dashboard","href":"https://platform.beam.cloud"}},"footer":{"socials":{"website":"https://beam.cloud","github":"https://github.com/beam-cloud/beta9","slack":"https://join.slack.com/t/beam-cloud/shared_invite/zt-4bf7jalhy-KI0ebGXk4vKpcDofwDjCLA"}},"seo":{"metatags":{"og:image":"https://www.beam.cloud/meta-hero.png"},"indexing":"navigable"},"fonts":{"family":"Inter"},"integrations":{"ga4":{"measurementId":"G-XN1SS41L9X"},"posthog":{"apiKey":"phc_VhYc3jzbsDBBGtZHU3fLefqRq6wE8FxZLy1zJk1cLeB","apiHost":"https://us.i.posthog.com"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"markdown":{"instructions":["Install the Beam CLI, sign in, and connect coding agents to the Beam MCP server with `curl -fsSL https://www.beam.cloud/install | sh`. To also create a VM, run `curl -fsSL https://www.beam.cloud/install | sh -s -- --vm`.","VMs are persistent Linux machines without GPUs. Defaults: 4 CPUs, 8 GiB of RAM, a 50 GiB disk, Ubuntu 24.04, and a browser desktop. A running VM accrues usage until you stop, pause, or remove it, or until an idle timeout puts it to sleep.","Stopping a VM keeps its disk and discards RAM and processes. Pausing keeps both, and resuming restores them. To pause after 5 idle minutes and wake on access, run `beam vm update NAME --ttl 300 --idle-action pause --auto-resume`.","Core VM commands: `beam vm new NAME`, `beam vm ssh NAME`, `beam vm sync NAME ./dir`, `beam vm exec NAME -- CMD`, `beam vm expose NAME PORT --protected`, `beam vm fork NAME NEW_NAME`, `beam vm pause NAME`, `beam vm stop NAME`, `beam vm rm NAME`.","For GPUs, use a sandbox or a deployed endpoint. Sandboxes are disposable environments that boot in seconds and fork from snapshots.","Current rates are at https://www.beam.cloud/pricing."]},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Slack Community","icon":"slack","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://join.slack.com/t/beam-cloud/shared_invite/zt-4bf7jalhy-KI0ebGXk4vKpcDofwDjCLA"},{"anchor":"Github","icon":"github","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://github.com/beam-cloud/beta9"},{"anchor":"Twitter","icon":"twitter","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://twitter.com/beam_cloud"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"slai-beam","hasAudioNarration":false,"actualSubdomain":"slai-beam","customDomains":["docs.beam.cloud"],"gitSource":{"type":"github","owner":"slai-labs","repo":"beam-docs","deployBranch":"main","contentDirectory":"","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad930602bf56705e20822a7","collectionId":"b5717e79-df2a-4cca-ae30-b75e78c492c4","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad930602bf56705e20822a7"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ad930602bf56705e20822a7","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Documentation","count":83},{"language":"default","tag":"Examples","count":16},{"language":"default","tag":"Building Blocks","count":12},{"language":"default","tag":"Inference","count":11},{"language":"default","tag":"Virtual Machines","count":11},{"language":"default","tag":"Advanced Topics","count":9},{"language":"default","tag":"Start Here","count":9},{"language":"default","tag":"API Reference","count":7},{"language":"default","tag":"Sandboxes","count":7},{"language":"default","tag":"Data and Storage","count":5}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@beam.cloud"}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#navbar ul:has(>#topbar-cta-button)>li:not(#topbar-cta-button)>a{padding:.375rem .75rem;border-radius:9999px;background-color:rgb(243 244 246);color:rgb(17 24 39);font-size:.875rem;line-height:1.25rem;transition:background-color 150ms ease}#navbar ul:has(>#topbar-cta-button)>li:not(#topbar-cta-button)>a:hover{background-color:rgb(229 231 235);color:rgb(17 24 39)}.dark #navbar ul:has(>#topbar-cta-button)>li:not(#topbar-cta-button)>a{background-color:rgb(255 255 255/.08);color:rgb(255 255 255)}.dark #navbar ul:has(>#topbar-cta-button)>li:not(#topbar-cta-button)>a:hover{background-color:rgb(255 255 255/.14);color:rgb(255 255 255)}#topbar-cta-button>a{padding:.375rem .875rem;border-radius:9999px;border-color:transparent;background-color:#477ff7;color:#fff;transition:background-color 150ms ease}#topbar-cta-button>a:hover{background-color:#2563eb;color:#fff}#topbar-cta-button>a svg{display:none}"}],"page":{"pagePath":"v2/scaling/concurrent-inputs","slug":"/v2/scaling/concurrent-inputs","pageMetadata":{"title":"Concurrent Inputs","icon":"cubes-stacked","description":null,"href":"/v2/scaling/concurrent-inputs"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,OptimizedImage,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`increasing-throughput-in-a-single-container`,children:`Increasing Throughput in a Single Container`}),`\n`,_jsx(_components.p,{children:`You can increase throughput for your workloads by configuring the number of workers to launch per container. For example, if you have 4 workers on 1 container, you can run 4 tasks at once.`}),`\n`,_jsx(_components.p,{children:`Workers are especially useful for CPU workloads, since you can increase throughput by adding workers and additional CPU cores, rather than using autoscaling to additional containers.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` beam `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Image, QueueDepthAutoscaler, task_queue`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@task_queue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` cpu`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1 CPU core per worker is a good rule of thumb`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` workers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Launch 4 workers per container to increase throughput`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` image`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Image(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`python_version`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"python3.11\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`python_packages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pandas\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"csaps\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` autoscaler`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`QueueDepthAutoscaler(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`max_containers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`tasks_per_container`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` handler`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pandas `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pd`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(pd)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.sleep(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Workers are always orchestrated together. When the container launches, all the workers launch.`}),`\n`,_jsx(_components.p,{children:`This can result in higher throughput than using multiple containers with horizontal autoscaling.`}),`\n`,_jsx(Heading,{level:`3`,id:`worker-use-cases`,children:`Worker Use-Cases`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Workers allow you to increase your `,_jsx(_components.em,{children:`per container`}),` throughput, vertically.\nAutoscaling allows to scale the `,_jsx(_components.em,{children:`number of containers`}),` and increase throughput\nhorizontally`]})}),`\n`,_jsx(_components.p,{children:`Each worker will share the CPU, Memory, and GPU defined in your app. This means that you’ll usually need to increase these values in order to utilize more workers.`}),`\n`,_jsx(_components.p,{children:`For example, let’s say your model uses 3Gi of GPU memory, and your app is deployed on a T4 GPU with 16Gi of GPU memory. Four model copies would use 12Gi, with additional memory needed to handle requests. Measure peak memory usage before choosing the worker count.`}),`\n`,_jsx(_components.p,{children:`It’s not always possible to fit multiple workers onto a single machine. In order to use workers effectively, you’ll need to know how much compute is consumed by your task.`}),`\n`,_jsx(_components.p,{children:`When you’ve added multiple workers, you’ll be able to see each time a new worker is started in your logs:`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/slai-beam/cYxAFgZcnH6nQdWb/img/deployment/workers.png?fit=max\u0026auto=format\u0026n=cYxAFgZcnH6nQdWb\u0026q=85\u0026s=2c2c8f1b7e87e0fd1cf4029fa4d972c6`,\"data-og-width\":`1068`,width:`1068`,\"data-og-height\":`448`,height:`448`,\"data-path\":`img/deployment/workers.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/slai-beam/cYxAFgZcnH6nQdWb/img/deployment/workers.png?w=280\u0026fit=max\u0026auto=format\u0026n=cYxAFgZcnH6nQdWb\u0026q=85\u0026s=d289c0e277e9475184162a6b0c469fe8 280w, https://mintcdn.com/slai-beam/cYxAFgZcnH6nQdWb/img/deployment/workers.png?w=560\u0026fit=max\u0026auto=format\u0026n=cYxAFgZcnH6nQdWb\u0026q=85\u0026s=a8994509e9c839a47d0ebe12d02962a8 560w, https://mintcdn.com/slai-beam/cYxAFgZcnH6nQdWb/img/deployment/workers.png?w=840\u0026fit=max\u0026auto=format\u0026n=cYxAFgZcnH6nQdWb\u0026q=85\u0026s=645dd6f1e2c020f96d77d8897248353f 840w, https://mintcdn.com/slai-beam/cYxAFgZcnH6nQdWb/img/deployment/workers.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cYxAFgZcnH6nQdWb\u0026q=85\u0026s=ea7cf84f87a63e7670b4ecdc54675e38 1100w, https://mintcdn.com/slai-beam/cYxAFgZcnH6nQdWb/img/deployment/workers.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cYxAFgZcnH6nQdWb\u0026q=85\u0026s=2e9a062180acbf1851791f24bc0f39f9 1650w, https://mintcdn.com/slai-beam/cYxAFgZcnH6nQdWb/img/deployment/workers.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cYxAFgZcnH6nQdWb\u0026q=85\u0026s=9ecca53f3caefb89d3d85053ff83e878 2500w`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Concurrent Inputs","icon":"cubes-stacked","description":null,"href":"/v2/scaling/concurrent-inputs"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Increasing Throughput in a Single Container","slug":"increasing-throughput-in-a-single-container","depth":2,"children":[{"title":"Worker Use-Cases","slug":"worker-use-cases","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"slai-beam","siteName":"Beam","title":"Concurrent Inputs - Beam","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-21T21:36:43.054Z","originalFileLocation":"v2/scaling/concurrent-inputs.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Beam\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Concurrent Inputs - Beam\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Beam\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.beam.cloud/v2/scaling/concurrent-inputs\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://www.beam.cloud/meta-hero.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Concurrent Inputs - Beam\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://www.beam.cloud/meta-hero.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Beam\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#477ff7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.beam.cloud/v2/scaling/concurrent-inputs\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v2/scaling/concurrent-inputs.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.beam.cloud/#organization\",\"name\":\"Beam\",\"url\":\"https://docs.beam.cloud\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/slai-beam/StmwwthCMFzpzgft/logo/dark-logo.svg?fit=max\u0026auto=format\u0026n=StmwwthCMFzpzgft\u0026q=85\u0026s=23387d001289bc6dcbe6be3f49769690\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.beam.cloud#website\",\"name\":\"Beam\",\"url\":\"https://docs.beam.cloud\",\"publisher\":{\"@id\":\"https://docs.beam.cloud/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.beam.cloud/v2/scaling/concurrent-inputs#webpage\",\"url\":\"https://docs.beam.cloud/v2/scaling/concurrent-inputs\",\"name\":\"Concurrent Inputs\",\"dateModified\":\"2026-10-21T21:36:43.054Z\",\"isPartOf\":{\"@id\":\"https://docs.beam.cloud#website\"},\"breadcrumb\":{\"@id\":\"https://docs.beam.cloud/v2/scaling/concurrent-inputs#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.beam.cloud/v2/scaling/concurrent-inputs#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inference\",\"item\":\"https://docs.beam.cloud/v2/endpoint/hosted-models\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Concurrent Inputs\",\"item\":\"https://docs.beam.cloud/v2/scaling/concurrent-inputs\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.beam.cloud/v2/scaling/concurrent-inputs#article\",\"headline\":\"Concurrent Inputs\",\"name\":\"Concurrent Inputs\",\"url\":\"https://docs.beam.cloud/v2/scaling/concurrent-inputs\",\"mainEntityOfPage\":{\"@id\":\"https://docs.beam.cloud/v2/scaling/concurrent-inputs#webpage\"},\"image\":\"https://www.beam.cloud/meta-hero.png\",\"dateModified\":\"2026-10-21T21:36:43.054Z\",\"publisher\":{\"@id\":\"https://docs.beam.cloud/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.beam.cloud#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Beam\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Beam","nav":{"global":{"anchors":[{"anchor":"Slack Community","icon":"slack","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://join.slack.com/t/beam-cloud/shared_invite/zt-4bf7jalhy-KI0ebGXk4vKpcDofwDjCLA"},{"anchor":"Github","icon":"github","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://github.com/beam-cloud/beta9"},{"anchor":"Twitter","icon":"twitter","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://twitter.com/beam_cloud"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Start Here","pages":[{"title":"Introduction","icon":"table-rows","href":"/v2/getting-started/introduction"},{"title":"Give an Agent a Dev Box","sidebarTitle":"Virtual Machines","icon":"server","href":"/v2/getting-started/quickstart-vm"},{"title":"Run Agent Code in a Sandbox","sidebarTitle":"Sandboxes","icon":"box","href":"/v2/getting-started/quickstart-sandbox"},{"title":"Quickstart: Deploy an Endpoint","sidebarTitle":"Endpoints","icon":"hand-wave","href":"/v2/getting-started/quickstart"},{"title":"Set Up Coding Agents","icon":"plug","href":"/v2/getting-started/add-to-cursor-claude"},{"title":"Installation","icon":"download","href":"/v2/getting-started/installation"},{"title":"Authentication and Workspaces","icon":"key","href":"/v2/getting-started/authentication"},{"title":"Core Concepts","icon":"notebook","href":"/v2/getting-started/core-concepts"},{"title":"Using the Dashboard","icon":"browser","href":"/v2/getting-started/dashboard"}]},{"group":"Virtual Machines","pages":[{"title":"Overview","icon":"server","href":"/v2/vm/overview"},{"title":"Configuration","icon":"sliders","href":"/v2/vm/configuration"},{"title":"Secrets","icon":"lock","href":"/v2/vm/secrets"},{"title":"Lifecycle","icon":"power-off","href":"/v2/vm/lifecycle"},{"title":"Storage and Snapshots","icon":"database","href":"/v2/vm/storage"},{"title":"Commands and SSH","icon":"terminal","href":"/v2/vm/processes"},{"title":"Networking","icon":"network-wired","href":"/v2/vm/networking"},{"title":"Desktop","icon":"desktop","href":"/v2/vm/desktop"},{"title":"Docker and Compose","icon":"docker","href":"/v2/vm/docker"},{"title":"CLI Reference","icon":"code","href":"/v2/vm/cli"},{"title":"SDK","icon":"code","href":"/v2/vm/sdk"}]},{"group":"Sandboxes","pages":[{"title":"Overview","icon":"box","href":"/v2/sandbox/overview"},{"title":"Sandbox Configuration","icon":"wrench","href":"/v2/sandbox/configuration"},{"title":"Snapshots","icon":"camera","href":"/v2/sandbox/snapshots"},{"title":"Process Management","icon":"terminal","href":"/v2/sandbox/processes"},{"title":"Networking","icon":"globe","href":"/v2/sandbox/networking"},{"title":"File System Operations","icon":"folder","href":"/v2/sandbox/filesystem"},{"title":"Docker in Sandboxes","icon":"docker","href":"/v2/sandbox/docker"}]},{"group":"Inference","pages":[{"title":"Hosted Model Inference","icon":"brain","href":"/v2/endpoint/hosted-models"},{"title":"Creating a Web Endpoint","icon":"laptop-code","href":"/v2/endpoint/overview"},{"title":"Hosting a Web Server","icon":"server","href":"/v2/endpoint/web-server"},{"title":"Realtime and Streaming","icon":"bolt","href":"/v2/endpoint/realtime"},{"title":"Pre-Loading Models","icon":"circle-down","href":"/v2/endpoint/loaders"},{"title":"Cold Start Performance","icon":"rocket","href":"/v2/topics/cold-start"},{"title":"Keeping Containers Warm","description":"Control how long your apps stay running before shutting down.","icon":"hotjar","href":"/v2/endpoint/keep-warm"},{"title":"Concurrent Inputs","icon":"cubes-stacked","href":"/v2/scaling/concurrent-inputs"},{"title":"GPU Acceleration","icon":"microchip","description":null,"href":"/v2/environment/gpu"},{"title":"Versioning","icon":"code-compare","href":"/v2/endpoint/versioning"},{"title":"Sending File Payloads","icon":"file","href":"/v2/endpoint/sending-file-payloads"}]},{"group":"Building Blocks","pages":[{"title":"Running Async Tasks","icon":"layer-group","href":"/v2/task-queue/running-tasks"},{"title":"Querying Task Status","icon":"check-double","href":"/v2/task-queue/query-status"},{"title":"Running Functions Remotely","icon":"cloud","href":"/v2/function/running-functions"},{"title":"Scheduled Jobs","icon":"clock","href":"/v2/function/scheduled-job"},{"title":"Queues","icon":"grip-lines","href":"/v2/function/queues"},{"title":"Distributed Maps","icon":"book","href":"/v2/function/maps"},{"title":"Deploy Containers","icon":"docker","href":"/v2/hosting/containers"},{"title":"Deployment Lifecycle","icon":"code-branch","href":"/v2/hosting/deployments"},{"title":"Environment Variables and References","icon":"link","href":"/v2/hosting/references"},{"title":"Stacks","icon":"layer-group","href":"/v2/hosting/stacks"},{"title":"Host a Web Service","icon":"hammer","href":"/v2/pod/web-service"},{"title":"Networking","icon":"sitemap","href":"/v2/pod/networking"}]},{"group":"Container Images","pages":[{"title":"Container Images","icon":"gears","href":"/v2/environment/custom-images"},{"title":"Custom Registries","icon":"list","href":"/v2/environment/custom-registries"},{"title":"CPU and RAM","icon":"server","href":"/v2/environment/resources"},{"title":"Storing Secrets","icon":"lock","href":"/v2/environment/secrets"}]},{"group":"Data and Storage","pages":[{"title":"Managed Databases","icon":"database","href":"/v2/data/databases"},{"title":"Distributed Storage Volumes","icon":"hard-drive","href":"/v2/data/volume"},{"title":"Durable Disks","icon":"database","href":"/v2/data/durable-disks"},{"title":"Mounting S3 Buckets","icon":"bucket","href":"/v2/data/external-storage"},{"title":"Ephemeral Files and Images","icon":"upload","href":"/v2/data/output"}]},{"group":"Scaling","pages":[{"title":"Scaling Out","icon":"boxes-stacked","href":"/v2/scaling/concurrency"},{"title":"Parallelizing Functions","icon":"boxes-stacked","href":"/v2/scaling/parallelizing-functions"}]},{"group":"Operations","pages":[{"title":"Logs and Metrics","icon":"chart-line","href":"/v2/operations/observability"},{"title":"Workspace MCP","icon":"plug","href":"/v2/operations/mcp"},{"title":"Webhooks","icon":"webhook","href":"/v2/operations/webhooks"}]},{"group":"Run in Your Cloud","pages":[{"title":"Compute Pools","icon":"server","href":"/v2/scaling/pools"},{"title":"Overview","icon":"building","href":"/v2/self-hosting/overview"},{"title":"Local Development Cluster","icon":"computer","href":"/v2/self-hosting/local-machine"},{"title":"Deploying Beta9 on AWS","icon":"aws","href":"/v2/self-hosting/aws"}]},{"group":"Advanced Topics","pages":[{"title":"Integrate into CI/CD","icon":"link","href":"/v2/topics/ci"},{"title":"Input and Output Schemas","icon":"brackets-curly","href":"/v2/topics/schemas"},{"title":"Timeouts and Retries","icon":"clock","href":"/v2/topics/timeouts-and-retries"},{"title":"Public Endpoints","icon":"unlock","href":"/v2/topics/public-endpoints"},{"title":"Task Callbacks","icon":"bell","href":"/v2/topics/callbacks"},{"title":"Send Events Between Apps","icon":"circle","href":"/v2/topics/signal"},{"title":"Runtime Variables","icon":"code","href":"/v2/topics/context"},{"title":"Working in Jupyter Notebooks","icon":"book","href":"/v2/environment/jupyter-notebook"},{"title":"Remote vs. Local Environment","icon":"house","href":"/v2/environment/remote-versus-local"}]},{"group":"Resources","pages":[{"title":"Pricing and Billing","icon":"dollar-sign","href":"/v2/resources/pricing-and-billing"},{"title":"Using Beam Docs with AI Tools","icon":"robot","href":"/v2/resources/ai-tools"},{"title":"Troubleshooting","icon":"question","href":"/v2/resources/faq"}]},{"group":"Security","pages":[{"title":"Security overview","icon":"shield-halved","href":"/v2/security/security"},{"title":"Terms of Service","icon":"handshake","href":"/v2/security/terms-and-conditions"},{"title":"Privacy Policy","icon":"user-secret","href":"/v2/security/privacy-policy"},{"title":"Data Processing Addendum","icon":"file-shield","hidden":true,"href":"/v2/security/data-processing-addendum"},{"title":"Subprocessor List","icon":"list-check","hidden":true,"href":"/v2/security/subprocessor-list"}]}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/v2/examples/overview"}]},{"tab":"Python SDK","pages":[{"title":"Python SDK","href":"/v2/reference/py-sdk"}]},{"tab":"JavaScript / TypeScript","pages":[{"title":"JavaScript / TypeScript","href":"/v2/reference/ts-sdk"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/v2/reference/cli"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/v2/reference/api"}]}]},"basePath":"","title":"Concurrent Inputs - Beam","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DXXFP6nH.js","DynamicMarkdown-B54_zNBF.js","zoom-image-lightbox-BG6oD64b.js","lightbox-handle-r17bVUz3.js"]}