Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4608 total questions 4508 technical 100 career & HR 4272 from PDF library

Showing 3451–3475 of 4608

Career & HR topics

By tech stack

Popular tracks

Senior PDF
What is the role of the Saga pattern in microservices transactions?

Short answer: n event or sends a message to the next service. Compensation: If any step in the saga fails, compensating actions (like rolling back previous steps) are executed to maintain consistency. There are two types…

Microservices Read answer
Senior PDF
What is the role of the Saga pattern in microservices transactions?

Short answer: The Saga pattern is used to manage long-running transactions in microservices without requiring a distributed transaction (e.g., two-phase commit). Explain a bit more It breaks down a transaction into small…

Microservices Read answer
Senior PDF
How does the two-phase commit protocol work in a distributed transaction context?

Short answer: The Two-Phase Commit (2PC) protocol is a mechanism to ensure that a distributed transaction is committed successfully across multiple services or databases. It involves two phases: Real-world example (ShopN…

Microservices Read answer
Senior PDF
How do you manage distributed transactions across microservices without using a global transaction manager?

Short answer: Rather than relying on a global transaction manager, microservices can manage distributed transactions using patterns like: Real-world example (ShopNest) ShopNest splits Catalog, Cart, Order, and Payment in…

Microservices Read answer
Mid PDF
What challenges arise when implementing ACID (Atomicity,

Short answer: Consistency, Isolation, Durability) properties in microservices? Real-world example (ShopNest) ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without red…

Microservices Read answer
Senior PDF
How would you deal with network partitions and ensure consistency in microservices?

Short answer: In distributed systems, network partitions can happen, causing parts of the system to become unreachable or inconsistent. Here's how to deal with them: Real-world example (ShopNest) ShopNest splits Catalog,…

Microservices Read answer
Senior PDF
Can you explain the concept of distributed locks in microservices?

Short answer: And when you would need them? Distributed locks are used in microservices architectures to prevent concurrent access to a shared resource or data across multiple services. Real-world example (ShopNest) Shop…

Microservices Read answer
Senior PDF
Can you explain the concept of distributed locks in microservices and when you would need them?

Short answer: Distributed locks are used in microservices architectures to prevent concurrent access to a shared resource or data across multiple services. Explain a bit more This is critical in cases where multiple serv…

Microservices Read answer
Senior PDF
How do you implement compensating transactions in microservices?

Short answer: Compensating transactions are used to undo the changes made by a service in a distributed transaction, particularly when one of the services in the transaction fails. Real-world example (ShopNest) ShopNest…

Microservices Read answer
Mid PDF
How do you handle conflict resolution in eventual consistency scenarios?

Short answer: Conflict resolution in eventual consistency scenarios is essential to ensure data integrity when multiple services or replicas are updating the same data concurrently. Approaches include: Say this in the in…

Microservices Read answer
Senior PDF
What is an event-driven architecture, and how is it used in microservices?

Short answer: An event-driven architecture (EDA) is a design paradigm in which services communicate by producing, consuming, and reacting to events. Explain a bit more In an event-driven architecture, an event represents…

Microservices Read answer
Senior PDF
How does the Event Sourcing pattern fit into microservices?

Short answer: And manages its own events, which makes it easier to decouple services and manage their state independently. How it fits into microservices: Real-world example (ShopNest) After payment succeeds, ShopNest pu…

Microservices Read answer
Senior PDF
How does the Event Sourcing pattern fit into microservices?

Short answer: Event Sourcing is a pattern where state changes are not stored directly in a database, but instead, each state transition (or change) is stored as an event. The state of the system can be recreated by repla…

Microservices Read answer
Junior PDF
What is the difference between Event Sourcing and Command Query Responsibility Segregation (CQRS)?

Short answer: Event Sourcing and CQRS are related patterns, but they serve different purposes and are often used together: Event Sourcing: Focuses on how state changes are stored and communicated. Explain a bit more It s…

Microservices Read answer
Senior PDF
How would you implement a publish-subscribe pattern between microservices?

Short answer: The publish-subscribe pattern allows microservices to communicate asynchronously without knowing about each other. Here's how to implement it: Real-world example (ShopNest) ShopNest splits Catalog, Cart, Or…

Microservices Read answer
Senior PDF
What are the pros and cons of using a message broker like Kafka or RabbitMQ in microservices?

Short answer: Pros: Asynchronous communication: Message brokers enable non-blocking communication between services, improving performance and responsiveness. Explain a bit more Loose coupling: Services don’t need to know…

Microservices Read answer
Mid PDF
How do you handle message deduplication in event-driven systems?

Short answer: Message deduplication ensures that duplicate messages are not processed multiple times, leading to inconsistent state. Here are some ways to handle it: Real-world example (ShopNest) After payment succeeds,…

Microservices Read answer
Senior PDF
Can you explain the concept of event-driven state machines in microservices?

Short answer: An event-driven state machine is a pattern where the state of an entity is managed and transitioned based on events in the system. Explain a bit more It is useful for modeling workflows that need to go thro…

Microservices Read answer
Mid PDF
How do you ensure reliability and durability of events in event-driven systems?

Short answer: To ensure reliability and durability of events: Real-world example (ShopNest) After payment succeeds, ShopNest publishes OrderPaid . Inventory and Notification services react independently—no giant distribu…

Microservices Read answer
Mid PDF
How do you manage schema evolution in an event-driven

Short answer: rchitecture? Managing schema evolution in event-driven systems is crucial to ensure backward compatibility when services evolve over time: Real-world example (ShopNest) After payment succeeds, ShopNest publ…

Microservices Read answer
Senior PDF
How do you manage schema evolution in an event-driven architecture?

Short answer: Managing schema evolution in event-driven systems is crucial to ensure backward compatibility when services evolve over time: Real-world example (ShopNest) After payment succeeds, ShopNest publishes OrderPa…

Microservices Read answer
Senior PDF
What are idempotent event processing and its importance in microservices?

Short answer: Idempotent event processing means that processing an event multiple times will result in the same outcome, ensuring that repeated processing doesn't cause issues such as data corruption or duplication. Expl…

Microservices Read answer
Senior PDF
How do you choose the right database for a microservices-based

Short answer: pplication? Choosing the right database for a microservices application depends on various factors: Real-world example (ShopNest) ShopNest splits Catalog, Cart, Order, and Payment into services so teams can…

Microservices Read answer
Senior PDF
How do you choose the right database for a microservices-based application?

Short answer: Choosing the right database for a microservices application depends on various factors: Real-world example (ShopNest) ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy cata…

Microservices Read answer
Senior PDF
What is polyglot persistence, and why is it relevant in a microservices architecture?

Short answer: pplication based on the specific needs of each service. In a microservices architecture, each service can have its own database optimized for its particular requirements, making it more efficient and scalab…

Microservices Read answer

Microservices Microservices with .NET · Microservices

Short answer: n event or sends a message to the next service. Compensation: If any step in the saga fails, compensating actions (like rolling back previous steps) are executed to maintain consistency. There are two types of sagas:

Real-world example (ShopNest)

After payment succeeds, ShopNest publishes OrderPaid. Inventory and Notification services react independently—no giant distributed transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: The Saga pattern is used to manage long-running transactions in microservices without requiring a distributed transaction (e.g., two-phase commit).

Explain a bit more

It breaks down a transaction into smaller, isolated steps, with each step running in its own service and completing successfully or being compensated in case of failure. Steps: Each microservice in a saga performs a local transaction and then publishes an event or sends a message to the next service. Compensation: If any step in the saga fails, compensating actions (like rolling back previous steps) are executed to maintain consistency. There are two types of sagas:

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: The Two-Phase Commit (2PC) protocol is a mechanism to ensure that a distributed transaction is committed successfully across multiple services or databases. It involves two phases:

Real-world example (ShopNest)

ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Rather than relying on a global transaction manager, microservices can manage distributed transactions using patterns like:

Real-world example (ShopNest)

ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Consistency, Isolation, Durability) properties in microservices?

Real-world example (ShopNest)

ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: In distributed systems, network partitions can happen, causing parts of the system to become unreachable or inconsistent. Here's how to deal with them:

Real-world example (ShopNest)

ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: And when you would need them? Distributed locks are used in microservices architectures to prevent concurrent access to a shared resource or data across multiple services.

Real-world example (ShopNest)

ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Distributed locks are used in microservices architectures to prevent concurrent access to a shared resource or data across multiple services.

Explain a bit more

This is critical in cases where multiple services or instances of the same service need to access shared resources or perform operations that should be executed in an exclusive manner. When to use: Critical sections: For example, if multiple services are accessing the same shared database and you want to ensure that only one service updates a record at a time. Distributed jobs: In cases where multiple instances of a service need to coordinate a task (e.g., only one instance should be processing a batch job at a time). Tools: Redis can be used for distributed locking with the SETNX (set if not exists) command. Zookeeper is another popular tool for implementing distributed locks, allowing services to coordinate actions in a fault-tolerant way.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Compensating transactions are used to undo the changes made by a service in a distributed transaction, particularly when one of the services in the transaction fails.

Real-world example (ShopNest)

ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Conflict resolution in eventual consistency scenarios is essential to ensure data integrity when multiple services or replicas are updating the same data concurrently. Approaches include:

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: An event-driven architecture (EDA) is a design paradigm in which services communicate by producing, consuming, and reacting to events.

Explain a bit more

In an event-driven architecture, an event represents a state change or a significant occurrence within the system.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: And manages its own events, which makes it easier to decouple services and manage their state independently. How it fits into microservices:

Real-world example (ShopNest)

After payment succeeds, ShopNest publishes OrderPaid. Inventory and Notification services react independently—no giant distributed transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Event Sourcing is a pattern where state changes are not stored directly in a database, but instead, each state transition (or change) is stored as an event. The state of the system can be recreated by replaying these events. In a microservices architecture, each service stores and manages its own events, which makes it easier to decouple services and manage their state independently. How it fits into microservices:

Real-world example (ShopNest)

After payment succeeds, ShopNest publishes OrderPaid. Inventory and Notification services react independently—no giant distributed transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Event Sourcing and CQRS are related patterns, but they serve different purposes and are often used together: Event Sourcing: Focuses on how state changes are stored and communicated.

Explain a bit more

It stores events instead of the current state of an entity. The events can be replayed to rebuild the state, ensuring that every state change is traceable and auditable. CQRS: Separates the command (write) and query (read) operations into distinct models. In CQRS, the write model (or command) is responsible for modifying data, and the read model (or query) is optimized for querying data. This separation allows for optimizations in both reading and writing. How they relate: Event Sourcing can serve as the write model in CQRS. Events are stored as part of the write process. The read model in CQRS can be a materialized view (a denormalized representation) that is optimized for querying, which may be updated asynchronously based on the events.

Real-world example (ShopNest)

After payment succeeds, ShopNest publishes OrderPaid. Inventory and Notification services react independently—no giant distributed transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: The publish-subscribe pattern allows microservices to communicate asynchronously without knowing about each other. Here's how to implement it:

Real-world example (ShopNest)

ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Pros: Asynchronous communication: Message brokers enable non-blocking communication between services, improving performance and responsiveness.

Explain a bit more

Loose coupling: Services don’t need to know about each other’s internals; they only communicate through events.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Message deduplication ensures that duplicate messages are not processed multiple times, leading to inconsistent state. Here are some ways to handle it:

Real-world example (ShopNest)

After payment succeeds, ShopNest publishes OrderPaid. Inventory and Notification services react independently—no giant distributed transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: An event-driven state machine is a pattern where the state of an entity is managed and transitioned based on events in the system.

Explain a bit more

It is useful for modeling workflows that need to go through various states in response to different events (e.g., order lifecycle, payment processing). States: Each entity (e.g., an order) goes through a series of states, such as "Pending", "Processing", "Shipped", "Delivered". Events: Events trigger state transitions. For example, receiving an "OrderShipped" event could transition an order from "Processing" to "Shipped". State Machine Logic: The state machine ensures that the entity moves through states in a well-defined manner, preventing invalid state transitions and allowing for complex workflows. This pattern helps make business logic explicit and maintainable in event-driven microservices.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: To ensure reliability and durability of events:

Real-world example (ShopNest)

After payment succeeds, ShopNest publishes OrderPaid. Inventory and Notification services react independently—no giant distributed transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: rchitecture? Managing schema evolution in event-driven systems is crucial to ensure backward compatibility when services evolve over time:

Real-world example (ShopNest)

After payment succeeds, ShopNest publishes OrderPaid. Inventory and Notification services react independently—no giant distributed transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Managing schema evolution in event-driven systems is crucial to ensure backward compatibility when services evolve over time:

Real-world example (ShopNest)

After payment succeeds, ShopNest publishes OrderPaid. Inventory and Notification services react independently—no giant distributed transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Idempotent event processing means that processing an event multiple times will result in the same outcome, ensuring that repeated processing doesn't cause issues such as data corruption or duplication.

Explain a bit more

Importance in microservices: Reliability: In event-driven systems, events may be retried due to failures or timeouts. Idempotency ensures that retries don’t cause inconsistent data. Resilience: Services can safely process events without worrying about duplication, ensuring system stability during network or processing failures. Consistency: Helps maintain data consistency across microservices even when events are delivered multiple times due to failures or retries. To implement idempotency, use unique identifiers for events, and ensure that the service checks if the event has been processed before performing any action. Data Storage and Management

Real-world example (ShopNest)

After payment succeeds, ShopNest publishes OrderPaid. Inventory and Notification services react independently—no giant distributed transaction.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: pplication? Choosing the right database for a microservices application depends on various factors:

Real-world example (ShopNest)

ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: Choosing the right database for a microservices application depends on various factors:

Real-world example (ShopNest)

ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Microservices Microservices with .NET · Microservices

Short answer: pplication based on the specific needs of each service. In a microservices architecture, each service can have its own database optimized for its particular requirements, making it more efficient and scalable.

Real-world example (ShopNest)

ShopNest splits Catalog, Cart, Order, and Payment into services so teams can deploy catalog changes without redeploying payments.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details