Architecture

Cloudflare Worker vs VPS: Which Should Run Your Bot?

A decision guide for choosing between serverless Workers and a persistent VPS, including a hybrid architecture that uses both.

Remote VPS deployment session over SSH and SCP
Hands-on screenshot: a VPS is a persistent computer; a Worker is event-driven code at the edge.

A decision guide for choosing between serverless Workers and a persistent VPS, including a hybrid architecture that uses both.

Updated 2026-09-06ArchitecturePractical guide2 min read

In plain English

This guide is about how to split a bot into understandable parts. The aim is to make one component replaceable without forcing a rewrite of everything else.

runtimestateadapteridempotency

Worker strengths

VPS strengths

Hybrid is often the practical answer

Internet / TradingView
       ↓
Cloudflare Worker
  validate + normalize
       ↓
private VPS endpoint
       ↓
strategy + broker adapter + database

This keeps the public surface small while preserving a normal Linux environment for heavier bot logic.

Before you rely on this in production

  • Each component has one clear responsibility.
  • State survives the restart cases that matter.
  • External platform details are isolated behind adapters.
  • A safe stop/disable mechanism exists.