.NET Architecture & System Design Interview

Microservices, API Gateway, Service Communication & Event-Driven Architecture

Questions 101-125: Microservices, API Gateway, Service Communication & Event-Driven Architecture.

25 Questions Filter by level

Interview questions

Open a question for the full answer, code and interview guidance.

25 Results
101
Mid-LevelIntermediate

What is a monolithic architecture?

A monolithic architecture deploys the application's major capabilities as one application unit. Modules may be logically separated in code, but they are normally built and deployed together and often run in the same process.

102
Mid-LevelIntermediate

What is a modular monolith?

A modular monolith is a single deployable application divided into well-defined business modules with controlled dependencies and explicit contracts.

103
Mid-LevelIntermediate

What is microservices architecture?

Microservices architecture divides a system into independently deployable services aligned with business capabilities. Each service owns its behavior and typically controls its own data boundary.

104
Mid-LevelIntermediate

What are the main differences between a monolith and microservices?

A monolith has fewer deployment and network boundaries, which usually makes development and operations simpler. Microservices provide stronger deployment independence and can scale business capabilities separately.

105
Mid-LevelIntermediate

When should you consider moving from a monolith to microservices?

Consider microservices when specific parts of a system need independent scaling, release cadence, fault isolation, technology choices, or team ownership and the monolith's current boundaries prevent those goals.

106
Mid-LevelIntermediate

What is service decomposition?

Service decomposition is the process of deciding how a larger system should be divided into independently owned capabilities or services.

107
Mid-LevelIntermediate

What is a bounded context and why is it useful for service boundaries?

A bounded context is a Domain-Driven Design boundary within which a domain model and its terminology have a specific meaning. The same real-world concept may be modeled differently in another context.

108
Mid-LevelIntermediate

Why should a microservice own its data?

Independent data ownership prevents services from becoming tightly coupled through a shared database schema. A service can change its internal schema without requiring every other service to coordinate.

109
Mid-LevelIntermediate

Why is a shared database between microservices often problematic?

A shared database allows services to bypass each other's contracts and depend directly on internal tables. Schema changes then require cross-service coordination and can undermine independent deployment.

110
Mid-LevelIntermediate

What is an API Gateway?

An API Gateway is an entry point that routes client requests to backend services and can centralize selected edge concerns such as authentication, TLS termination, rate limiting, routing, and response aggregation.

111
Mid-LevelIntermediate

What is the Backend for Frontend (BFF) pattern?

A Backend for Frontend provides a backend layer tailored to a specific client type such as web, mobile, or administration. Each BFF can aggregate or shape data according to that client's requirements.

112
Mid-LevelIntermediate

What is service discovery?

Service discovery allows applications to locate service instances without hard-coding individual server addresses. It is important when instances are created, replaced, or scaled dynamically.

113
Mid-LevelIntermediate

What is synchronous communication between services?

Synchronous communication requires the caller to wait for the downstream service to respond, commonly through HTTP or gRPC.

114
Mid-LevelIntermediate

What is asynchronous communication between services?

Asynchronous communication lets a producer publish a message or event without waiting for the consumer to complete its work. The consumer processes the message independently.

115
Mid-LevelIntermediate

When should you use REST between services?

REST over HTTP is appropriate when services need request-response communication, broad interoperability, resource-oriented APIs, and standard web infrastructure.

116
Mid-LevelIntermediate

When is gRPC useful in .NET systems?

gRPC is useful for strongly typed, high-performance remote procedure calls, especially for internal service-to-service communication. It uses Protocol Buffers and supports features such as streaming.

117
Mid-LevelIntermediate

What is the difference between REST and gRPC?

REST commonly uses HTTP with JSON and resource-oriented conventions, making it broadly interoperable and easy for web clients to consume. gRPC typically uses HTTP/2 with Protocol Buffers and strongly typed service contracts.

118
Mid-LevelIntermediate

What is event-driven architecture?

Event-driven architecture organizes communication around events representing facts that have occurred, such as OrderPlaced or PaymentCompleted. Producers publish events without needing to know all interested consumers.

119
Mid-LevelIntermediate

What is the difference between an event and a command?

A command expresses a request or intention for a specific action to occur, such as ChargePayment. An event describes a fact that has already occurred, such as PaymentCharged.

120
Mid-LevelIntermediate

What is an integration event?

An integration event communicates a meaningful fact across service or bounded-context boundaries. It is part of an external contract and should be designed for consumers that do not share the producer's internal domain model.

121
Mid-LevelIntermediate

How should API and event contracts be versioned?

Contracts should evolve in ways that minimize breaking existing consumers. Additive changes are generally easier to tolerate than removing or changing the meaning of existing fields.

122
Mid-LevelIntermediate

What is an Anti-Corruption Layer between systems?

An Anti-Corruption Layer translates between an external system's model and the application's own model. It prevents foreign terminology, schemas, and design decisions from spreading through the internal domain.

123
Mid-LevelIntermediate

What is the Strangler Fig pattern for system migration?

The Strangler Fig pattern incrementally replaces a legacy system by routing selected capabilities to a new implementation while the remaining functionality continues to use the old system.

124
Mid-LevelIntermediate

What is a distributed monolith?

A distributed monolith is a system split into multiple deployable services that remain so tightly coupled that they must change, deploy, or be available together.

125
Mid-LevelIntermediate

How can you avoid creating a distributed monolith?

Define services around cohesive business capabilities, give them clear data ownership, minimize synchronous dependencies, and design contracts that allow independent evolution.