Skip to content
Vibhrav Jha.Let’s talk
All projectsDistributed Systems

Distributed Property Lookup Service

Replicated lookups with visible cache and fallback behavior

My contributionLookup and cache service implementation within the course project.

FieldDistributed Systems / Fullstack

View repository

Academic project

Distributed Property Lookup Service project image

The work
behind the interface.

Made property lookups inspectable across two data replicas and three cache replicas, using LRU caching, source-tagged responses and retry backoff.

  • Python
  • Flask
  • gRPC
  • Docker

The result

A replicated lookup workflow with inspectable cache hits, misses and failover paths.

The problem

Implemented lookup and cache services with two data replicas and three cache replicas.

A decision worth examining

Separate LRU caching from the dataset tier and expose response sources alongside retries and backoff.

Read the README.

View original README
READMEArchitecture, setup and usage

Distributed Property Lookup Service

A high-performance, fault-tolerant address lookup system built with gRPC, Docker, and Python. This microservices architecture demonstrates distributed systems principles including load balancing, failover mechanisms, and intelligent caching strategies.

Architecture

Architecture Diagram

The system consists of two service layers:

  • Dataset Layer: Redundant gRPC servers providing property data access
  • Cache Layer: HTTP API servers with LRU caching for optimized performance

Key Features

πŸ”„ Fault Tolerance & High Availability

  • Automatic failover between redundant dataset servers
  • Intelligent retry mechanism with exponential backoff
  • Service continues operation even with partial infrastructure failures

⚑ Performance Optimization

  • LRU cache implementation (size: 3) to minimize database calls
  • Load balancing across multiple backend servers
  • Smart caching strategy: stores 8 addresses per zipcode for efficient serving

🐳 Containerized Deployment

  • Multi-container architecture using Docker Compose
  • Horizontal scaling with 3 cache replicas and 2 dataset replicas
  • Environment-based configuration for flexible deployments

πŸ”Œ Modern Communication Protocols

  • gRPC for efficient inter-service communication
  • RESTful HTTP API for client access
  • Protocol Buffers for serialization

Technical Stack

  • Backend: Python, Flask
  • RPC Framework: gRPC, Protocol Buffers
  • Containerization: Docker, Docker Compose
  • Caching: Custom LRU cache implementation
  • Data Processing: Pandas (gzipped CSV handling)

API Usage

Lookup addresses by zipcode:

GET /lookup/{zipcode}?limit=4

Response:

{
  "addrs": ["123 Main St", "456 Oak Ave", ...],
  "source": "cache|1|2",
  "error": null
}
  • source: Indicates data origin - "cache" (served from cache) or "1"/"2" (from dataset server 1 or 2)
  • limit: Number of addresses to return (default: 4)

Architecture Highlights

Load Balancing

Requests alternate between dataset servers (round-robin) to distribute load evenly across the infrastructure.

Failover Strategy

When a dataset server is unavailable:

  1. Automatically switches to alternate server after 100ms
  2. Retries up to 5 times across both servers
  3. Returns graceful error message if all attempts fail

Caching Strategy

  • Cache entries store 8 addresses per zipcode for optimal reuse
  • Requests for <8 addresses can be served from cache
  • Requests for >8 addresses still populate cache with first 8 results
  • Enables limited functionality even during complete backend failure

Deployment

# Build images
docker build . -f Dockerfile.cache -t property-cache
docker build . -f Dockerfile.dataset -t property-dataset

# Deploy services
export PROJECT=property-lookup
docker compose up -d

Project Outcomes

This project demonstrates proficiency in:

  • Distributed systems design and implementation
  • Microservices architecture patterns
  • gRPC and Protocol Buffers
  • Container orchestration with Docker
  • Fault tolerance and reliability engineering
  • Cache implementation and optimization
  • API design and development

Data Source

Property address data sourced from Madison City Open Data Portal (Citywide Addresses dataset).

HDFS & SQL Pipeline

  1. Aranyaka wildlife-image application interface

    Fullstack

    Aranyaka

  2. DermaNet hackathon prototype showing classification output and a generated explanation

    ML & AI

    DermaNet

  3. AI-generated concept illustration of source documents connected to retrieved evidence and an answer

    ML & AI

    Private-Data RAG

  4. Before It Breaks dashboard separating real weather from synthetic equipment telemetry and estimated costs

    ML & AI

    Before It Breaks

  5. Architecture diagram of simulated stock records flowing through Kafka to HDFS

    Distributed Systems

    Stock Streaming Engine

  6. Vyaya dashboard with clearly labeled synthetic demonstration data

    Fullstack

    Vyaya

  7. Study assistant interface with retrieved source context

    ML & AI

    Fine-Tuning vs. RAG

  8. Architecture diagram of NOAA data, a Cassandra cluster and a query service

    Distributed Systems

    Distributed Weather Data System

  9. Distributed Property Lookup Service project image

    Distributed SystemsViewing

    Distributed Property Lookup Service

  10. Architecture diagram connecting MySQL, a gRPC service and HDFS storage

    Distributed Systems

    HDFS & SQL Pipeline

  11. Architecture diagram of Spark processing, SQL and analysis

    Distributed Systems

    Spark Analytics

  12. Multi-Source ELT Pipeline project image

    Data Engineering

    Multi-Source ELT Pipeline

  13. Wisconsin schools in their geographic context β€” explanatory architecture diagram

    Data Engineering

    GCP Geospatial Pipeline

  14. Chinook Music Store SQL Analytics project image

    Data Engineering

    Chinook Music Store SQL Analytics

  15. Yelp Geospatial Analytics project image

    Data Engineering

    Yelp Geospatial Analytics

  16. E-Commerce Semantic Search Engine project image

    Data Engineering

    E-Commerce Semantic Search Engine

  17. Retail Sales Forecasting project image

    ML & AI

    Retail Sales Forecasting

  18. Making tool dependencies inspectable β€” explanatory architecture diagram

    ML & AI

    AI Agent Tool Dependency Graph

  19. From public records to operational questions β€” explanatory architecture diagram

    Data Engineering

    Palantir Foundry and AIP Build Challenge

  20. StudyFlow study-session dashboard

    Fullstack

    StudyFlow

  21. Habit Command Center planning dashboard

    Fullstack

    Habit Command Center

  22. Interfaces across web and mobile β€” explanatory architecture diagram

    Fullstack

    React Web & Mobile

  23. Startup Scout project image

    Fullstack

    Startup Scout

  24. Inventory-Based Recipe Planner project image

    Fullstack

    Inventory-Based Recipe Planner

  25. Concurrent Word Count and Performance Benchmarking project image

    Data Engineering

    Concurrent Word Count

  26. Data structures matched to their assumptions β€” explanatory architecture diagram

    Computing Foundations

    Algorithm Design

  27. Campus Navigator project image

    Fullstack

    Campus Navigator

  28. i-Songly: Song Management Engine project image

    Fullstack

    i-Songly

  29. An experiment that can resume β€” explanatory architecture diagram

    ML & AI

    CIFAR-100 with LeNet

  30. Fashion-MNIST Neural Network Classifier project image

    ML & AI

    Fashion-MNIST Classifier

  31. PCA Eigenfaces and Image Reconstruction project image

    ML & AI

    PCA Eigenfaces

  32. Two routes to the same regression objective β€” explanatory architecture diagram

    ML & AI

    Lake Mendota Ice Regression

  33. Bayesian Language Detection project image

    ML & AI

    Bayesian Language Detection

  34. Explanatory diagram of the video-fingerprint benchmark: 25 sources, 75 transformed variants and 1,875 comparisons.

    ML & AI

    Video-Fingerprint Benchmark

All projects