All articles

Architecture

First-version architecture: what to prepare for growth

Access rules, data integrity and recovery need early decisions. Learn which boundaries preserve room to grow and when extra infrastructure earns its cost.

Igor Ulanov5 min readViews: 0
First-version architecture: what to prepare for growth

Start with the promises the product makes

Two people select the last available booking slot at the same time. Both interfaces correctly showed it as available. The system must decide what happens when their requests are saved. More servers do not settle that question: a clear rule and a reliable way to enforce it are required.

This makes business behaviour a useful starting point for architecture. Who creates information, who may change its state and what has the service promised? An order may involve reservation, payment and delivery. An internal tool may assign a task and confirm its completion. These boundaries are understandable to a business owner and reveal where a failure would be expensive, even before the technology choices are discussed.

Make the expensive-to-retrofit decisions early

Access, data ownership, core constraints and the history of significant changes deserve attention before launch. When multiple companies use one application, their records need to be separated from the first release. Hiding a button in the browser does not replace a server-side permission check. A small user base can still hold commercially sensitive information.

Important data rules should also be supported where information is stored. An identifier’s uniqueness and valid relationships between records should not depend solely on the form. The PostgreSQL documentation describes these constraint mechanisms. Booking overlapping time intervals requires its own concurrency rule; giving each booking a unique number does not, by itself, prevent a double booking.

Use a simple structure with deliberate internal boundaries

An early product can often be deployed as one application with distinct internal modules. Order rules, catalogue information and notification delivery have clear responsibilities without requiring three separately operated infrastructures. A message template can change without altering order calculations, and order rules can be checked without sending a real customer email.

Martin Fowler’s Monolith First is a useful reference when discussing the operating cost of service separation. It does not establish that any arbitrary application can later be split easily. If independent deployment, isolation or a particular workload is already required, account for it from the start. Team experience and the organisation’s operating model matter alongside the product’s size.

Treat retries and partial completion as normal conditions

A supplier accepts a request but its response is lost. A customer presses the payment button again. A notification arrives twice. Where the business requires one operation, a retry needs to continue that operation safely. Otherwise, a temporary connection problem can become a duplicate order or repeated action. Agree the expected behaviour at each significant boundary.

The Primax case connects payment, risk checks, an external supplier and delivery of a digital code. This kind of connected journey needs explicit treatment of partial completion: what happens when payment is confirmed but delivery has not finished, and who can see and resolve that state?

Prepare to investigate and recover

Once the product is live, the team needs to distinguish a slow request, a partner outage and a failure in its own rules. Operation identifiers, meaningful states and a proportionate technical event log help reconstruct the sequence. “Something went wrong” offers little to an operator. Unrestricted logging of customer document contents creates a separate problem and should not be the default investigation method.

Backups need a restoration exercise: what comes back, how much recent information could be missing and who performs the recovery? Releases need a comparable plan for data compatibility and correcting a failed deployment. These questions commonly deliver more immediate value than infrastructure designed for an imagined traffic peak with no evidence behind it.

Add complexity when a concrete constraint appears

A queue may be appropriate when report preparation holds a request open too long. A cache may address measured repeated reads. A separate service may be justified by a genuine need for independent releases or scaling. Each addition also creates states, failure modes and maintenance work that someone must own.

Record a few review conditions before development: data volume, response time, another user role or concurrent operations. They give the team a reason to revisit a decision without committing to unnecessary infrastructure now. Use the first-release guide to define a complete journey, or start an architecture discussion with the rules your product must preserve.

Establish reliable boundaries, data rules and recovery early; add infrastructure to address a specific, observed constraint.

  • Architecture
  • Development
  • Business

Have a project in mind?

Describe what needs to be built or improved. Turn the task into a clear solution and development plan.

  • I’ll reply within a day
  • Projects from RUB 99,000