Back to all projects

Movie Mesh

Scalable Microservice-Based Movie Search Platform

A scalable microservices movie search platform combining JWT authentication, Kafka-driven event processing, and Nginx load balancing across horizontally scalable search service instances.

Repository

Movie Mesh is a microservices movie search platform built to handle high search traffic and secure authentication using event-driven processing and cloud-ready databases.

  • A single monolithic search service becomes a bottleneck under high query volume and cannot scale independently of auth or other concerns.
  • Authentication and search have very different data and scaling needs, but need to sit behind one coherent API surface.
  • Search and auth events needed centralized processing without services calling each other synchronously.

Nginx routes traffic to a scalable Search Service and a separate Auth Service, while Kafka streams events between services for asynchronous, decoupled processing.

System Architecture DiagramClick to expand
Movie Mesh Architecture Diagram
Data Flow

Client sends a request to Nginx.

Nginx routes /search to load-balanced Search Service instances and /auth to the Auth Service.

Search Service queries MongoDB Atlas Search indexes; Auth Service verifies against MySQL via Prisma.

Both services emit events to Kafka.

Downstream consumers process events asynchronously for logging and analytics.

Key Architectural Decisions

  • ✓Split the system into an Auth Service (JWT, MySQL via Prisma) and a horizontally scalable Search Service (MongoDB Atlas via Mongoose), both behind Nginx.
  • ✓Used Kafka as an event backbone so search queries and auth logs are processed asynchronously by decoupled consumers.
  • ✓Containerized every service with Docker Compose, including MongoDB Atlas Search and Autocomplete index definitions for fast, typo-tolerant movie search.
TypeScriptNode.jsReactBootstrapNginxKafkaMongoDB AtlasMySQLPrismaMongooseDocker
  • Using MongoDB Atlas Search indexes (including autocomplete) avoided building a separate search infrastructure like Elasticsearch for this scale.
  • Nginx as a lightweight reverse proxy was sufficient to route and load-balance across services without a heavier API gateway.