Matthew Kong

Case studies/Zillow, 2023

Instant tour provider adapters and booking correctness

Booking intents, short slot holds and reconciliation so two renters never both receive a false confirmation.

Laptop screen with code under blue light
  1. Listing UI via GraphQL
  2. Availability service
  3. Short-TTL cache
  4. Provider adapter
  5. Vendor calendar
  6. Booking orchestrator
  7. Confirmation webhook

Why this work, at that time

Zillow launched instant apartment tour booking in January 2023. Joining in April meant inheriting that system and hardening a subset of its provider integrations, not launching it.

The problem

Two users could book the same visible slot during a partner delay, and one of them would see a false confirmation. Slot freshness and confirmation reliability were the targets.

The team and my part

Seven engineers: three rental backend, one frontend, one integrations, one platform and SRE partner, one tech lead, with PM, design and provider operations shared. I owned one external provider adapter and wrote its on-call runbook.

Data and index design

rental_property(id, provider); slot_snapshot(provider, property, start_utc, end_utc, version, expires_at); booking_intent(id, tenant, slot, state, key); provider_call(id, correlation_id, status, retry_count). Unique on (provider, external_booking_id).

API and event contract

GET /tours/availability?property_id; POST /tours/book {slot_id, consent, key}. Booking status: PENDING_PROVIDER, CONFIRMED, FAILED, RECONCILING.

Core logic

Cache availability only briefly. Persist a booking intent with a unique idempotency key before any provider call. The provider is authoritative for final confirmation; the user sees pending until confirmation or a reconciled lookup arrives.

Implementation sequence

  1. Review the inherited adapter runbooks, partner SLAs and baseline slot-mismatch metrics.
  2. Introduce a standardized adapter interface: listSlots, bookSlot, getBooking, cancelBooking.
  3. Persist the booking intent and correlation id before the outbound call; add a safe reconciliation worker.
  4. Use provider-specific timeouts, retries and circuit breakers. Never double-book on an ambiguous timeout.
  5. Shadow-check availability, enable by partner cohort, and measure booking divergence and support cases.

Environments and release

TypeScript and GraphQL front end with a Go or Python integration service, Redis cache, SQL database and job workers. Provider sandbox and contract tests preceded a guarded rollout by partner cohort.

Failure drill

The provider times out after reserving a slot. Keep the user PENDING, query by correlation id, reconcile asynchronously, and offer an inquiry fallback if confirmation never arrives.

Scale and targets

Modeled scale

  • About 8K provider-connected properties and 160K active calendar slots
  • 800K availability reads per day, 9.3 RPS average, roughly 320 RPS peak
  • About 3K bookings per day with a 30-day booking log

Acceptance targets

  • Availability p95 under 500 ms
  • Zero confirmed duplicate bookings
  • Every booking tracked end to end

Scale figures are the sizing model behind the design. Targets are acceptance criteria, not measured results.

The trade-off I would defend

Scope is post-launch integration hardening: dependable ownership of one integration domain, not a redesign of Rentals.