Portal Community

The Decision Tree


Is the operation's startup cost negligible (< 50ms)?
    YES → Standard workflow node
    NO  ↓

Is startup cost a one-time cost that can be paid at process boot?
    YES → Server node (amortise startup cost)
    NO  → Revisit design (external service? MCP server?)

Does the operation require shared in-memory state across calls?
(e.g., open connection, in-memory cache, loaded model, streaming cursor)
    NO  → Standard workflow node
    YES → Server node (singleton manages shared state)

Is the operation a long-running streaming task that must outlive a single node call?
    NO  → Standard workflow node
    YES → Server node (background task with request queue)
  

Decision Matrix

ScenarioPatternReason
REST API callStandardHttpClientFactory pools connections; no startup cost
Database query via ADO.NETStandardConnection pool managed by driver; executor is stateless
MCP tool callStandardClient factory manages transports; no local model load
Local LLM inference (e.g., ONNX, llama.cpp)Server nodeModel load takes 10–60s; must be kept in memory
WebSocket message handlerServer nodeOpen socket must persist across multiple message exchanges
CDC (Change Data Capture) consumerServer nodeCursor position and stream reader must persist
In-memory embedding cacheServer nodeCache must be shared across concurrent workflow calls
Rule evaluation (via IRuleEngineClient)StandardRemote rule engine; client is injected, no local state
SMTP email sendStandardSMTP client created per send; connection not reused
GPU-accelerated image classificationServer nodeGPU context and model weights must stay loaded

Resource Considerations

Server nodes consume resources (memory, file handles, threads) for the lifetime of the process. Before choosing the server node pattern, confirm:

External service as an alternative: If a capability requires large startup resources but is shared across many BizFirstGO components (not just workflow nodes), consider hosting it as an external MCP server or microservice rather than a server node in the workflow process. This keeps the workflow host lean and allows independent scaling.