← Questions

Split a monolithic wallet service into microservices

0
AppleSystem designLast asked Sep 2025

A system design interview question asked in Apple's technical phone screen, last asked Sep 2025. It tests microservices, migration and payments.

You run a monolithic digital wallet and peer-to-peer payments app: one codebase and one database handle sign-up and identity checks, balances, transfers, card top-ups, fraud checks and notifications. Plan its migration to microservices without losing money, data or uptime.

Requirements

  • Functional: everything the app does today keeps working during and after the migration: identity and KYC, wallet balances, the ledger, payments, risk checks, notifications.
  • Non-functional: no money lost or created; no downtime; compliance with payment card and personal data rules; the ability to roll back each step.

Clarifying questions

  • What hurts today: deploy speed, scaling, team ownership, reliability?
  • How large is the traffic and the team?
  • Which parts are regulated, and what audits exist?
  • Is the database shared by every module?

What a strong answer covers

  • Service boundaries and data ownership: identity/KYC, wallet, a ledger as the double-entry source of truth, payment orchestration, risk, notifications; each with its own data.
  • A phased plan using the strangler pattern: a gateway in front, extract the low-risk parts first (notifications), the ledger last and most carefully.
  • Moving data: change data capture or dual writes with reconciliation, backfills, a cutover with a read-compare period.
  • Cross-service transactions: sagas with compensating steps and an outbox for reliable events, versus two-phase commit, and why sagas usually win.
  • Idempotency keys on every money-moving API; reconciliation jobs that compare the ledger with balances and with the card processor.
  • Security and compliance: service-to-service auth, keeping card data in a small isolated scope, encryption and key management, audit logs.
  • Observability and rollout: tracing across services, canaries, feature flags, rollback per phase; risks and success metrics.

Follow-ups

  • A transfer debits one wallet, then the credit step fails. Walk through what happens.
  • During the migration, the old and new systems disagree on a balance. Which one wins, and how do you find out why?
  • How do you know the migration was worth it?

Where it's asked

  • Apple · Technical phone screen · Last asked Sep 2025

What it tests

microservices · migration · payments

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing