Skip to main content
Kayvan Mazaheri

About

Senior backend engineer, 7+ years at Cafebazaar (51M users) and Divar (30M). For the last year I've been shipping production AI for B2B SaaS: RAG, agent platforms, the caching-and-fallbacks work that decides if an LLM feature holds up in front of a real customer. I do my best work on systems that have to keep running at 3 AM, and I have strong opinions about observability.

Kayvan Mazaheri
Story

How I got here

I started writing code on a BASIC interpreter I found in a book on my cousin’s shelf in elementary school. I didn’t know what I was doing — just that I could tell a machine what to do and it would do exactly that. The thing I’m doing now is recognisably the same thing.

Competitive programming came next. Three top-10 placings at ACM-ICPC Asia regionals (2014, 2015, 2016). What stayed with me wasn’t the rankings. It was the habit of thinking about correctness under pressure. Edge cases. Complexity. The small voice that asks “what breaks this?” before you ship. That instinct is still load-bearing in how I work today.

Professionally I’ve spent 7+ years on backend systems serving tens of millions of users.

At Divar (30M users, the largest classifieds marketplace in the Middle East) I joined a brand-new Real Estate vertical with zero existing infrastructure and built it from scratch, then stepped into tech lead as the team grew. At Cafebazaar (51M users, Iran’s largest Android store) I went from Software Engineer to Senior to Technical Team Lead. The work that mattered most was the ad-platform rebuild: a live monolith → microservices migration, a Kafka + Redis event pipeline running 50K events/sec, multi-tier caching that cut p99 ad-estimation latency from 700ms to 25ms, and 10× ad revenue sustained over two years.

I left Cafebazaar in April 2025 to try independent work. The first year has been better than expected — real problems, fewer meetings, more time inside the system. I’m based in Yerevan, Armenia these days, doing mostly production AI: RAG over legal documents with citation-anchored retrieval, agent platforms for B2B SaaS, the kind of work where “this needs to keep working for real users, not look good in a demo” is the operating constraint. I’m open to remote senior/staff backend or AI engineering roles, and to consulting in parallel.

I mentored 7+ junior engineers at Cafebazaar; 5 were promoted internally. I’m not big on “force multiplier” framing — but I do think the most useful thing you can do as a senior engineer is leave a team that’s better at the job than when you got there.

Outside work: I cook a lot and chase cuisines I haven’t tried. I walk every city I visit, deliberately off the tourist map. I have a strange collection of useless trivia (ask me about the connection between clicker lighters and clocks). I have strong opinions about films.

Background

Credentials

Education

  • MSc in Bioinformatics — Sharif University of Technology (Left to pursue engineering)
  • BS in Computer Software Engineering — Isfahan University of Technology (2014–2018)

Awards

  • ACM-ICPC Asia Regionals (Tehran)

    4th (2016) · 5th (2015) · 10th (2014)

  • Bayan International Programming Contest

    23rd (2013)

Certifications

  • IELTS - Band Score 8 (CEFR C1) - British Council