---
title: "Booking Timeout ve UNKNOWN Outcome Recovery"
description: "Travel booking timeout'larında FAILED yerine UNKNOWN state kullanarak lookup, reconciliation ve safe retry kararlarını tasarlayın."
slug: "booking-timeout-unknown-outcome-recovery"
translationKey: "architecture-booking-timeout-unknown-outcome-recovery"
locale: "tr"
type: "guide"
category: "architecture"
tags: ["booking","timeout","unknown","recovery","reconciliation"]
publishedAt: "2026-09-27"
updatedAt: "2026-09-27"
reviewedAt: "2026-09-27"
technicalVerifiedAt: "2026-09-27"
codeExampleStatus: "illustrative"
---

Booking create request'inin timeout olması booking'in başarısız olduğunu kanıtlamaz. **Transport failure ile business outcome'u ayırmak**, duplicate booking'i önleyen en kritik kurallardan biridir.

## Recovery state machine

```mermaid
%% title: UNKNOWN booking recovery
%% description: Ambiguous timeout sonucu lookup ve reconciliation ile terminal state'e çözülür.
stateDiagram-v2
  [*] --> Requested
  Requested --> Confirmed: provider response
  Requested --> Failed: explicit rejection
  Requested --> Unknown: timeout / connection loss
  Unknown --> Reconciling: schedule lookup
  Reconciling --> Confirmed: booking found
  Reconciling --> Failed: authoritative no-booking result
  Reconciling --> Unknown: evidence inconclusive
```

## Timeout sınıfları

Ayrıştırın:
- connect timeout: request provider'a hiç gitmemiş olabilir,
- read timeout: provider request'i işlemiş olabilir,
- connection reset: outcome belirsiz,
- client timeout: backend işlemeye devam ediyor olabilir,
- business timeout: provider booking hala processing olabilir.

Hepsini FAILED yapmak yanlıştır.

## Recovery key'leri

Lookup için mümkün olan identity'leri kaydedin:
- client reference,
- idempotency key,
- provider session/token,
- traveler + itinerary/property fingerprint,
- payment reference,
- request correlation ID.

## Safe retry gate

Create retry ancak şu koşullarda yapılmalı:

1. previous attempt terminal FAILED,
2. provider duplicate protection sağlıyor veya önceki create'in oluşmadığı authoritative olarak doğrulandı,
3. aynı BookingIntent için retry policy izin veriyor.

UNKNOWN iken blind retry yok.

## Reconciliation algorithm

```text
if providerReference exists:
  lookup by providerReference
else if clientReference supported:
  lookup by clientReference
else:
  query narrow booking window / fingerprint
if found:
  CONFIRMED
else if provider guarantees lookup completeness:
  FAILED
else:
  remain UNKNOWN and escalate/backoff
```

"Bulamadım" her provider'da "yok" anlamına gelmez; lookup consistency contract'ı bilinmelidir.

## User experience

UNKNOWN internal state'i kullanıcıya doğrudan teknik terimle göstermeyin. UX:
- "Rezervasyonunuz doğrulanıyor",
- tekrar satın alma CTA'sını geçici kapatma,
- duplicate riskini anlatmadan recovery sürdürme,
- terminal sonuç geldiğinde notification.

## Failure modes

- duplicate create retry,
- lookup eventual consistency,
- wrong booking'i fingerprint ile eşleme,
- UNKNOWN kaydı sonsuza kadar açık bırakma,
- ops agent'ın ikinci booking açması,
- payment state'i booking outcome kanıtı sanma.

## Observability

- UNKNOWN creation rate,
- UNKNOWN age percentiles,
- resolution source,
- resolution outcome,
- duplicate prevention count,
- manual escalation rate,
- time-to-confirm/time-to-fail.

## Production checklist

- UNKNOWN first-class state,
- timeout taxonomy,
- recovery identity persistence,
- provider lookup capability map,
- safe retry gate,
- backoff,
- manual escalation,
- traveler-safe pending UX.
