Skip to content
Sharp

Microservice Architecture · interview question

In a microservices-based e-commerce system using the Saga pattern, what is a common approach to handle a payment failure when processing an order?

Multiple choiceMediumchapter-18-curatedpremiummicroservice-architectureeventual-consistency-sagas
Choose one answer
Answer and explanation

Correct answer

B. Initiate a compensating transaction to refund the payment.

Why

In the Saga pattern, a compensating transaction is used to logically undo changes when a step fails, such as issuing a refund when a payment fails.

Test yourself on Microservice Architecture

A free test with instant, explained results. No account needed.

Start free test
All Microservice Architecture questions →