Back to Projects
Shipoff – Distributed PaaS Architecture
Completednext.jstypescriptreact+10 more

Shipoff – Distributed PaaS Architecture

A technical deep‑dive into Shipoff’s distributed microservices, gRPC, Redis Streams, Kubernetes orchestration, and deployment pipelines.

Timeline

2 months

Role

Full Stack

Team

Solo

Status
Completed
Documentation
View Docs

Technology Stack

next.js
typescript
react
postgres
prisma
grpc
redis
docker
kubernetes
argo cd
cloudflare
s3
turborepo

Key Challenges

  • Synchronizing project and deployment state across multiple microservices without creating distributed race conditions.
  • Designing a reliable deployment state machine ensuring deployments are queued to prevent overconsumption of limited compute resources (4 vCPUs, 24GB RAM).
  • Coordinating build-service, runtime-service, project-service, and gateway-service using gRPC without inconsistent state transitions.
  • Ensuring every microservice has an isolated database while still maintaining global consistency across the platform.
  • Choosing a cloud provider that can sustain a distributed PaaS infrastructure on a free tier—Oracle Cloud provided the required compute and networking credits.
  • Handling real-time log streaming from Kubernetes pods without overwhelming Redis Streams consumers.
  • Managing container build failures, gRPC timeouts, soft crashes, and auto-recovery logic inside Argo CD & k8s.
  • Designing a secure routing layer through Cloudflare + Ingress while supporting static + dynamic deployments.

Key Learnings

  • Understanding Kubernetes deeply: Deployments, StatefulSets, Ingress routing, autoscalers, readiness/liveness probes, and multi-container orchestration.
  • Implementing production-grade gRPC microservices with bidirectional streaming and strict protobuf contract evolution.
  • Building resilient distributed state machines with Redis Streams, consumer groups, and backpressure handling.
  • Architecting GitOps pipelines with ArgoCD and generating declarative deployment manifests dynamically.
  • Implementing secure, multi-protocol build pipelines using Docker Buildx and ephemeral Kubernetes builder pods.
  • Mastering cross-service communication, event-driven workflows, eventual consistency, and distributed tracing.
  • Learning the caveats of PostgreSQL when used across microservices: schema isolation, migration conflicts, and data contract discipline.
  • Handling real-time logs efficiently using Fluent Bit → Redis Streams → WebSocket pipelines.

Shipoff – Distributed Platform-as-a-Service (PaaS)

Shipoff is a distributed Platform-as-a-Service designed using microservices, gRPC communication, Redis Streams event pipelines, and full Kubernetes runtime orchestration. It automates builds, deployments, logs, routing, and project management.

1. High-Level Architecture

Shipoff consists of independently deployable services communicating through:

  • gRPC for RPC communication
  • Redis Streams for asynchronous event pipelines
  • PostgreSQL for service-level DBs
  • S3 storage for artifacts
  • Kubernetes for runtime orchestration
  • ArgoCD for GitOps
  • Next.js frontend for developer console

Core Services

  • Gateway
  • Project Service
  • Deployment Orchestrator
  • Build Service
  • Runtime Service
  • Log Service
  • Detector Service
  • Event Worker
  • CDN & Asset Manager

Each service has its own k8s deployment, protobuf contracts, and isolated DB.


2. Deployment Pipeline (Event Driven)

Every deployment runs through a strict, deterministic state machine:

QUEUED → BUILDING → PROVISIONING → PRODUCTION
            ↘ FAILED ↙       ↘ INACTIVE

Stage 1 – Webhook Trigger

GitHub webhook triggers a deployment event → written to streams.deployment.queue.

Stage 2 – Build

The Build Service creates an ephemeral Kubernetes pod to:

  • Clone repo
  • Install deps
  • Build assets / Docker image
  • Upload artifacts to storage

Build logs stream through gRPC.

Stage 3 – Provisioning

Runtime Service:

  • Creates Kubernetes Deployment
  • Applies manifests
  • Waits for readiness
  • Configures routing

Stage 4 – Production

  • CDN invalidation
  • Traffic routing
  • Old deployments become inactive

3. gRPC Communication

All internal communication uses protobuf schemas.

Example:

service DeploymentService {
  rpc CreateDeployment(CreateDeploymentRequest) returns (CreateDeploymentResponse);
  rpc StreamDeploymentLogs(StreamLogsRequest) returns (stream LogPacket);
}

4. Redis Streams Backbone

Used for async orchestration.

Important streams:

streams.deployment.queue
streams.deployment.progress
streams.logs.ingest
streams.runtime.events

5. Kubernetes Runtime

Each deployment creates:

  • Namespace
  • Deployment
  • Service
  • Autoscaler
  • ConfigMaps & Secrets

Rollbacks triggered via readiness/liveness probes.


6. Build System

Build pods use Docker Buildx and multi‑stage builds:

  1. Clone repo
  2. Install dependencies
  3. Run build
  4. Upload artifacts
  5. Emit events to Redis

7. Traffic Routing Layer

  • Cloudflare CDN
  • Traefik / NGINX ingress controller

Static → CDN
Dynamic → Container runtime


8. Observability System

  • Fluent Bit
  • Log Service (gRPC stream)
  • Prometheus
  • Grafana

Logs flow:

Pod → Fluent Bit → Redis Stream → LogService → WebSocket → Dashboard

9. Frontend Architecture (Next.js)

Using:

  • App Router
  • TanStack Query
  • shadcn/ui
  • Server Actions

Conclusion

Shipoff demonstrates expertise in:

  • Distributed systems
  • Event-driven design
  • Kubernetes + GitOps
  • gRPC microservices
  • DevOps automation
  • Real-time streaming

Design & Developed by Raghvendra Misra
© 2025. All rights reserved.