Skip to content
Tech Interview Prep
Technical interview guide

Integration Patterns

The standard ways two systems exchange data (sync API calls, async messaging, batch, and webhooks) and when each fits.

Read
42 min
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed

Scope: Azure Architecture Center and AWS Prescriptive Guidance integration patterns current 2026-08-31.

Curated: · Written: · Reviewed:

25 questions

MCQ-1A checkout service handles each request by calling the inventory service synchronously and then returning the result. Over a 30-day window, checkout's own processing adds 30 ms at p99 and its own availability is 99.99%; the inventory call adds 120 ms at p99 and inventory's availability is 99.9%. The path's SLO is p99 ≤ 200 ms and availability ≥ 99.9%. What do these figures say about the design?
MCQ-2A checkout request runs through five sequential synchronous hops. Each hop is independently available 99.9% of the time and has a p99 latency of 40 ms. The team's SLO is 99.9% end-to-end success and a 150 ms p99 budget. What are the chain's end-to-end success rate and its worst-case tail latency (all five hops at their p99)?
MCQ-3An order service publishes one event per checkout to a durable queue and returns 200 OK as soon as the broker acknowledges the write; its p99 is 12 ms. Four consumers each process 100 msg/s, matching the steady 400 msg/s checkout rate. During a 30-minute promotion, checkouts rise to 900 msg/s and hold there. The broker retains messages for 4 hours and its disk holds 2 million messages. What happens to checkout latency and the backlog during and after the promotion?
MCQ-4A queue named `resize` holds a backlog of 4,000 images and is served by 4 competing workers; each image takes 100 ms. A topic named `events` has 4 subscriptions, each with a single worker, and each subscription has its own backlog of 4,000 events; each event takes 100 ms. The team adds one worker to the queue and one subscription to the topic, changing nothing else. Which pair of drain times is correct?
MCQ-25A consumer group drains a queue at 500 messages/s. Queue depth has held steady at 120,000 messages for the past hour, and p99 end-to-end latency is 4 minutes. Which conclusion follows from these numbers?
MCQ-5A worker consumes from an at-least-once queue with a 30 s visibility timeout. Its handler calls the payment gateway, then deletes the message. Under peak load the handler takes 45 s; the gateway call succeeds 20 s in. The orchestrator kills the worker 40 s in, before it deletes the message. A second worker picks up the redelivered message and completes normally. How many gateway charges does this one order produce?
MCQ-9An order service consumes from a standard SQS queue. The queue's visibility timeout is 30 s, maxReceiveCount is 3, and the consumer's p99 processing time is 45 s. Roughly 4% of messages land in the dead-letter queue, and every order ID in the DLQ also appears in the completed-orders table. What is the right fix?
MCQ-6A payment consumer reads a queue with at-least-once delivery. Its handler is: ```python def handle(msg): with db.transaction() as tx: # tx A n = tx.execute( "INSERT INTO processed (message_id) VALUES (%s) " "ON CONFLICT DO NOTHING", msg.id) if n.rowcount == 0: return # seen before ledger.charge(msg.account, msg.amount) # separate call ``` Message M is delivered, tx A commits, and the process is killed before `ledger.charge` runs. The broker redelivers M and the handler runs to completion. What is the account's state?
MCQ-8A payments consumer reads from RabbitMQ with manual ack. Its handler parses the message, calls the Stripe charge API, acks the message, then inserts a ledger row into Postgres and commits. Over a six-hour window the deploy pipeline restarted the workers five times, killing in-flight handlers. Reconciliation shows 1,847 successful Stripe charges but only 1,842 ledger rows. Which change closes the gap?
MCQ-7A service writes an order row and an outbox row in one Postgres transaction. A relay polls the outbox every 100 ms, publishes each row to Kafka with acks=all, then deletes the row. During a deploy the relay is killed after Kafka acknowledges a publish but before the delete commits. What happens when the relay restarts?
MCQ-10A ledger service consumes account events from a 12-partition stream. Eight worker threads pull from one shared in-memory queue and apply each event to the account balance. Under load, about 0.4% of accounts briefly show a negative balance that a later event corrects, and the audit log shows a credit applied before an earlier debit for the same account. Throughput must stay near the current 8-worker rate. What change fixes the reordering?
MCQ-11Two instances publish order events to one topic, and each record carries the publishing host's own wall clock as ts. The consumer folds records into a read model with last-write-wins on ts: for one order id, the record with the larger ts wins, and the consumer applies no correction for clock skew. Neither host runs NTP, and P1's clock is 900 ms ahead of P2's. Kafka keeps both records and gives them increasing offsets. Order 42: P1 publishes status=PAID, ts=1400. P2 publishes status=REFUNDED 400 ms later in real time, ts=900. The consumer reads PAID at offset 41, then REFUNDED at offset 42. After the consumer has read both records, what does the read model hold for order 42?
MCQ-12An order service publishes `OrderPlaced` to a topic. Fulfillment, billing, and notification subscribe. Billing charges the card and, on decline, publishes `CancelShipment` to the same topic. Fulfillment and notification both receive `CancelShipment`. Notification emails the customer "your order is cancelled", but the order service hasn't yet processed the decline, so the order still shows as active in the customer's account for up to 30 seconds. Also, when a second fulfillment provider is added, billing must be changed to publish to its queue. Which change fixes both problems?
MCQ-18An order platform runs on pure event choreography: each service subscribes to the events it cares about. It grew from 4 services to 23 over a year. A refund now occasionally triggers a second shipment, and no engineer can point to the code path that does it. Which property of the choreography explains this?
MCQ-17A checkout flow spans 9 services that communicate only by publishing and subscribing to Kafka events. During a payment-provider outage, 4,000 orders stayed in `pending` for up to 6 hours and the on-call engineer could only locate them by scanning each service's logs; refunds also fired twice because two services each reacted to the same timeout event. Which change addresses what the incident exposed?
MCQ-19An order saga charges the customer's card, reserves inventory, then schedules shipment. When inventory reservation fails, the saga compensates by calling the payment provider's refund API, which returns 202 Accepted and settles asynchronously; a callback reports settlement success or failure. The team handles 50,000 orders a month, and 2% of them hit the inventory-failure path and issue a refund. Among those refunds, 1 in 50 fail transiently (provider timeout) and succeed on a single retry, while 1 in 500 fail permanently because the card was closed after the charge. The saga retries a failed refund once. How many orders per month still need manual resolution?
MCQ-22An order consumer pulls from a queue and retries every failure up to 10 times with a fixed 1-second delay. In one hour it processes 12,000 messages and records 4,780 failures: 4,100 HTTP 503 from the inventory service (unavailable for 90 seconds, then recovered), 380 HTTP 400 'malformed SKU', 210 HTTP 409 'duplicate order id', and 90 HTTP 401 from an expired token that the consumer refreshes on the next attempt. The 400 and 409 messages are each retried 10 times, adding 5,900 downstream calls per hour, and p99 latency has risen from 40 ms to 180 ms. Which change should the team make?
MCQ-23A payment service runs 200 client instances. Each instance retries a failed ledger call with exponential backoff: 100 ms, 200 ms, 400 ms, 800 ms, 1.6 s, then gives up. At 12:00:00 the ledger pauses for 2 s and rejects every call. All 200 instances fail their first attempt within the same 20 ms and follow the schedule exactly. The ledger recovers at 12:00:02.0. The ledger can handle 50 concurrent requests; a 200-request spike causes a second outage. No shared queue or coordination service is available. Which change prevents the second outage?
MCQ-15A payments provider POSTs each event with a signature header and an `event_id`, waits 5 s for a 2xx, and retries the same `event_id` at 5 s, 30 s, 2 min, 10 min, 1 h, 6 h and 24 h after the first attempt; a late 2xx does not cancel a retry already scheduled. The handler verifies the signature, calls the fulfillment API, inserts `event_id` into `processed_events` (a duplicate-key error is ignored), then returns 200. During the sale the fulfillment call takes 12 s; off-peak it takes 300 ms. After a sale in which the handler logged 1,400 duplicate fulfillments in one hour, the team adds one check at the top of the handler: if `event_id` is already in `processed_events`, return 200 immediately. Nothing else changes. During the sale, how many times does the fulfillment API run for a single event?
MCQ-16An API provider signs each webhook as HMAC-SHA256(secret, X-Timestamp + '.' + raw_body) and sends the Unix-seconds timestamp in X-Timestamp. The receiver recomputes the HMAC over the raw body and the header, rejects mismatches, and never looks at the timestamp value. Failed deliveries are retried up to 3 times over 15 minutes, and every retry carries the original signature and timestamp. A tester replays one captured delivery 6 hours later; the receiver accepts it and charges the customer twice. Which change blocks the replay without rejecting legitimate retries?
MCQ-14A nightly job uploads 4,000 Parquet parts to an object-store prefix, and a downstream Spark job polls that prefix every 5 minutes. Last week the Spark job aggregated a batch that was missing 88 parts; on another night it read a part truncated at 3 MB instead of 64 MB. Which change makes the reader see a batch only when all 4,000 parts are present and intact?
MCQ-13A nightly settlement feed moves 12 million records (6 GB) from a mainframe to a warehouse. The mainframe's export job finishes at 01:00 and the report must be complete by 03:00. A proposal replaces the file drop with per-record HTTPS calls measured at 40 ms p99; the warehouse's ingest endpoint rate-limits each client to 20 concurrent connections. What should the team do?
MCQ-20An orders service publishes Avro-encoded events to a Kafka topic whose schema registry is set to BACKWARD compatibility. Schema v7 is live, `record Order { long id; int quantity; }`, and 30 consumers run generated v7 classes. The producer team registers v8, `record Order { long id; long quantity; }`, and deploys the v8 producer first, planning to upgrade the 30 consumers over the next two weeks. What happens?
MCQ-21A service keeps field 7 (`status`, int32) in place but swaps its value mapping so 0 now means active and 1 means inactive. The schema registry reports the new schema as backward compatible, and every consumer deserializes records without error. How should this change be classified?
MCQ-24A payments service writes each transfer to its ledger, then publishes a `transfer.completed` event to a fulfillment service through a broker with at-least-once delivery. For one day the ledger holds 1,200,000 transfers, and the broker reports 100% publish success and 100% consumer acknowledgement. The fulfillment table holds 1,200,120 rows. Matching on transfer ID finds 1,199,970 IDs in both tables, 30 ledger IDs with no fulfillment row, and 150 fulfillment rows with no ledger ID; 120 of those 150 share an idempotency key with a row that did match. Every dashboard is green. What should the team do?