📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

How do you avoid over-engineering at the architecture level? What are the warning signs in a .NET system, how do you separate reversible from irreversible decisions, and how do you push back on "we need to build it like Netflix" without blocking real future needs?

Architecture-level over-engineering: warning signs, one-way vs two-way door decisions, last responsible moment, keeping options open, and how to argue against premature scale.

Senior Architecture Advanced adr architecture architecture-decisions modular-monolith over-engineering yagni

🎯 Key points

  • Over-engineering = paying now for scale, flexibility or generality that has no evidence behind it
  • Warning signs (signals to investigate, not proof): many more deployables than teams, Kubernetes and a service mesh for ~50 req/s where App Service or Container Apps would do, a broker between in-process modules, generic frameworks with one user
  • Weigh team size, experience and on-call capacity: the same design can be right for 8 platform-savvy teams and wrong for 1 team of 5
  • One-way doors (data split, event sourcing, cloud/region) deserve analysis; two-way doors get the simplest choice
  • Agree architectural principles and boundaries first, then decide at the last responsible moment and keep options open with module seams
  • Push back with data: load numbers, team capacity, cost per month, DORA metrics, not opinions
  • Write ADRs with explicit triggers for revisiting so future needs aren't ignored

⏱ 30-second answer

At the architecture level, over-engineering means paying now, in hosting, cognitive load and delivery speed, for scale or flexibility nobody has evidence for. The warning signs are concrete signals to investigate: far more deployables than teams, Kubernetes and a service mesh for 50 requests a second when App Service or Container Apps would do, a message broker between modules in one process, a generic plug-in framework with a single plug-in. I judge them against the team's size, experience and on-call capacity, because the same design can suit eight platform teams and sink one team of five.

I separate one-way doors (splitting data, event sourcing, choosing a region) from two-way doors (a library, a folder layout). One-way doors get analysis and an ADR; two-way doors get the simplest option. I keep options open with module boundaries rather than network boundaries.

The trade-off: under-building something genuinely irreversible is costly too, so I write down the trigger that would justify the bigger design.

🗣 Full answer (senior)

How I would answer this in an interview

"For me, over-engineering at the architecture level is when the design solves problems we don't have and can't show we'll have. The cost isn't just code: it's hosting, it's the time every developer spends understanding the moving parts, and it's slower delivery for years. The warning signs I look for are structural. More deployable services than teams. A Kubernetes cluster, a service mesh and a message broker for an app that peaks at fifty requests a second. Events going through Azure Service Bus between two modules that run in the same process. A 'generic workflow engine' built in-house when there is one workflow.

For example, at [company] I joined a team of [five] who had [nine] services, each with its own repo, pipeline and Azure SQL database, for a [B2B portal] with about [200] daily users. A single feature usually touched four services and four pull requests. I didn't argue from opinion. I collected the numbers: average lead time of [9] days, [40%] of incidents caused by contract mismatches between services, and hosting of [$6k] a month. I wrote an ADR proposing to fold them into a modular monolith with the same module boundaries, did a two-week spike merging two services to prove it, and we consolidated over [three] months. Lead time dropped to [2] days and hosting to about [$1.5k].

The mistake I see is treating every decision as if it were irreversible, or the opposite, making a one-way decision like splitting the database casually. I classify decisions: two-way doors get the simplest option, one-way doors get analysis and a written trigger for when we'd revisit. My senior line is: design for the change you can see coming, and leave seams for the change you can't, but don't build the change itself."


Warning signs at the architecture level

Sign Why it's a smell Simpler alternative
More deployables than teams Coordination cost without autonomy benefit One deployable per team, modules inside
Kubernetes + service mesh for low traffic Large operational surface App Service / Container Apps
Message broker between in-process modules Adds eventual consistency for nothing In-process calls through a module's public API
Event sourcing everywhere Hard versioning, projections, tooling State-based persistence, audit table where needed
Separate read database "for scale" at low load Synchronisation and staleness Indexed views, projections in the same DB
In-house framework with one consumer Maintenance with no reuse Plain code; extract after the third use
Multi-region active-active for a 99.5% SLO Doubles cost and complexity Zone redundancy in Australia East, backups to Southeast

One-way vs two-way doors

Decision Door Approach
Logging library, folder layout, mapping approach Two-way Pick simplest, change later
Monolith vs modular monolith Mostly two-way if boundaries are clean Start modular
Database per service, event sourcing, cloud provider, region One-way Spike, ADR, explicit triggers
Public API contract One-way once clients exist Version from day one

Production example

Consolidating [nine] services into a modular monolith for a [200]-user B2B portal cut lead time from [9] to [2] days, reduced contract-related incidents by about [80%], and saved roughly [$4.5k] a month in hosting, with module boundaries enforced by architecture tests so the option to split again stayed open.

🔍 What the interviewer is checking

Checks whether the candidate can recognise accidental architectural complexity, reason about reversibility, and influence decisions with evidence rather than opinion.

Green flags

  • Gives concrete structural warning signs with numbers
  • Separates one-way and two-way doors
  • Keeps logical boundaries while reducing physical ones
  • Uses ADRs with triggers and data such as DORA metrics and cost

Red flags

  • Treats "simple" as "no structure" and removes useful seams
  • Dismisses all future needs or, conversely, designs for imagined scale
  • Can only argue from taste

📚 Learn in depth

1. Essential vs accidental complexity

Fred Brooks separated essential complexity (inherent in the problem: insurance rules, tax calculations) from accidental complexity (introduced by our solution: network hops, serialisation, deployment pipelines). Architecture-level over-engineering is accidental complexity added ahead of need.

Total complexity = essential (domain) + accidental (our choices)
                                      ▲
                    over-engineering inflates this part

2. Why it happens

  • Résumé-driven design: people want experience with the shiny tool.
  • Fear of rework: "we'll never get time to change it later".
  • Copying big tech: Netflix and Amazon solved problems of thousands of engineers and millions of requests a second.
  • Unclear requirements: generality as a hedge against not knowing.

The Phase 7 question on detecting over-engineering covers code-level signs; here the focus is deployment, data and integration choices, which are much more expensive to undo.

3. The last responsible moment

Lean software development suggests deferring a decision until the point where not deciding would remove an important option. Before that, keep options open:

Today                                   Trigger reached (evidence)
┌────────────────────────────┐          ┌──────────────────────────┐
│ Modular monolith           │          │ Extract Payments service │
│  Payments module           │  ─────►  │  own DB, own pipeline    │
│   - public contract only   │          │  same contract over HTTP │
│   - own schema (payments.) │          │  or messages             │
└────────────────────────────┘          └──────────────────────────┘

Because the module owns its schema and exposes a contract, extracting it later is mostly mechanical. That's the cheap insurance; building the service up front is the expensive one.

4. Cost of a network boundary

Each extra service adds, roughly:

  • 1-5 ms latency per in-region call, plus serialisation
  • partial failure handling (timeouts, retries, circuit breakers)
  • a pipeline, environments, monitoring, alerts, secrets and on-call
  • contract versioning and consumer coordination
  • distributed data consistency (sagas, outbox)

Multiply by the number of services and you get the "distributed systems tax".

5. Pushing back with data

Opinions lose to data. Useful evidence:

Evidence Source
Real and forecast load Application Insights, Azure Monitor, business forecasts
Team size and on-call capacity Org chart, rosters
Delivery speed DORA metrics from Azure DevOps or GitHub
Incident causes Post-incident reviews
Cost Azure Cost Management per resource group

Present options as a decision table and propose a trigger: "we'll extract Search when it exceeds 1,000 req/s or needs a separate release cadence". That addresses the fear that the simpler design ignores the future.

6. When the bigger design is justified

Not all upfront design is over-engineering. Regulatory audit requirements may justify an append-only event log from day one. A public API needs versioning before the first client. Multi-tenancy isolation can be hard to retrofit. The test is evidence and reversibility, not size.

Try it yourself

  1. List every deployable, database and broker in a system you know; count teams. Compare the two numbers.
  2. Classify the last ten architecture decisions as one-way or two-way doors.
  3. Pull your DORA metrics for the last quarter and look for correlation with the number of services touched per change.
  4. Write an ADR that keeps the simpler option but defines the measurable trigger for the bigger one.
  5. Use Azure Cost Management to find the monthly cost per service and per request.

💻 Code

Keeping the option to split cheap: a module that exposes only a contract and owns its schema, so an in-process call can later become an HTTP or message call without touching callers.

// Modules/Payments/Payments.Contracts/IPaymentsModule.cs
namespace Payments.Contracts;

public sealed record TakePayment(Guid OrderId, decimal Amount, string Currency);
public sealed record PaymentResult(Guid PaymentId, bool Succeeded, string? FailureReason);

// The only thing other modules may reference.
public interface IPaymentsModule
{
    Task<PaymentResult> TakePaymentAsync(TakePayment command, CancellationToken ct);
}
// Modules/Payments/Payments.Infrastructure/PaymentsDbContext.cs
namespace Payments.Infrastructure;

using Microsoft.EntityFrameworkCore;

internal sealed class PaymentsDbContext(DbContextOptions<PaymentsDbContext> options) : DbContext(options)
{
    internal DbSet<Payment> Payments => Set<Payment>();

    protected override void OnModelCreating(ModelBuilder b)
    {
        // Own schema in the shared database: extracting to its own DB later is a data move, not a redesign.
        b.HasDefaultSchema("payments");
        b.Entity<Payment>().HasKey(p => p.Id);
    }
}

internal sealed class Payment
{
    public Guid Id { get; init; }
    public Guid OrderId { get; init; }
    public decimal Amount { get; init; }
}
// Today: in-process. Later: swap for an HttpClient-based implementation with the same interface.
builder.Services.AddScoped<IPaymentsModule, PaymentsModule>();
// builder.Services.AddHttpClient<IPaymentsModule, PaymentsHttpClient>(c => c.BaseAddress = new("https://payments.internal"));

⚠ Common mistakes

  • Mistake: Building for Netflix-scale traffic you don't have. Why it is wrong: You pay the distributed systems tax every day for a benefit that may never come. Instead: Size for measured load plus a realistic margin, with a written trigger for scaling out.
  • Mistake: Treating every decision as irreversible. Why it is wrong: It leads to analysis paralysis and gold-plating trivial choices. Instead: Classify one-way vs two-way doors and spend effort only on the former.
  • Mistake: Treating a one-way decision as cheap, e.g. splitting the database early. Why it is wrong: Joining data back or adding sagas later is very costly. Instead: Spike it, write an ADR, and prefer schemas per module first.
  • Mistake: Arguing against complexity with opinion alone. Why it is wrong: It turns into a debate of taste and the louder voice wins. Instead: Bring load data, DORA metrics, incident causes and cost.
  • Mistake: Simplifying by ignoring real constraints such as audit or data residency. Why it is wrong: Those are requirements, not over-engineering, and retrofitting them is expensive. Instead: Separate evidence-backed needs from speculative ones.
  • Mistake: Introducing a message broker between modules in one process. Why it is wrong: You add eventual consistency, retries and poison messages with no isolation gain. Instead: Call the module's public API in-process; add a broker when you cross a process boundary.
  • Mistake: Removing seams while simplifying. Why it is wrong: You lose the cheap option to split later. Instead: Keep module contracts and schemas even inside one deployable.

🏛 Senior insight: trade-offs

Over-engineering and under-engineering are both failures to match design to evidence. My rule of thumb: keep logical boundaries strong (modules, contracts, owned schemas) and physical boundaries few (deployables, databases, brokers) until a measured driver says otherwise. That gives most of the modifiability of microservices at a fraction of the operating cost.

When someone pushes for the bigger design, I don't say no; I ask what evidence would make it right, and write that trigger into the ADR. That turns a disagreement into a shared plan, and if the trigger fires, nobody has to relitigate.

Choice When it fits Cost When not to
Defer with seams (modules, contracts) Uncertain future scale or team growth Low Constraint is already known and irreversible
Build the bigger design now Regulatory need, public contract, proven load High up front Speculative growth, small team
Simplify an existing over-built system Delivery slow, incidents from integration Migration effort System genuinely needs independent scale or cadence

🔗 Follow-ups the interviewer may ask

  1. When: Candidate talks about reversing an over-built system Why: Checks code-level techniques for detecting and unwinding over-engineering
    How to answer

    Over-engineering is complexity that today's requirements do not justify. I detect it through symptoms with numbers behind them: a one-field change touching many files, interfaces with one implementation, configuration options nobody sets, patterns like CQRS or event sourcing without the problems they solve, and microservices that always deploy together. I reverse it incrementally rather than with a rewrite: inline single-use abstractions, merge layers that only pass data through, consolidate services that share a release cycle, and delete unused options, each step behind tests. I also address why it happened, because otherwise it grows back.

  2. When: Candidate proposes a modular monolith as the simpler option Why: Checks they know how to keep module boundaries strong inside one deployable
    How to answer

    A modular monolith is one deployable split into modules aligned to business capabilities — Orders, Billing, Catalogue — each with hard boundaries.

    • Each module owns its data: its own schema and DbContext, no cross-module joins or foreign keys.
    • Modules talk only through a public contract (an interface and DTOs) or integration events; everything else is internal.
    • Boundaries are enforced: separate projects, internal types, architecture tests, even per-schema database permissions.

    You get microservice-style boundaries with monolith-style operations: one pipeline, in-process calls, easy refactoring. The trade-off: one runtime, one release and one scaling unit, and it only works if the boundaries are enforced — otherwise it decays into a big ball of mud.

  3. When: Candidate mentions accidental complexity or the distributed systems tax Why: Checks they can locate where simplification is possible without losing business rules
    How to answer

    Essential complexity comes from the domain itself: business rules, edge cases and regulations that any correct solution would have to model. Accidental complexity comes from our solution choices: network hops, mapping layers, generic frameworks, duplicated pipelines.

    To tell them apart I look for:

    • Code that changes when infrastructure changes but not when the business changes — that churn isn't rooted in any rule, so it is accidental and a candidate for simplification.
    • How many components a typical feature touches (from git history: files and repos per PR). Five projects for one new field is a structural smell.
    • Incident causes. If most incidents are contract mismatches, timeouts or serialisation bugs between services rather than wrong business rules, the complexity is mostly accidental.

    The architectural goal is to model essential complexity explicitly (rich domain, clear boundaries) and remove accidental complexity, because the accidental kind is what drives maintenance cost and slows scaling the team.

🛠 Real-world problems: how you handle them

Nine services for a 200-user portal folded into a modular monolith
Situation
A [B2B ordering portal] with about [200] daily users was built as [nine] microservices, each with its own repo, pipeline and Azure SQL database, maintained by one team of [five] developers.
Signals
Average lead time of [9] days, most features needing PRs in [3-4] repos, [40%] of incidents from contract mismatches, hosting of about [$6k] a month, and developers reporting they couldn't run the system locally.
Investigation
I mapped services and calls with the Application Insights application map, pulled DORA metrics from Azure DevOps, categorised six months of incident reviews, and used Azure Cost Management to get per-service cost. I checked which services had independent scaling or release needs; none did.
Resolution
I wrote an ADR proposing a modular monolith with the same module boundaries and a schema per module in one Azure SQL database. A two-week spike merged the two most chatty services. We then consolidated the rest over [three] months behind a stable external API.
Prevention
ArchUnitNET tests forbid cross-module references except through contracts; a CODEOWNERS file per module; the ADR defines triggers (separate team, more than [1,000] req/s on one module) for extracting a service again.

How to tell it (STAR)

**S:** At [company] I joined a team of [five] running [nine] microservices for a portal with about [200] daily users. **T:** Delivery was slow and incidents were frequent, and I was asked to find out why. **A:** I gathered data rather than opinions: DORA metrics, incident causes and per-service cost. I showed that [40%] of incidents came from contract mismatches and that no service needed independent scaling. I wrote an ADR for a modular monolith, ran a two-week spike merging two services, and led the consolidation while keeping module boundaries enforced by architecture tests. **R:** Lead time fell from [9] to [2] days, contract incidents dropped about [80%], and hosting fell to roughly [$1.5k] a month.

↩ Usually asked after

More in Senior-Level Architecture

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me