Architecture & Documentation
Architecture awareness for an analyst — monolith vs microservices, HLD, documentation artifacts and diagrams a system needs, access-control models, and caching.
20 questions
JuniorTheoryVery commonHow do identification, authentication, and authorization differ?
How do identification, authentication, and authorization differ?
Identification is claiming who you are (a login or user id). Authentication is proving that claim (password, token, biometrics). Authorization is deciding what the authenticated identity may do. The order is fixed — identify, authenticate, then authorize each action against permissions.
Common mistakes
- ✗Swapping authentication (proving identity) and authorization (permissions)
- ✗Treating identification and authentication as the same step
- ✗Forgetting authorization is per-action against permissions
Follow-up questions
- →How does a token differ from a session in authentication?
- →What is the principle of least privilege in authorization?
JuniorTheoryVery commonWhat is client-server architecture, and what are the tiers of a three-tier application?
What is client-server architecture, and what are the tiers of a three-tier application?
Client-server splits software into a client that requests a service and a server that fulfils it over a network. A three-tier app separates a presentation tier (UI), an application-logic tier, and a data tier, each independently scalable.
Common mistakes
- ✗Swapping the client (requester) and server (provider) roles
- ✗Merging application logic into the presentation or data tier
- ✗Thinking the three tiers must deploy and scale together
Follow-up questions
- →Why does separating the tiers make independent scaling possible?
- →Where do business rules belong in a three-tier application?
JuniorTheoryVery commonWhat is a layered architecture, and what does each layer own?
What is a layered architecture, and what does each layer own?
A layered architecture stacks code into horizontal layers, each with one job: presentation, business logic, data access, and the database. A layer calls only the layer below it, so dependencies point one way and each layer stays testable alone.
Common mistakes
- ✗Letting the UI reach the database, skipping the middle layers
- ✗Inverting which layer owns rules versus data
- ✗Allowing dependencies to point in both directions
Follow-up questions
- →Why should a layer depend only on the layer directly below it?
- →What problem appears when the UI bypasses the business-logic layer?
JuniorTheoryVery commonWhat are monolithic and microservice architecture, and how do they differ?
What are monolithic and microservice architecture, and how do they differ?
A monolith is one deployable application where all modules share a process and usually one database — simple to build and deploy, but hard to scale or change in parts. Microservices split the system into independently deployable services, each owning its data and communicating over the network — flexible, at the cost of distributed-system complexity.
Common mistakes
- ✗Swapping the definitions of monolith and microservices
- ✗Claiming microservices are always simpler to operate
- ✗Forgetting microservices add distributed-system complexity
Follow-up questions
- →What is the downside of a shared database in a monolith as the team grows?
- →Why do microservices need to care about data consistency?
JuniorTheoryCommonWhich architecture views and documents does an analyst hand to a developer, and what belongs in each?
Which architecture views and documents does an analyst hand to a developer, and what belongs in each?
The analyst hands over the views that pin down what to build: a component diagram (the parts), sequence diagrams (how a scenario flows), the data model (entities and relationships), and the API contracts. Each answers a different question.
Common mistakes
- ✗Handing over only code and expecting the design to be inferred
- ✗Swapping which view shows structure, behaviour, data, or interfaces
- ✗Omitting integration and API contracts from the handover
Follow-up questions
- →Which view tells a developer the scope and boundaries of a service?
- →Why is an explicit API contract better than describing it in prose?
MiddleTheoryCommonWhat access-control models do you know, and what is the principle of least privilege?
What access-control models do you know, and what is the principle of least privilege?
RBAC (role-based) grants permissions through roles a user is assigned. ABAC (attribute-based) decides access from attributes of the user, resource, and context — finer-grained but more complex. Least privilege grants only the minimal permissions needed, shrinking the blast radius.
Common mistakes
- ✗Swapping the definitions of RBAC and ABAC
- ✗Misreading least privilege as granting broad or admin rights
- ✗Assuming ABAC is always better, ignoring that it is more complex than RBAC
Follow-up questions
- →When is ABAC justified instead of RBAC?
- →How does the principle of least privilege reduce the damage of a breach?
MiddleTheoryCommonWhat is an API Gateway, what does it do beyond a load balancer, and what is a BFF?
What is an API Gateway, what does it do beyond a load balancer, and what is a BFF?
An API Gateway is one entry point that routes requests and adds cross-cutting concerns: auth, rate limiting, aggregation, versioning. A load balancer only spreads traffic at the network level. A BFF (backend-for-frontend) targets one client type.
Common mistakes
- ✗Equating an API Gateway with a plain load balancer
- ✗Missing cross-cutting concerns like auth and rate limiting
- ✗Thinking a BFF serves all client types identically
Follow-up questions
- →Why can a single API Gateway become a bottleneck or single point of failure?
- →When is a separate BFF per client better than one shared gateway?
MiddleDesignCommonA system has slow API responses on repeated identical requests. Where and how would you propose caching, and how would you plan invalidation so as not to serve stale data?
A system has slow API responses on repeated identical requests. Where and how would you propose caching, and how would you plan invalidation so as not to serve stale data?
Cache where reads repeat and data changes slowly: a backend API cache (proxy or in-memory), and a client-side cache for per-user data. Invalidate with a TTL and/or event-based invalidation, where a write refreshes affected keys. Account for a cold versus warm cache. The trade-off is latency against staleness.
Common mistakes
- ✗Caching without any invalidation, serving stale data
- ✗Confusing a cold cache (slow first hit) with a warm one
- ✗Ignoring the latency-vs-staleness trade-off when picking TTL vs event-based
Follow-up questions
- →When is event-based invalidation better than TTL?
- →What is the risk of a client-side cache for shared data?
MiddleTheoryCommonWhat are the pros and cons of a monolith and microservices, and when should you choose each approach?
What are the pros and cons of a monolith and microservices, and when should you choose each approach?
A monolith is simpler to build, deploy, and test — in-process calls, one transaction boundary — but it scales as a whole and grows brittle. Microservices give independent deployment, per-service scaling, and team autonomy, at the cost of network latency, distributed transactions, and heavier ops. Choose a monolith early; switch when scale, team size, or releases demand it.
Common mistakes
- ✗Treating microservices as strictly better with no trade-offs
- ✗Attributing distributed-transaction pain to the monolith
- ✗Ignoring team size and release independence in the decision
Follow-up questions
- →Why are distributed transactions hard in microservices?
- →What preconditions justify moving from a monolith to microservices?
MiddleTheoryCommonBy which criteria do you split a system into microservices, and what makes a boundary wrong?
By which criteria do you split a system into microservices, and what makes a boundary wrong?
Split by business capability or bounded context, so each service owns one cohesive area and its data. A boundary is wrong when a use case needs a chatty chain of services, two services share one transactional write, or they always deploy together.
Common mistakes
- ✗Splitting by technical layer instead of business capability
- ✗Treating cross-service calls and shared data as free
- ✗Ignoring lockstep deployment as a wrong-boundary signal
Follow-up questions
- →Why is a bounded context a better seam than a technical layer?
- →What does a shared write across two services tell you about the split?
MiddleTheoryCommonWhat does 'independence' of a microservice actually mean — across code, data, deploy, and release?
What does 'independence' of a microservice actually mean — across code, data, deploy, and release?
Independence means a service can change and ship on its own across four axes. Code: its own repo, no shared build. Data: its own database, via its API only. Deploy: ships without redeploying others. Release: features go live behind a versioned API.
Common mistakes
- ✗Reducing independence to just a separate codebase
- ✗Allowing another service to read its database directly
- ✗Forgetting release independence needs a versioned API
Follow-up questions
- →Why does a shared database break service independence?
- →How does a versioned API protect release independence?
SeniorDesignCommonYou are asked to prepare a High Level Design for a new subsystem. Explain what an HLD is, why and for whom it is needed, what it should include, and how thoroughly it is worked out.
You are asked to prepare a High Level Design for a new subsystem. Explain what an HLD is, why and for whom it is needed, what it should include, and how thoroughly it is worked out.
An HLD (high-level design) is an architecture-level description of how a system will be built, for architects, leads, and stakeholders to align on the solution before detailed design. It contains the major components, integrations and data flows, the architecture style, key non-functional decisions, and external dependencies. It stays intentionally shallow; the low-level design adds implementation detail.
Common mistakes
- ✗Making the HLD too detailed (implementation-level) rather than architectural
- ✗Omitting non-functional decisions (scaling, availability, security)
- ✗Confusing the HLD's audience and depth with the low-level design
Follow-up questions
- →How does an HLD differ from a low-level design in depth?
- →Which non-functional decisions must be reflected in an HLD?
SeniorDesignCommonA team runs a working e-commerce monolith on steady traffic with a small ops team, and leadership wants to split it into 15 microservices to modernise and enable independent releases. Argue both the case for and against the split, name the concrete risks the team takes on, and propose a pragmatic first cut — which one or two services you would extract first and why, and what must be in place around data ownership, deployment, and observability before extracting more.
A team runs a working e-commerce monolith on steady traffic with a small ops team, and leadership wants to split it into 15 microservices to modernise and enable independent releases. Argue both the case for and against the split, name the concrete risks the team takes on, and propose a pragmatic first cut — which one or two services you would extract first and why, and what must be in place around data ownership, deployment, and observability before extracting more.
For: independent deploys, per-service scaling, and team autonomy when the monolith blocks releases. Against: 15 services add network calls, distributed transactions, and ops load for a small team. Strangler: extract one or two loose services first.
Common mistakes
- ✗Recommending a big-bang split of all 15 at once
- ✗Ignoring the ops burden a small team takes on
- ✗Extracting the tightly-coupled core before loose edges
Follow-up questions
- →Why extract a loosely-coupled service before the core?
- →What must a service own before it can deploy independently?
JuniorTheoryOccasionalWhich artifacts must a system's documentation necessarily contain?
Which artifacts must a system's documentation necessarily contain?
Core documentation artifacts are: a business-process description; user scenarios; brief statements of business tasks; the database structure; data-flow, integration, and service-interaction diagrams; external integrations; own API descriptions with versioning; authentication/authorization/identification; and role/permission matrices.
Common mistakes
- ✗Naming only the API and omitting business process or role matrices
- ✗Forgetting external-integration descriptions
- ✗Skipping API versioning in the documentation
Follow-up questions
- →Why does an API description need versioning?
- →What does a role/permission matrix show?
JuniorTheoryOccasionalWhich architecture styles do you know, and how does each organise a system?
Which architecture styles do you know, and how does each organise a system?
Common styles are the monolith (one deployable unit), microservices (small independent services), SOA (coarse services on a shared bus), event-driven (react to events), and serverless (on-demand functions). Each trades simplicity for scalability.
Common mistakes
- ✗Confusing SOA with microservices, ignoring the shared bus
- ✗Calling event-driven or serverless a single best style
- ✗Missing that each style trades simplicity for scalability
Follow-up questions
- →How does an SOA integration bus differ from direct service-to-service calls?
- →When is serverless a poor fit despite its on-demand scaling?
MiddleTheoryOccasionalWhat is CQRS, when is the split worth it, and what does the read model cost you?
What is CQRS, when is the split worth it, and what does the read model cost you?
CQRS (Command Query Responsibility Segregation) splits the write side (commands) from the read side (queries). It pays off when reads and writes differ in load or shape. Its cost is a read model synced asynchronously, bringing eventual consistency.
Common mistakes
- ✗Reversing CQRS into merging reads and writes
- ✗Applying it everywhere regardless of read/write asymmetry
- ✗Ignoring the eventual consistency the read model introduces
Follow-up questions
- →Why does an asynchronous read model bring eventual consistency?
- →When does CQRS pair naturally with Event Sourcing?
MiddleTheoryOccasionalWhat is Event Sourcing, what does it store, and what does it make hard?
What is Event Sourcing, what does it store, and what does it make hard?
Event Sourcing stores state as an append-only log of change events, not the latest snapshot. State is rebuilt by replaying events, giving a full audit trail. What it makes hard: querying, schema evolution, and corrections via compensating events.
Common mistakes
- ✗Thinking it stores only the latest snapshot, not the events
- ✗Assuming ad-hoc querying stays easy without projections
- ✗Fixing errors by editing history instead of appending a compensating event
Follow-up questions
- →Why does Event Sourcing usually need separate read projections?
- →How do you correct a mistake without editing the event log?
MiddleTheoryOccasionalHow does SOA (service-oriented architecture) differ from microservices — is the ESB (enterprise service bus) the only difference?
How does SOA (service-oriented architecture) differ from microservices — is the ESB (enterprise service bus) the only difference?
No, the ESB (enterprise service bus) is not the only difference. SOA uses coarse services on a central bus. Microservices are fine-grained, each owning its data and talking point-to-point, so they differ in granularity and data ownership.
Common mistakes
- ✗Reducing the whole difference to just the ESB
- ✗Ignoring data ownership and service granularity
- ✗Forgetting SOA centralises integration logic on the bus
Follow-up questions
- →Why is a central bus a coupling and scaling risk in SOA?
- →How does per-service data ownership change consistency handling?
SeniorDesignOccasionalDesign the high-level architecture of a subsystem that must accept 5000 payment requests per second and never lose a single one, even if a downstream service is briefly down. State your key components, how you guarantee durability and no double-charge, and where the main bottlenecks and failure points are.
Design the high-level architecture of a subsystem that must accept 5000 payment requests per second and never lose a single one, even if a downstream service is briefly down. State your key components, how you guarantee durability and no double-charge, and where the main bottlenecks and failure points are.
Behind a load balancer, persist each request to a durable queue before acknowledging, then process async so an outage never loses work. Prevent double-charges with a per-payment idempotency key. Replicate the datastore and queue, the bottlenecks.
Common mistakes
- ✗Processing synchronously, so a downstream outage loses requests
- ✗Omitting an idempotency key, allowing double-charges on retry
- ✗Missing the datastore and queue as bottlenecks and single points of failure
Follow-up questions
- →How does an idempotency key prevent a double-charge on a client retry?
- →Why persist to a durable queue before acknowledging the request?
JuniorTheoryRareWhat is an AIS (automated information system), and how is it decomposed into subsystems in ГОСТ 34 terms?
What is an AIS (automated information system), and how is it decomposed into subsystems in ГОСТ 34 terms?
An AIS (automated information system) collects, stores, processes, and delivers an organisation's information. In ГОСТ 34 terms it splits into functional subsystems, by business function, and supporting subsystems: hardware, software, and data.
Common mistakes
- ✗Treating an AIS as an indivisible whole with no subsystems
- ✗Confusing functional with supporting subsystems
- ✗Forgetting hardware and data are subsystems under the standard
Follow-up questions
- →What belongs in a supporting subsystem versus a functional one?
- →Why are functional subsystems grouped by business function?