Microservices & Ports

Overview of the 4 core microservices and supporting infrastructure components.

API Gateway

Go 1.24

Port: 8080 (HTTP)

Role: Entry point for external traffic. Handles JWT verification, rate limiting, and request routing.

Dependencies: Payment Service, Account Service, SPIRE Agent, Jaeger.

Payment Service

Go 1.24

Port: 8081 (gRPC)

Role: Orchestrates payment flow. Validates requests, ensures idempotency, and publishes events.

Dependencies: Account Service, Kafka, PostgreSQL, Redis, SPIRE Agent.

Account Service

Go 1.24

Port: 50051 (gRPC)

Role: Manages user balances. Handles transactional updates and read-heavy operations.

Dependencies: PostgreSQL, Redis, Kafka Consumer, SPIRE Agent.

Notification Service

Java 21 / Spring Boot

Port: 8083 (HTTP)

Role: Consumes payment events and sends notifications (mocked logging).

Dependencies: Kafka Consumer, Jaeger.

Infrastructure Components

Component Type Port Function
PostgreSQL Database 5432 Primary data store (Payments & Accounts schemas).
Apache Kafka Message Broker 9092 Asynchronous event bus for decouping services.
Redis Cache 6379 Idempotency keys and balance caching.
SPIRE Server Identity Provider 8081 Issues SVIDs for mTLS authentication.
Jaeger Observability 16686 (UI) / 4317 (OTLP) Distributed tracing visualization.