homeexamplesmicroservice-project

Microservice URL Shortener – Production‑minded portfolio build

Published Oct 15, 2025
4 minutes read

I built a microservice‑based URL shortener to practice production disciplines on a small, approachable system. It focuses on clear service boundaries, predictable deploys, observability, and developer ergonomics.

Kubernetes setup
Kubernetes manifests for prod-like deploys

Project goals

Architecture overview

Docker Compose
Local development via Docker Compose

Data model (essentials)

Indexes:

API surface (concise)

Request lifecycle

  1. Client calls Shortener to create a short link → validates URL → stores in Postgres → sets Redis key (shortCode → longUrl) → returns short URL.
  2. User follows short URL → Redirect checks Redis. On cache hit, immediate redirect and async click log; on miss, reads Postgres, refreshes cache, then redirects.
  3. Analytics ingests click events and exposes summaries for dashboard and UI.

Operational concerns

Terraform
Terraform scaffolding for cloud infra

Observability

Security and reliability

Performance notes

Observability dashboards
Grafana dashboards for latency and cache hit ratio

Trade‑offs and decisions

Running the project

Edge cases considered

Future work

Notes

This repository is intentionally small, but the patterns (service boundaries, deploy flow, and observability) mirror how I build larger systems. If you want me to tailor the content (e.g., screenshots, live demo links, or a deeper cost/perf breakdown), I can extend this page accordingly.

Service SLOs (targets)

SLOs are observable via Prometheus histograms and error ratios; alerts wired on burn‑rate.

Autoscaling and capacity

CI/CD and releases

Security hardening

Testing strategy

Resilience and DR

Cost and footprint

Notes

This repository is intentionally small, but the patterns (service boundaries, deploy flow, and observability) mirror how I build larger systems. If you want me to tailor the content (e.g., screenshots, live demo links, or a deeper cost/perf breakdown), I can extend this page accordingly.