Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
DDD encourages developers and domain experts to collaborate when creating the domain model.
Question 17 of 60 · Service boundaries · Easy
What does a service boundary define?
Not quite. Try another option.
Answer: The responsibilities owned by a service
A service boundary identifies the data, behavior, and responsibilities that belong to a service.
Question 18 of 60 · Service boundaries · Easy
Which quality indicates a well-defined service boundary?
Not quite. Try another option.
Answer: High cohesion and loose coupling
A good service boundary keeps related responsibilities together while minimizing dependencies on other services.
Question 19 of 60 · API gateway · Easy
What is the main role of an API gateway?
Not quite. Try another option.
Answer: To provide an entry point for client requests
An API gateway acts as a common entry point through which clients access backend services.
Question 20 of 60 · API gateway · Easy
Which task is commonly performed by an API gateway?
Not quite. Try another option.
Answer: Routing requests to suitable services
An API gateway examines incoming requests and routes them to the appropriate backend services.
Question 21 of 60 · Application ArchitecturesâMonolithic and Distributed · Medium
A team modifies the payment logic inside a tightly coupled monolithic application. What is the most likely deployment consequence?
Not quite. Try another option.
Answer: Deploy and retest the entire application
A monolith is typically packaged and deployed as one unit, so even a localized change often requires rebuilding and retesting the whole application.
Question 22 of 60 · Application ArchitecturesâMonolithic and Distributed · Medium
An order service calls an inventory service that is temporarily unavailable. Which approach best addresses this distributed-system failure?
Not quite. Try another option.
Answer: Use a circuit breaker with a fallback
A circuit breaker prevents repeated calls to a failing service, while a fallback can provide controlled degraded behavior.
Question 23 of 60 · Microservice Fundamentals · Medium
Two services must always be released together because they directly depend on each other's internal classes. Which microservice property is most clearly being violated?
Not quite. Try another option.
Answer: Independent deployability
Microservices should interact through stable contracts rather than internal implementation details, allowing each service to be deployed independently.
Question 24 of 60 · Microservice Fundamentals · Medium
Why is assigning each microservice ownership of its own data generally preferred?
Not quite. Try another option.
Answer: It reduces coupling through shared schemas
Service-owned data prevents other services from depending directly on internal schemas and supports independent evolution.
Question 25 of 60 · Microservices Architecture · Medium
A product page synchronously calls pricing, inventory, reviews, and recommendation services. One slow dependency frequently delays the whole page. Which improvement is most appropriate?
Not quite. Try another option.
Answer: Apply timeouts and circuit breakers
Timeouts bound waiting time, and circuit breakers prevent an unhealthy dependency from repeatedly delaying the entire request.
Question 26 of 60 · Microservices Architecture · Medium
An order service publishes an OrderCreated event, and the inventory service processes it asynchronously. Which consequence should the design handle?
Not quite. Try another option.
Answer: Temporary eventual consistency
Asynchronous event processing means different services may reflect the update at different times, producing temporary eventual consistency.
Question 27 of 60 · Domain-driven design (DDD) principles · Medium
In a retail platform, the term Product means an item for sale in Catalog but a stored unit in Inventory. How should DDD represent these meanings?
Not quite. Try another option.
Answer: Place them in separate bounded contexts
A bounded context allows the same term to have different models and meanings within distinct business domains.
Question 28 of 60 · Domain-driven design (DDD) principles · Medium
Developers and business experts use different names for the same shipping concepts, causing recurring misunderstandings. Which DDD practice best addresses this problem?
Not quite. Try another option.
Answer: Establish a ubiquitous language
A ubiquitous language gives domain experts and developers a shared, consistent vocabulary for models, requirements, and code.
Question 29 of 60 · Domain-driven design (DDD) principles · Medium
A purchase order must ensure that its total always equals the sum of its line items whenever it is updated. Which DDD concept should define this consistency boundary?
Not quite. Try another option.
Answer: Aggregate
An aggregate groups related domain objects and enforces invariants within a defined transactional consistency boundary.
Question 30 of 60 · Domain-driven design (DDD) principles · Medium
A new billing service must integrate with a legacy system whose data model uses incompatible terminology. Which DDD pattern best protects the new domain model?
Not quite. Try another option.
Answer: Anti-corruption layer
An anti-corruption layer translates between models so that legacy concepts do not leak into and distort the new domain model.
Question 31 of 60 · Service boundaries · Medium
Customer profile and loyalty rules change for different business reasons and are managed by different teams. What is the best boundary decision?
Not quite. Try another option.
Answer: Separate them into distinct services
Capabilities that change independently and have different ownership are strong candidates for separate service boundaries.
Question 32 of 60 · Service boundaries · Medium
Several services directly update the same database tables. What is the main architectural risk?
Not quite. Try another option.
Answer: Schema changes tightly couple services
Directly sharing tables makes services depend on the same schema, so database changes can require coordinated modifications and releases.
Question 33 of 60 · Service boundaries · Medium
A single CommerceService handles catalog, pricing, orders, payments, and shipping, and unrelated changes frequently conflict. Which criterion is most useful when splitting it?
Not quite. Try another option.
Answer: Business capabilities and change patterns
Service boundaries should align with cohesive business capabilities and areas that evolve independently.
Question 34 of 60 · Service boundaries · Medium
After decomposition, retrieving one customer page requires dozens of synchronous service calls for tiny pieces of data. What does this most likely indicate?
Not quite. Try another option.
Answer: The boundaries are too fine-grained
Excessive cross-service calls often indicate services were split too narrowly, creating chatty communication and operational overhead.
Question 35 of 60 · API gateway · Medium
Mobile clients currently call eight internal services and must know each service location. What is the primary benefit of introducing an API gateway?
Not quite. Try another option.
Answer: It provides one client-facing entry point
An API gateway hides internal service locations and exposes a unified endpoint for routing client requests.
Question 36 of 60 · API gateway · Medium
A team wants consistent authentication, request routing, and rate limiting for public APIs. Where should these cross-cutting concerns primarily be implemented?
Not quite. Try another option.
Answer: At the API gateway
An API gateway is well suited to centralized edge concerns such as authentication, routing, throttling, and request filtering.
Question 37 of 60 · API gateway · Medium
A gateway contains pricing rules, discount calculations, and order approval logic. What is the best architectural improvement?
Not quite. Try another option.
Answer: Move domain logic into owning services
The gateway should focus on edge responsibilities; business rules belong in the services that own the corresponding domains.
Question 38 of 60 · API gateway · Medium
Web and mobile clients require substantially different response shapes for the same platform capabilities. Which gateway-related approach is most suitable?
Not quite. Try another option.
Answer: Use a backend for each frontend
The backend-for-frontend pattern provides a client-specific gateway layer that adapts requests and responses to each interface.
Question 39 of 60 · Microservices Architecture · Medium
A payment, order, and inventory workflow spans separate services without a shared transaction manager. Which pattern is most appropriate for coordinating the workflow?
Not quite. Try another option.
Answer: Saga with compensating actions
A saga coordinates a sequence of local transactions and uses compensating actions to handle failures across service boundaries.
Question 40 of 60 · Microservices Architecture · Medium
A user request passes through a gateway and four services, but logs cannot be connected across components. Which addition would most improve diagnosis?
Not quite. Try another option.
Answer: Propagate a correlation identifier
A correlation identifier links logs and traces produced by different services while they process the same end-to-end request.
Question 41 of 60 · Application ArchitecturesâMonolithic and Distributed · Hard
A tightly coupled monolith has modules that share tables, internal classes, and transaction boundaries. The organization wants to migrate incrementally to microservices while minimizing distributed-system risk. What should be done first?
Not quite. Try another option.
Answer: Restructure the monolith around explicit business boundaries and controlled module interfaces
A modular monolith exposes coupling before network boundaries are introduced. Once ownership and interfaces are explicit, suitable modules can be extracted with less risk of creating a distributed monolith.
Question 42 of 60 · Application ArchitecturesâMonolithic and Distributed · Hard
A request succeeds only if four independently failing synchronous services are available. Each service has availability , and network failure is ignored. What is the approximate end-to-end availability?
Not quite. Try another option.
Answer:
All four services must be available, so availability is Synchronous dependency chains reduce aggregate availability.
Question 43 of 60 · Microservice Fundamentals · Hard
Two independently deployed services directly update different columns of the same database table. Schema changes require coordinated releases, although each service has a separate code repository. Which microservice property is most directly violated?
Not quite. Try another option.
Answer: Independent deployability through encapsulated data ownership
A shared table creates schema and release coupling. Separate repositories do not provide autonomy when services cannot evolve their persistence models independently.
Question 44 of 60 · Microservices Architecture · Hard
An Order service must save an order and publish an OrderCreated event. A crash between the database commit and broker publication currently causes lost events. Which design best closes this failure window without a distributed transaction?
Not quite. Try another option.
Answer: Store the event in an outbox within the order transaction and relay it asynchronously
The transactional outbox atomically records the state change and event intent in one local transaction. A relay can then publish the event with retry and deduplication.
Question 45 of 60 · Domain-driven design (DDD) principles · Hard
In Sales, Customer means a prospect or buyer with pricing terms. In Support, Customer means a party associated with cases and service-level agreements. Which DDD treatment is most appropriate?
Not quite. Try another option.
Answer: Use separate Customer models in distinct bounded contexts with an explicit translation
The term has different domain meanings, so each bounded context should own its model. Translation at the context boundary prevents one model from contaminating the other.
Question 46 of 60 · Domain-driven design (DDD) principles · Hard
A business rule states that the total allocation across all lines of a Budget must never exceed its approved amount at commit time. Which aggregate design most strongly preserves this invariant?
Not quite. Try another option.
Answer: Make Budget the aggregate root and update its allocation lines through that root
Strong consistency rules should normally be enforced within one aggregate transaction boundary. The Budget root can serialize changes and validate the total before committing.
Question 47 of 60 · Service boundaries · Hard
Inventory and Pricing are maintained by different teams and change for different business reasons. Checkout synchronously invokes both services many times while constructing one cart response, causing latency and release coordination. Which redesign best addresses the boundary problem without merging unrelated domains?
Not quite. Try another option.
Answer: Give Checkout read-oriented projections populated from Inventory and Pricing events
Local projections reduce chatty synchronous coupling while preserving domain ownership. Checkout accepts explicit read-model staleness rather than combining unrelated write responsibilities.
Question 48 of 60 · Service boundaries · Hard
A proposed service contains operations that always change together, share one strict invariant, and are owned by the same team. Splitting those operations would require a saga for nearly every command. What is the strongest architectural conclusion?
Not quite. Try another option.
Answer: They likely belong inside one service boundary
Frequent atomic coordination and a shared invariant indicate cohesive domain behavior. Splitting it would add distributed consistency costs without meaningful autonomy.
Question 49 of 60 · API gateway · Hard
A gateway authenticates users, applies quotas, routes requests, and also decides whether an order qualifies for a domain-specific refund. What is the best correction?
Not quite. Try another option.
Answer: Keep authentication and routing in the gateway, but move refund policy to the owning domain service
A gateway should handle edge concerns, not own domain policy. Refund eligibility belongs with the service that owns refund behavior and its business rules.
Question 50 of 60 · API gateway · Hard
A gateway times out after two seconds and retries POST /payments once. The first attempt may complete after the timeout, creating duplicate charges. Which control provides the strongest end-to-end protection?
Not quite. Try another option.
Answer: Attach an idempotency key and persist its result atomically in the Payment service
Only the Payment service can atomically bind the idempotency key to the business effect. Gateway-only deduplication cannot cover crashes, failover, or late completion reliably.
Question 51 of 60 · Microservices Architecture · Hard
A checkout saga reserves inventory, authorizes payment, and requests shipment. Shipment creation fails after payment authorization. Payment authorization can be voided, but the inventory reservation may already have expired. What should the saga do?
Not quite. Try another option.
Answer: Execute defined compensations while treating already-expired inventory release as idempotently satisfied
A saga uses semantic compensations rather than database rollback. Compensations must be idempotent and tolerate state that has already reached the intended compensating outcome.
Question 52 of 60 · Microservices Architecture · Hard
An event consumer updates its database and then crashes before acknowledging the message. The broker redelivers the event. Which assumption should the consumer design make?
Not quite. Try another option.
Answer: Duplicate delivery is possible, so processing must be idempotent or deduplicated
A crash after commit but before acknowledgement creates redelivery under at-least-once delivery. Consumers need idempotent updates or durable tracking of processed event identifiers.
Question 53 of 60 · Domain-driven design (DDD) principles · Hard
A legacy billing model is inconsistent with a new Subscription bounded context. Reusing legacy billing objects directly would force legacy terminology and rules into the new model. Which DDD pattern best isolates the new context?
Not quite. Try another option.
Answer: Anti-corruption layer
An anti-corruption layer translates between models and prevents legacy semantics from leaking into the new bounded context.
Question 54 of 60 · Domain-driven design (DDD) principles · Hard
A downstream context has no influence over an upstream vendor model and chooses to adopt that model exactly rather than maintain translation logic. Which DDD context-map relationship does this describe?
Not quite. Try another option.
Answer: Conformist
A conformist downstream accepts the upstream model as-is, typically because it lacks influence or considers translation more costly than semantic independence.
Question 55 of 60 · Service boundaries · Hard
A team proposes one microservice per database entity: Customer, Address, PhoneNumber, and EmailPreference. Most use cases require coordinated calls to all four, and they are released by one team. Which signal most strongly indicates poor boundaries?
Not quite. Try another option.
Answer: Most business changes require coordinated modifications across all four services
Boundaries should align with business capabilities and independent change. Persistent coordinated changes indicate the services were split by technical entities rather than cohesive domain behavior.
Question 56 of 60 · Service boundaries · Hard
Service A needs a small subset of Service B's data to validate commands even when B is temporarily unavailable. Slightly stale validation data is acceptable, but A must not write B's records. Which design best preserves ownership and resilience?
Not quite. Try another option.
Answer: Replicate the required data into A through published integration events
An event-fed local projection preserves B's ownership while allowing A to validate without temporal coupling. The accepted trade-off is explicitly bounded staleness.
Question 57 of 60 · API gateway · Hard
A single gateway instance handles all external traffic and stores rate-limit counters and sessions only in local memory. Which change most directly removes both the availability bottleneck and state-related scaling constraint?
Not quite. Try another option.
Answer: Deploy multiple stateless gateway instances and externalize shared state to resilient stores
Horizontal gateway redundancy removes the single-instance failure point. Externalized or distributed state allows any gateway instance to process a request consistently.
Question 58 of 60 · API gateway · Hard
After validating a user token, a gateway forwards an unsigned X-User-Role header to internal services. Some services are also reachable through an internal network path that bypasses the gateway. What is the primary security flaw?
Not quite. Try another option.
Answer: Backend services trust identity claims that callers can forge when bypassing the gateway
A plain header is not a trustworthy identity assertion when alternate callers can reach the services. Claims need cryptographic or mutually authenticated provenance, and services must enforce authorization.
Question 59 of 60 · Application ArchitecturesâMonolithic and Distributed · Hard
During a strangler migration, /accounts requests are routed to a new service, but both the monolith and the service can update account balances. Reconciliation repeatedly finds divergent balances. What is the most important corrective action?
Not quite. Try another option.
Answer: Establish one authoritative writer and route all balance-changing commands through it
A strangler migration needs explicit data ownership. Dual writes by independent authorities create conflicts that timestamps or more frequent reconciliation cannot reliably resolve.
Question 60 of 60 · Microservice Fundamentals · Hard
A distributed request crosses six services using asynchronous messaging and background workers. Logs contain timestamps but cannot reliably connect work performed after queue delivery to the original request. Which observability mechanism best addresses this?
Not quite. Try another option.
Answer: Propagate trace context through HTTP headers and message metadata across every processing hop
Distributed tracing requires context propagation across both synchronous and asynchronous boundaries. Timestamps alone cannot establish causal relationships among concurrent requests.
That's unit 2
Answer a few questions and your score shows up here.
Nearly through. Did unit 2 of INT363 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 2 of INT363 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.