PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Google

Design distributed transactions protocol

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's understanding of distributed transactions, coordination protocols, fault tolerance, consistency, and reliability across microservices and databases.

  • hard
  • Google
  • System Design
  • Software Engineer

Design distributed transactions protocol

Company: Google

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Design a distributed transactions protocol to coordinate updates across multiple services or databases. Compare two-phase commit, three-phase commit, and Saga patterns; specify message flows, failure handling, idempotency, timeouts, and exactly-once versus at-least-once guarantees.

Quick Answer: This question evaluates a candidate's understanding of distributed transactions, coordination protocols, fault tolerance, consistency, and reliability across microservices and databases.

Related Interview Questions

  • Design a Security Monitoring Framework - Google (medium)
  • Design an Online Coding Judge Platform - Google (medium)
  • Design Calendar Event Conflict Handling - Google (medium)
  • Design a pub-sub replay system - Google (hard)
  • How to host many domains on one IP? - Google (medium)
Google logo
Google
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
5
0

System Design: Distributed Transactions Across Multiple Services

Context

You must design a distributed transactions protocol to coordinate updates across multiple services or databases in a microservices environment. The network is unreliable (messages can be delayed, duplicated, or lost), services can crash and recover, and latency and availability matter.

Assume services communicate over RPC and/or a message bus. Some services may support a "prepare/commit" primitive; others may not.

Task

  1. Propose a protocol to coordinate multi-service updates.
  2. Compare and contrast the following approaches:
    • Two-Phase Commit (2PC)
    • Three-Phase Commit (3PC)
    • Saga (orchestration and/or choreography)
  3. For each approach, specify:
    • Message flow (step-by-step)
    • Failure handling (coordinator crash, participant crash, message loss/duplication, partition)
    • Idempotency mechanisms
    • Timeouts and retries
    • Delivery guarantees (exactly-once vs at-least-once) and what you can realistically achieve
  4. Conclude with a recommendation for when to use each approach and how to implement it safely.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Google•More Software Engineer•Google Software Engineer•Google System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.