Distributed Systems

Kayak Travel Platform

3-tier distributed travel metasearch with 7 microservices, Kafka event streaming, multi-database strategy, and an AI concierge powered by LangChain.

Source Code
Node.jsKafkaMySQLMongoDBRedisDockerLangChain

Architecture

3-Tier Distributed System

Tier 1: Frontend

React Web App

Tier 2: Middleware

API Gateway + 6 Node.js Services + 1 Python AI

Tier 3: Data Layer

MySQL + MongoDB + Redis + Kafka

Services

7 Microservices

6 Node.js/Express + 1 Python/FastAPI

API Gateway

JWT auth, rate limiting, request routing

Search Service

Flight/hotel/car search with Redis caching

User Service

Registration, login, profile management

Booking Service

Booking workflow with inventory control

Billing Service

Payment and billing operations

Admin Service

Analytics and admin management

AI Concierge

LangChain agent with 6 MRKL tools (Python/FastAPI)

Data Layer

Multi-Database Strategy

MySQL 8.0

OLTP

Bookings, users, transactions — ACID-compliant with referential integrity

MongoDB 7.0

Analytics

Search logs, user behavior, recommendation data — flexible schema

Redis 7

Cache

Search result caching — sub-100ms responses with intelligent invalidation

Kafka

Event-Driven Flow

User Action
API Gateway
Kafka Event
Service
DB Update

Real-time event streaming for booking confirmations, inventory updates, and user actions

Features

What It Does

Kafka event-driven sync — listing, user, and deal events across all services
JWT authentication with bcrypt password hashing and role-based authorization
AI concierge with 6 tools: search bundles, price analyzer, watch creator, quote generator, policy lookup, booking confirmer
Docker Compose orchestration — 9+ containers including Kafka, Zookeeper, and Kafka UI
Multi-database strategy — MySQL for OLTP, MongoDB for analytics, Redis for caching
API Gateway with CORS, Helmet security headers, rate limiting, and request timeouts
Source Code
7 Services3 Databases9+ Containers