2024
FraudBuster
Fraud detection for product reviews: a fine-tuned BERT classifier behind five gRPC microservices
- Request success
- 99.2%
- p95 latency
- 44 ms
- Requests in load test
- 20,000+
- Python
- Flask
- BERT
- gRPC
- MongoDB
- Redis
- Docker
- Kubernetes
- Protobuf
Summary
A cloud-distributed fraud detection system that analyzes Amazon product reviews to identify bot-generated and fraudulent content using pretrained BERT models. Built as 6 independent microservices communicating over gRPC, backed by Redis caching and MongoDB persistence — deployable via Docker Compose or Kubernetes.
Problem
Fake Amazon reviews undermine consumer trust and distort product rankings. Manual moderation doesn't scale to millions of daily reviews.
Approach
Designed a 6-service architecture: flask-app (API gateway), review-classifier (BERT ML), relevance-scorer, scraper, mongo-store, and a scheduler/orchestrator. Services communicate over gRPC with Protobuf, Redis handles caching, and MongoDB persists results. Fully containerized for Docker Compose or Kubernetes deployment.
- Requests enter through a Kubernetes ingress running Nginx.
- flask-app is the API gateway. Redis answers repeat lookups from cache.
- Four gRPC services do the work, each with one job.
- Each service owns its backend: a scraping API, a fine-tuned BERT model, MiniLM embeddings, MongoDB.
- A daily CronJob re-runs the whole chain and refreshes the cache.
Results
- 99.2% request success rate and 44 ms p95 latency across more than 20,000 requests during load testing.
- BERT classifier fine-tuned on 40,000 labelled Amazon reviews.
- Kubernetes autoscaling from 2 to 8 pods.