The first scaling problem is usually understanding
A new product has plenty of uncertainty without making every feature a distributed system. You are still learning where the business rules belong, which workflows matter, and what the team can reasonably operate. Splitting deployment units before those boundaries are clear can turn a local function call into a network dependency without improving the underlying design.
A modular monolith is a useful starting point: one deployable application, with deliberate boundaries inside it. The important word is modular. Sharing a process does not require every feature to reach into every table or import every internal helper.
Draw boundaries around responsibilities
Start with the records and decisions the product needs to own. An ordering module might own order state and validation. A catalogue module owns product information. Notifications deliver messages; they should not decide whether an order is valid.
Write down what each module exposes and what remains private. A small public interface makes dependencies visible and gives tests something meaningful to exercise. You do not need a complicated abstraction layer to establish this discipline.
// Other modules use this contract, rather than the orders table.
export interface OrderService {
placeOrder(input: PlaceOrderInput): Promise<OrderReceipt>;
getStatus(orderId: string): Promise<OrderStatus>;
}The interface is not the architecture by itself. Ownership, transaction boundaries, and failure behavior still need decisions. For example, what happens if an order is saved but its confirmation email cannot be delivered? That question exists regardless of whether the modules share a deployment.
Keep transactions and side effects explicit
Use a database transaction when a set of writes must succeed or fail together. Treat calls to external systems as a separate reliability problem. A database transaction cannot guarantee that an email provider or shipping API performs an action exactly once.
For important asynchronous work, consider recording the intent durably alongside the business change and processing it with a retryable worker. Give the operation an idempotency key so a repeated event does not create a repeated business action. The appropriate implementation depends on the consequence of losing or duplicating that work.
At a minimum, define three things for each side effect: how failure is noticed, whether retrying is safe, and who owns recovery. Those definitions are more useful than adding a queue without a recovery plan.
Make extraction a decision with evidence
A module can become a separate service when there is a clear reason. Perhaps it has a materially different scaling pattern, requires a different security boundary, or needs independent release ownership. Those are concrete pressures you can assess.
Before extracting it, ask what changes operationally. You will need authentication between services, versioned contracts, timeouts, tracing, retry policies, and a deployment process for another system. A service boundary can be valuable, but it comes with work that the shared process previously handled for you.
Leave a decision trail
Keep short architecture decision records close to the code. State the context, the choice, the alternatives considered, and the conditions that would make you revisit it. Future maintainers need the reason behind a decision more than they need another diagram of the current folder structure.
The practical aim is not to avoid microservices forever. It is to make the current system understandable, establish useful boundaries, and let measured needs guide the next architectural step.

