Shared knowledge · Beginner · For startups and product teams

Build product before infrastructure

Do not design a distributed production topology before the product proves which boundaries need distribution. Keep the business target stable, start local, and move to a peer for a concrete reason.

Existing applications

Try CoAkka Runtime on one internal call

Choose an operation with a result you can compare, such as quoting an order. The existing API still receives requests, checks permissions and returns results. In development, try changing just the call from the API to the pricing handler.

  1. Record the baseline. Send a sample quote request. Record the price and response time, then set the time budget the application needs.
  2. Try it in one process. Use the connector for your current language, register the same handler as billing.quote, then send the same sample request using Embedded mode.
  3. Check the result and a failure. The price should match and the response should meet your time budget. In development, call an unregistered target to see how the application recognizes and handles a delivery failure.
  4. Decide from the evidence. Expand when you see a specific benefit, such as being able to tell where delivery failed. Keep the existing implementation in version control so you can return to it. Try a separate process once you need another language or independent deployment.

01 · Default

Choose the smallest honest shape

stable business target + explicit contract
  first: a local handler in a modular monolith
  later: a peer process or deployed service when evidence requires it

Infrastructure does not disappear. This rule defers proxies, containers, replicas, credentials, rollout and on-call work until the product has a concrete reason to pay those costs.

02 · Product discovery

A monolith can preserve real boundaries

One executable and one debug session can still be organized around stable capabilities. A caller knows the target and payload contract, not whether its handler lives in a module, process, container or host.

customer.profile.update  → customer module
billing.invoice.create   → billing module
inventory.stock.reserve  → inventory module

With CoAkka Runtime this shape uses EMBEDDED, local route port 0 and no TCP listener. Target ownership, bounded admission, timeout, replies/deadletters, lifecycle and diagnostics are still real contracts; the team does not pretend a local function is already a remote service.

03 · Practical progression

Let topology grow after the product

01

Product discovery

One process in EMBEDDED. Focus on customer workflow, business rules, persistence, feedback and failure behavior.

02

Local polyglot

Add a process when another language or runtime gives a concrete advantage. Run from normal IDEs, use explicit loopback and debug both sides.

03

Deployment-shaped verification

Add containers or Compose to prove packages, dependency isolation, CI and the network boundary, not to discover business logic.

04

Independent service and scale

Split deployment only when ownership or operational evidence outweighs the cost of another service.

04 · Decision gate

Split a capability only for a measured need

Release cadence
The capability must ship without redeploying the whole application.
Scaling profile
Its CPU, memory, I/O or concurrency differs enough to scale independently.
Fault isolation
A capability failure must not stop the main process.
Security boundary
It needs separate trust, credentials or data access.
Team ownership
A stable team accepts independent operational responsibility.
Platform requirement
A language, device, accelerator or operating system requires another host.

Do not split because a microservice diagram looks more mature. Every new service adds packaging, configuration, credentials, rollout, monitoring, failure modes and on-call work.

05 · Evolution contract

Keep the business contract; change deployment facts

Keep stable

Target name; payload identity/schema; reply/deadletter expectations; timeout/cancellation policy; business owner of the handler.

Allow to change

Route endpoint and generation; process owner; network mode; bind/advertise values; deployment, scaling and recovery policy.

A call site should not acquire a private controller, URL builder, status-code convention, retry wrapper and correlation scheme merely because its handler moved to another process.

Decision rule

Keep the capability local until one measured development, ownership, security, isolation or scaling need outweighs the operational cost of a new service.

The application still owns transactions, idempotency, payload evolution, authentication/authorization, business retry, discovery input, SLOs and incident response. CoAkka Runtime does not infer business policy from topology.