决策地图
基础设施:部署方式、运行时与操作责任
覆盖 Hosting、Serverless、CDN 与容器平台,帮助团队按运行边界而不是品牌声量选择。
Recommendation
以托管 Web 平台起步;只有后台进程、特殊网络或长期运行负载成为核心时再转向容器。
先确定进程、状态、网络与地区要求,再选部署平台;不要把预览体验当成全部基础设施能力。
范围
用这条边界避免在错误层级解决相邻问题。
包含
- Application hosting, environments, placement, and deployment operation
- Request-driven and event-driven serverless compute
- Container build, image distribution, runtime, and orchestration routes
- Content delivery, caching, origin, and geographic distribution
- Background execution, queue transport, and time-based scheduling
- Declarative infrastructure provisioning, planning, state, and apply workflow
不包含
- Serverless database capacity and persistence decisions
- Application-data caching, database selection, and file persistence
- Developer workstation environments and local cloud emulation
- Edge Computing as an independent Task rather than a cross-cutting placement capability
重要工具
这些工具代表此决策领域内不同路线;请先打开相关任务页面,再将任何工具视作默认。
- Vercel
- Cloudflare
- Netlify (英文页面)
- Railway (英文页面)
- Fly.io (英文页面)
- Cloudflare Workers (英文页面)
- AWS Lambda Functions (英文页面)
- Google Cloud Run (英文页面)
- Amazon ECS (英文页面)
- Google Kubernetes Engine (英文页面)
- Kubernetes (英文页面)
- Cloudflare CDN (英文页面)
- Amazon CloudFront (英文页面)
- Fastly CDN (英文页面)
- Bunny CDN (英文页面)
- Trigger.dev (英文页面)
- Inngest (英文页面)
- Temporal (英文页面)
- BullMQ (英文页面)
- Amazon SQS (英文页面)
- Cloudflare Queues (英文页面)
- Upstash QStash (英文页面)
- Azure Service Bus (英文页面)
- Amazon EventBridge Scheduler (英文页面)
- Terraform (英文页面)
- Pulumi (英文页面)
- AWS CDK (英文页面)
- SST (英文页面)
决策顺序
先完成基础归属判断,再增加专门能力。
What request or event model, duration, state, latency, geography, availability, scale, and operational ownership does the workload require?
Use the workload and service objectives to frame the broad Hosting decision before choosing a runtime label.
Should the workload use platform-native hosting, Serverless Compute, or Container Platforms?
Compare runtime compatibility, duration, concurrency, scaling, isolation, portability, build and image workflow, and orchestration burden.
Does content need geographic caching, origin shielding, cache control, or explicit invalidation?
Evaluate Content Delivery Networks for content delivery; treat edge execution as a capability of Hosting or Serverless Compute rather than another Task.
Does work run outside a request, and is it triggered by a message, a schedule, or another event?
Select Background Jobs for execution, Queues for message retention and delivery, and Scheduled Jobs for time-based invocation. A system may use all three.
Which infrastructure resources and changes should be expressed, reviewed, planned, and applied as code?
Adopt Infrastructure as Code after resource ownership is clear and define provider, state, secrets, approval, apply, and drift workflows.
决策分组
每个任务都对应一个独立的用户决策,而非产品功能标签。
Hosting and compute
Choose the broad hosting model before selecting specialized function or container execution routes.
Content delivery
Content Delivery Networks are a distinct cache and distribution layer that can front multiple hosting models.
Asynchronous execution and triggers
Background workers execute work, queues retain and deliver messages, and schedulers invoke targets by time.
Infrastructure lifecycle
Infrastructure as Code governs versioned desired state, planning, approval, application, and drift after resource decisions are understood.
常见混淆
这些边界避免相邻任务被压缩成一个泛泛的候选清单。
- Treating Hosting and Serverless Compute as interchangeable labels.
- Hosting is the broad environment and deployment decision; Serverless Compute is one request or event execution model with runtime and service limits.
- Treating container build, image distribution, runtime, and orchestration as a single undifferentiated product feature.
- They are distinct routes inside one Container Platforms Task; orchestration is not required for every container workload.
- Treating every workload described as edge as a standalone Edge Computing decision.
- Content caching and delivery route to Content Delivery Networks; code execution routes to Hosting or Serverless Compute. Edge placement is a cross-cutting capability and the retired Task aliases to Hosting.
- Treating a durable queue and a background worker as the same system responsibility.
- Queues retain and deliver messages; Background Jobs execute work and own retry, duration, concurrency, and idempotency.
- Treating time-based invocation and background work execution as one decision.
- Scheduled Jobs own when and how a target is invoked; Background Jobs own how the work runs and recovers.
- Treating infrastructure definitions and the automation runner that applies them as one tool category.
- Infrastructure as Code owns desired resources, plans, state, and apply semantics; CI/CD owns pipeline execution and promotion workflow.
暂缓引入
不要在产品真正需要之前引入专门系统。
The hosting platform's existing runtime satisfies the workload and no request or event function boundary changes scaling, isolation, or operations.
A separate serverless-compute evaluation is useful only when its runtime and invocation model changes the architecture.
The application does not require container packaging, custom runtime dependencies, image portability, or orchestration control.
Container build, distribution, runtime, and orchestration add operating responsibilities that managed hosting may avoid.
All current work completes safely inside the request path and has no message buffering, retry, long-running, or time-trigger requirement.
Workers, queues, and schedulers should follow a concrete asynchronous or time-based workload rather than become speculative infrastructure.
The hosting platform's current delivery path meets geographic latency, origin-load, freshness, and invalidation requirements.
A separate CDN decision is unnecessary until cache and delivery behavior must be owned explicitly.
The resource set is still exploratory and the team has not established stable ownership, review, state, or change-approval requirements.
Infrastructure as Code should encode understood resources and governance rather than stabilize an undefined architecture.
Starter Stack
查看这些决策如何出现在完整应用起始方案中。
官方资源
支撑此分类边界的标准与一手文档。
来源
此决策地图使用的主张级参考资料。
- 1AWS Well-Architected Framework
AWS · Accessed Official
- 2Vercel Environments
Vercel · Accessed Official
- 3What is AWS Lambda?
AWS · Accessed Official
- 4AWS Lambda quotas
AWS · Accessed Official
- 5OCI overview
Open Container Initiative · Accessed Official
- 6Docker Build overview
Docker · Accessed Official
- 7Docker overview
Docker · Accessed Official
- 8Kubernetes workloads
Kubernetes · Accessed Official
- 9Cloudflare Cache
Cloudflare · Accessed Official
- 10Cloudflare CDN reference architecture
Cloudflare · Accessed Official
- 11Cloudflare Workers
Cloudflare · Accessed Official
- 12Customize at the edge with CloudFront Functions and Lambda@Edge
AWS · Accessed Official
- 13Vercel Edge runtime
Vercel · Accessed Official
- 14Amazon SQS Developer Guide
AWS · Accessed Official
- 15Best practices for background jobs
Microsoft · Accessed Official
- 16Cloudflare Cron Triggers
Cloudflare · Accessed Official
- 17Amazon EventBridge Scheduler
AWS · Accessed Official
- 18What is Terraform?
HashiCorp · Accessed Official
- 19Core Terraform workflow
HashiCorp · Accessed Official