0%
Backend 2025

Transaction Processing API

Spring WebFlux + gRPC

As Software Engineer at Jama Wealth, architected reactive REST API gateway translating HTTP/JSON to gRPC/Protocol Buffers for internal microservices. Built with Spring Boot 3 WebFlux for non-blocking I/O. Implemented connection pooling, circuit breaker patterns, and comprehensive error mapping achieving high throughput with low latency.

5K RPS
Throughput
42ms
P95 Latency
60%
Payload Reduction
99.95%
Uptime
100+
Connections
99.98%
Success Rate
01

The Challenge

Frontend applications needed RESTful APIs but backend microservices communicated via gRPC. Direct gRPC from browsers wasn't feasible. Needed a high-performance translation layer that wouldn't become a bottleneck, handling 5K+ RPS while maintaining sub-50ms latency and providing HTTP-friendly error handling.

02

The Solution

Built reactive REST gateway using Spring WebFlux with non-blocking gRPC clients. Implemented request/response translation between JSON and Protocol Buffers, connection pooling, circuit breakers, and comprehensive error mapping. Used R2DBC for reactive database operations and Redis for caching.

Technology Stack

Spring Boot 3
Spring WebFlux
gRPC
Protocol Buffers
Java 21
R2DBC
Redis
PostgreSQL
Resilience4j
OpenTelemetry
Kubernetes
03

Architecture

  • Reactive programming model
  • Non-blocking I/O (WebFlux)
  • API Gateway pattern
  • Protocol translation layer
  • Connection pooling
  • Circuit breaker and retry
  • Request/response caching
  • Distributed tracing
  • Load balancing
  • Horizontal pod autoscaling
04

Key Features

01
Reactive REST API with Spring WebFlux
02
HTTP/JSON to gRPC/Protobuf translation
03
Non-blocking gRPC client integration
04
Connection pooling for gRPC channels
05
Circuit breaker patterns (Resilience4j)
06
Request/response validation
07
Comprehensive error mapping
08
Rate limiting and throttling
09
Distributed tracing (OpenTelemetry)
10
Metrics export (Prometheus)
11
Redis caching layer
12
OAuth2 + JWT authentication
05

Results & Impact

  • Architected reactive REST-to-gRPC gateway using Spring WebFlux
  • Achieved 5,000+ RPS throughput with P95 latency 42ms
  • Implemented connection pooling + backpressure handling for 100+ concurrent streams
  • Optimized database queries from O(n²) to O(log n) using indexing strategies
  • Reduced payload size 60% via Protocol Buffers vs JSON
  • Deployed with circuit breaker patterns achieving 99.95% uptime