Skip to content
Kevin Arian

Exhibit B

Image classification service

A machine-learning model serving predictions across 1,000 image categories, deployed as a decoupled microservice architecture on AWS and load-tested for real traffic.

Categories
1,000 image classes
Architecture
API decoupled from ML workers
Verification
Stress-tested with Locust
Context
Anyone AI engineering fellowship

Python · FastAPI · TensorFlow · Redis · Docker · AWS EC2 · Locust

The problem

Serving a machine-learning model in production is a different job from training one: predictions must come back fast while the model — a heavy TensorFlow network — takes seconds per batch. Coupling the API to the model directly means one slow request blocks everyone.

What I built

A microservices architecture that separates the two concerns:

  • A FastAPI service takes prediction requests and responds immediately, without ever touching the model.
  • A Redis queue sits between API and model: requests go in, results come out, and each side scales independently.
  • TensorFlow workers consume the queue and run the CNN (1,000 image categories), isolated in their own containers.
  • Docker Compose on AWS EC2 ties it together reproducibly — the same stack runs identically on a laptop and in the cloud.

The outcome

The service held under stress testing with Locust, with the API staying responsive while workers processed the queue — the standard architecture pattern behind production ML systems, built end to end: API design, queueing, model serving, containerization, cloud deployment, and load verification.