Skip to content
Marcus Prgin
Selected work / project field

Rate Limiter

Two algorithms behind one interface. An atomic Lua script fixed a distributed increment/expiry race; quota leasing cut P99 from 1ms to 0.2ms.

  • Built two rate-limiting algorithms (sliding-window counter, token bucket), each with in-memory and Redis-backed implementations behind one interface for config-level strategy swaps
  • Fixed a distributed race between counter increment and expiry with a single atomic Redis Lua script, verified under 1,000 concurrent goroutines with Go’s race detector to stop windows silently doubling under load
  • Added cost-weighted quota so a single call can consume multiple units — the token-cost billing model used by OpenAI and Stripe
  • Designed a layered limiter enforcing per-user → per-tenant → global limits in sequence, short-circuiting at the first denial and returning the tightest remaining quota
  • Built an adaptive limiter that tunes throughput with an AIMD control loop (as in TCP congestion control), using a lock-free atomic multiplier to avoid mutex contention on the hot path
  • Cut Redis round trips ~85% with per-node quota leasing, dropping P99 decision latency from ~1ms to ~0.2ms; held zero 5xx across 28,440 requests at 300 rps while restarting Redis 4x mid-run
May 2026 – Aug 2026 · Go, Redis, Lua, Prometheus, Grafana, Docker, k6
View on GitHub ↗

SQL Query Engine

Predicate pushdown and projection pruning cut I/O up to 94%. A 16 KB HyperLogLog sketch cut distinct counts to O(1) memory at ~0.8% error.

  • Cut I/O up to 94% on wide CSVs by implementing predicate pushdown and projection pruning — pushing filters to the scan and reading only referenced columns
  • Cut distinct-count memory from O(n) to O(1) at ~0.8% error by replacing exact counts with a 16 KB HyperLogLog sketch (as used by Redshift and BigQuery)
  • Added an approximate top-k aggregate on a Count-Min Sketch (fixed 110 KB) returning the most frequent values in sub-linear memory regardless of distinct-value count
May 2026 – Aug 2026 · Python, pytest, pyarrow
View on GitHub ↗

AI Code Security Agent | ResolvePR

A Go engine parses each PR diff at the syntax-tree level, sending only changed functions to Claude — cutting security false positives 40%.

  • Cut security false positives 40% by building a Go engine that parses each PR diff at the syntax-tree level, sending only changed functions to the Claude API and posting findings as inline comments pinned to exact lines
  • Wrapped the Claude API in prompt guardrails and a test suite, tuning confidence thresholds to surface only high-signal findings
  • Built an HMAC-verified GitHub webhook pipeline on Google Cloud Run (Neon Postgres) with a Next.js/Vercel dashboard for severity filtering, false-positive dismissal, and real-time critical/high alerts
GDG Hacks · May 2026 · Go, Claude API, tree-sitter, Google Cloud Run, Neon Postgres, Next.js/Vercel
View on GitHub ↗
Experience / selected impact

Software Engineering Intern | Enzuzo

Corrected inflated usage metrics — a customer reported at 330% of quota was really at 31% — with exact per-day distinct counts tied to billing.

  • Corrected inflated usage metrics, fixing a customer reported at 330% of quota to an accurate 31%, by replacing a proxy visitor flag with an exact per-day distinct count aligned to billing enforcement
  • Eliminated recurring CPU-limit failures (Error 1102) on high-traffic dashboard tabs by precomputing dozens of per-request queries into hourly Cloudflare D1 rollups instead of running them in the render path
  • Removed code deploys from the blocklist-change process entirely by migrating a hardcoded 95-entry blocklist to a Cloudflare D1 source of truth with a human-overrides-automation precedence model
  • Kept a 34,451-account feed accurate through upstream API outages with a four-level cache fallback and a six-rule validator that rejects corrupt but successful-looking responses
  • Fixed systematically wrong quota percentages by anchoring each account’s usage window to its Stripe billing-cycle anniversary, handling month-length edge cases (e.g., Jan 31 → Feb 28 → Mar 31)
  • Built passwordless authentication with signed magic links, constant-time token comparison, and a 15-minute expiry that rejects expired and forged tokens
May 2026 – Aug 2026
About / Marcus Prgin

Software engineer, undergrad

I’m a CS undergrad from Ontario, Canada, working across Go, Python, TypeScript, JavaScript, and SQL — with React and Next.js on top and Kubernetes, Terraform, Docker, Cloudflare, and Vercel underneath. I’m drawn to statistics and security: building secure full-stack applications, designing databases, and writing efficient SQL queries.

Ontario, Canada
Education / University of Guelph

Bachelor of Computing, Computer Science Co-op (Honours)

University of Guelph — currently in year two, expected to graduate in May 2030.

Guelph, Ontario · Expected May 2030

Let’s build something!

Email ↗LinkedIn ↗GitHub ↗
Résumé / preview
Download PDF
Marcus Prgin résumé, Winter 2026