Skip to main content
Kayvan Mazaheri

Backend systems at scale. AI features that ship.

Seven years on backend systems at Cafebazaar and Divar. Now building production AI that holds up under real load.

Kayvan Mazaheri
51M+
Users Reached Ads served in real time to every Cafebazaar user
96%
p99 Latency Cut 700ms → 25ms on real-time ad estimation, same endpoint
10×
Ad Revenue Growth Over a 2-year platform rebuild at Cafebazaar
50K/sec
Events Processed Daily production peak on the ad event pipeline

Where I have worked

AI & Backend Engineer (Contract)

Independent

Apr 2025 - Present

Independent engagements building production AI for B2B SaaS clients - RAG, agent platforms, multi-tenant retrieval. The caching-and-fallbacks work that decides whether an LLM feature holds up in front of a real customer.

RAG Embeddings Vector Stores Pinecone Elasticsearch

Technical Team Lead

Cafebazaar

Mar 2022 - Apr 2025

Tech lead for the ad platform at Cafebazaar (Iran's largest Android store, 51M users). Owned a 10+ engineer team through a live microservices migration and the systems work that grew ad revenue 10× over two years.

Python Go Kafka Redis Kubernetes

Senior Software Engineer

Cafebazaar

Oct 2020 - Mar 2022

Shipped 15+ high-reliability backend APIs at 51M-user scale, decomposed the legacy payment monolith into independently deployable services, and cut data loss on the stats aggregation service from ~15% to under 1%.

Python Django FastAPI PostgreSQL Redis

How I work

I do my best work on systems that have to keep running at 3 AM.

Usually the headline problem is not the problem. Latency, downtime, a team that has slowed down: the cause tends to sit one layer below, in service boundaries, retry storms, or deploy coupling. I would rather find that than ship around it.

I mentored seven junior engineers at Cafebazaar and five were promoted internally. I am not big on force-multiplier framing, but the most useful thing a senior engineer can do is leave a team better at the job than they found it.

Away from the terminal I cook a lot and chase cuisines I have not tried, walk every city I visit deliberately off the tourist map, and keep a collection of useless trivia. Ask me about the connection between clicker lighters and clocks.

Read the longer version

What I work with

Backend and Languages

Python (Django, FastAPI), Go, JavaScript / Node.js, C++, gRPC, REST, async APIs

AI in Production

RAG over PDF, DOCX, plain text, Embeddings and vector stores (Pinecone, Elasticsearch), Citation-anchored retrieval, Agent design under predictability constraints, LLM API integration (OpenAI, Anthropic, open-source), AI-assisted SDLC (Claude Code, evals, agentic dev loops)

Cloud and Infrastructure

Docker, Kubernetes, GCP, AWS, CI/CD pipelines, Linux / shell

Data and Messaging

PostgreSQL, Redis (caching, pub/sub, dedup), Apache Kafka, RabbitMQ, MongoDB

Observability

Grafana, Prometheus, Sentry, Distributed tracing, Custom telemetry tooling

Engineering Practices

Microservices and service boundaries, System design at scale, Code review and mentorship, Agile / Scrum leadership, Unit and integration testing

Open to senior and staff roles, remote.

Email is the fastest path, and the resume has the context. I also take on one or two consulting engagements at a time, in backend architecture and AI integration.