<Youssef Mahmoud />
Back to Work

backend · 2024

Encore.ts Service Mesh

High-performance microservices infrastructure serving 50M+ requests/day with sub-2ms p99 latency, built entirely in TypeScript.

Encore.tsTypeScriptKubernetesgRPCRedis

Overview

A high-performance microservices infrastructure built entirely in TypeScript using Encore.ts — replacing a fragile REST monolith with a typed service graph capable of handling 50M+ requests per day at sub-2ms p99 latency.

The Challenge

The previous system suffered from network contract drift: 12+ services communicating over undocumented REST APIs, causing silent failures and unpredictable latency spikes under load. The team needed a way to enforce type-safe contracts across service boundaries without introducing language heterogeneity.

Key Features

  • Type-safe gRPC contracts across all service boundaries
  • Kubernetes auto-scaling with custom HPA metrics
  • Redis-backed distributed rate limiting
  • Distributed tracing with full request lineage
  • Zero-downtime rolling deployments via Encore CI/CD

Tech Stack

Encore.ts

Typed RPC framework generating gRPC stubs automatically

TypeScript

Single language across the entire service mesh

Kubernetes

Container orchestration with custom autoscaling policies

gRPC

High-throughput binary transport replacing HTTP/JSON

Redis

Shared cache and rate-limiter across service boundaries

Results & Impact

Requests handled per day50M+
p99 latency2ms
Service availability99%
Deploy frequency increase3x/day

Get in Touch

Let's Build Something Scalable.

Currently taking on select projects through my agency and exploring innovative collaborations.

Encore.ts Service Mesh | Youssef Mahmoud