Port Assignments
This section documents every port assignment in the MATIH Enterprise Platform. The canonical source of truth for port assignments is scripts/config/components.yaml in the platform repository. If any discrepancy exists between this documentation and that file, the YAML file takes precedence.
To validate that deployed services match the defined port assignments, run:
./scripts/tools/validate-ports.shTo programmatically access a service port in shell scripts, source the port library:
source scripts/lib/core/ports.sh
PORT=$(port_get_service_port "ai-service")Port Allocation Strategy
Ports are allocated by category to prevent conflicts and make the system predictable:
| Range | Category | Description |
|---|---|---|
| 3000-3099 | Frontend Workbenches | React/Next.js frontend applications |
| 5000-5099 | Proxies and Gateways | Authentication proxies, internal gateways |
| 8000-8009 | Python FastAPI Services | AI, ML, Data Quality, and other Python services |
| 8080-8099 | Java Spring Boot Services | Control Plane and Data Plane Java services |
| 8100-8199 | Specialized Services | Ontology and other specialized Python services |
| 8888 | Config Service | Spring Cloud Config Server (conventional port) |
| 8098 | Render Service | Node.js server-side rendering |
Control Plane Services
All Control Plane services are Java Spring Boot 3.2 applications deployed in the matih-control-plane Kubernetes namespace.
| Service | Port | Type | Database | Health Endpoint | Dependencies |
|---|---|---|---|---|---|
| api-gateway | 8080 | Java Spring Boot | None | /actuator/health | iam-service, config-service |
| iam-service | 8081 | Java Spring Boot | iam | /api/v1/actuator/health | PostgreSQL, Redis |
| tenant-service | 8082 | Java Spring Boot | tenant | /api/v1/actuator/health | PostgreSQL, Redis, Kafka, iam-service |
| platform-registry | 8084 | Java Spring Boot | registry | /api/v1/actuator/health | PostgreSQL |
| notification-service | 8085 | Java Spring Boot | notification | /api/v1/actuator/health | PostgreSQL, Redis, Kafka |
| audit-service | 8086 | Java Spring Boot | audit | /api/v1/actuator/health | PostgreSQL, Elasticsearch, Kafka |
| billing-service | 8087 | Java Spring Boot | billing | /api/v1/actuator/health | PostgreSQL, Redis, Kafka |
| observability-api | 8088 | Java Spring Boot | None | /api/v1/actuator/health | Prometheus, Elasticsearch |
| infrastructure-service | 8089 | Java Spring Boot | infrastructure | /api/v1/actuator/health | PostgreSQL, Redis |
| config-service | 8888 | Java Spring Boot | config | /api/v1/actuator/health | PostgreSQL, Redis |
Resource Allocations (Control Plane)
All Control Plane services share the same base resource profile:
| Resource | Request | Limit |
|---|---|---|
| CPU | 100m | 500m |
| Memory | 256Mi | 512Mi |
Replica Counts (Control Plane)
| Service | Dev | Staging | Production |
|---|---|---|---|
| api-gateway | 1 | 2 | 3 |
| iam-service | 1 | 2 | 3 |
| tenant-service | 1 | 2 | 3 |
| platform-registry | 1 | 2 | 2 |
| notification-service | 1 | 2 | 3 |
| audit-service | 1 | 2 | 3 |
| billing-service | 1 | 2 | 3 |
| observability-api | 1 | 2 | 2 |
| infrastructure-service | 1 | 2 | 2 |
| config-service | 1 | 2 | 3 |
Data Plane Services
Data Plane services use a mix of Java Spring Boot, Python FastAPI, and Node.js. They are deployed in the matih-data-plane Kubernetes namespace.
| Service | Port | Type | Database | Health Endpoint | Dependencies |
|---|---|---|---|---|---|
| query-engine | 8080 | Java Spring Boot | query | /api/v1/actuator/health | Trino, PostgreSQL |
| catalog-service | 8086 | Java Spring Boot | catalog | /api/v1/actuator/health | PostgreSQL, OpenMetadata |
| semantic-layer | 8086 | Java Spring Boot | semantic | /api/v1/actuator/health | PostgreSQL, Redis, Trino |
| bi-service | 8084 | Java Spring Boot | bi | /api/v1/actuator/health | PostgreSQL, Redis, semantic-layer |
| pipeline-service | 8092 | Java Spring Boot | pipeline | /api/v1/actuator/health | PostgreSQL, Kafka, Temporal |
| data-plane-agent | 8085 | Java Spring Boot | None | /api/v1/actuator/health | Redis, Kafka |
| ai-service | 8000 | Python FastAPI | ai | /health | PostgreSQL, Redis, vLLM |
| ml-service | 8000 | Python FastAPI | ml | /health | PostgreSQL, Redis, Ray, MLflow |
| data-quality-service | 8000 | Python FastAPI | quality | /health | PostgreSQL, Trino |
| governance-service | 8080 | Python FastAPI | governance | /health | PostgreSQL, OpenMetadata, Polaris |
| ops-agent-service | 8080 | Python FastAPI | ops_agent | /health | PostgreSQL, Redis, Kafka, AI Service, ChromaDB |
| ontology-service | 8101 | Python FastAPI | ontology | /health | PostgreSQL, Elasticsearch |
| render-service | 8098 | Node.js | None | /health | Redis |
Resource Allocations (Data Plane)
| Service | CPU Request | CPU Limit | Memory Request | Memory Limit |
|---|---|---|---|---|
| query-engine | 200m | 1000m | 512Mi | 1Gi |
| catalog-service | 100m | 500m | 256Mi | 512Mi |
| semantic-layer | 200m | 1000m | 512Mi | 1Gi |
| bi-service | 100m | 500m | 256Mi | 512Mi |
| pipeline-service | 100m | 500m | 256Mi | 512Mi |
| data-plane-agent | 100m | 500m | 256Mi | 512Mi |
| ai-service | 500m | 2000m | 1Gi | 4Gi |
| ml-service | 200m | 1000m | 512Mi | 2Gi |
| data-quality-service | 100m | 500m | 256Mi | 512Mi |
| governance-service | 100m | 500m | 256Mi | 512Mi |
| ops-agent-service | 500m | 2000m | 1Gi | 4Gi |
| ontology-service | 100m | 500m | 256Mi | 512Mi |
| render-service | 100m | 500m | 256Mi | 512Mi |
Replica Counts (Data Plane)
| Service | Dev | Staging | Production |
|---|---|---|---|
| query-engine | 1 | 2 | 3 |
| catalog-service | 1 | 2 | 3 |
| semantic-layer | 1 | 2 | 3 |
| bi-service | 1 | 2 | 3 |
| pipeline-service | 1 | 2 | 3 |
| data-plane-agent | 1 | 2 | 3 |
| ai-service | 1 | 2 | 3 |
| ml-service | 1 | 2 | 3 |
| data-quality-service | 1 | 2 | 2 |
| governance-service | 1 | 2 | 2 |
| ops-agent-service | 1 | 2 | 2 |
| ontology-service | 1 | 2 | 2 |
| render-service | 1 | 2 | 3 |
Frontend Workbenches
All frontend workbenches are React/Next.js applications deployed in the matih-system Kubernetes namespace. In development, they serve on their assigned ports via Next.js dev server. In production, they run behind NGINX with the API Gateway handling API proxying.
| Application | Port | Type | Health Endpoint | Dependencies |
|---|---|---|---|---|
| bi-workbench | 3000 | React/Next.js | /api/health | api-gateway |
| ml-workbench | 3001 | React/Next.js | /api/health | api-gateway |
| data-workbench | 3002 | React/Next.js | /api/health | api-gateway |
| agentic-workbench | 3003 | React/Next.js | /api/health | api-gateway |
| control-plane-ui | 3004 | React/Next.js | /api/health | api-gateway |
| data-plane-ui | 3005 | React/Next.js | /api/health | api-gateway |
| ops-workbench | 3006 | React/Next.js | /api/health | api-gateway |
| onboarding-ui | 3007 | React/Next.js | /api/health | api-gateway |
Resource Allocations (Frontend)
All frontend workbenches share the same resource profile:
| Resource | Request | Limit |
|---|---|---|
| CPU | 100m | 500m |
| Memory | 128Mi | 512Mi |
Internal Service Ports
These ports are used by supporting infrastructure and proxy services.
| Service | Port | Type | Namespace | Description |
|---|---|---|---|---|
| auth-proxy | 5000 | Proxy | matih-system | Authentication proxy for services that do not natively support JWT |
Platform Infrastructure Ports
These ports are used by platform infrastructure components. They are not exposed externally and are only accessible within the Kubernetes cluster.
| Component | Port(s) | Namespace | Description |
|---|---|---|---|
| PostgreSQL | 5432 | matih-system | Primary relational database |
| Redis | 6379 | matih-system | In-memory cache and session store |
| Kafka (Strimzi) | 9092 (plain), 9093 (TLS) | matih-system | Event streaming broker |
| Elasticsearch | 9200 (HTTP), 9300 (transport) | matih-system | Full-text search and log storage |
| ChromaDB | 8000 | matih-system | Vector database for RAG |
| Qdrant | 6333 (HTTP), 6334 (gRPC) | matih-data-plane | Vector store for schema embeddings |
| Trino | 8080 (coordinator) | matih-data-plane | Federated SQL query engine |
| ClickHouse | 8123 (HTTP), 9000 (native) | matih-data-plane | OLAP analytics database |
| StarRocks FE | 8030 (HTTP), 9030 (MySQL) | matih-data-plane | StarRocks frontend |
| StarRocks BE | 8040 | matih-data-plane | StarRocks backend |
| Hive Metastore | 9083 | matih-data-plane | Metadata service for Trino |
| OpenMetadata | 8585 | matih-data-plane | Data catalog and governance |
| Polaris | 8181 | matih-data-plane | Iceberg catalog service |
| Temporal | 7233 (frontend), 7234 (history), 7235 (matching) | matih-data-plane | Workflow orchestration |
| Airflow | 8080 (webserver) | matih-data-plane | DAG-based workflow scheduler |
| Ray | 6379 (GCS), 8265 (dashboard), 10001 (client) | matih-data-plane | Distributed compute framework |
| MLflow | 5000 | matih-data-plane | ML experiment tracking |
| Feast | 6566 | matih-data-plane | Feature store online serving |
| Spark Connect | 15002 | matih-data-plane | Spark Connect server |
| vLLM | 8000 | matih-data-plane | LLM inference server |
| Triton | 8000 (HTTP), 8001 (gRPC), 8002 (metrics) | matih-data-plane | Model inference server |
Observability Stack Ports
| Component | Port(s) | Namespace | Description |
|---|---|---|---|
| Prometheus | 9090 | matih-monitoring | Metrics collection and querying |
| Alertmanager | 9093 | matih-monitoring | Alert routing and deduplication |
| Grafana | 3000 | matih-monitoring | Metrics visualization and dashboards |
| Loki | 3100 | matih-monitoring | Log aggregation |
| Tempo | 3200 (query), 4317 (OTLP gRPC), 4318 (OTLP HTTP) | matih-monitoring | Distributed tracing |
| OTel Collector | 4317 (gRPC), 4318 (HTTP), 8888 (metrics) | matih-monitoring | Telemetry collection and routing |
| Thanos | 10901 (gRPC), 10902 (HTTP) | matih-monitoring | Long-term metrics storage |
Port Conflict Notes
The following ports are shared across services that run in different namespaces and never conflict at the network level:
| Port | Services Using It | Conflict Risk |
|---|---|---|
| 8000 | ai-service, ml-service, data-quality-service, ChromaDB, vLLM, Triton | No conflict: separate pods/namespaces |
| 8080 | api-gateway, query-engine, governance-service, ops-agent-service, Trino, Airflow | No conflict: separate pods/namespaces |
| 8084 | platform-registry, bi-service | No conflict: different namespaces |
| 8086 | audit-service, catalog-service, semantic-layer | No conflict: different namespaces |
| 3000 | bi-workbench, Grafana | No conflict: different namespaces (matih-system vs matih-monitoring) |
When accessing services from within the cluster, always use the fully qualified domain name (FQDN) to avoid ambiguity:
http://{service-name}.{namespace}.svc.cluster.local:{port}For example:
http://ai-service.matih-data-plane.svc.cluster.local:8000
http://iam-service.matih-control-plane.svc.cluster.local:8081
http://prometheus.matih-monitoring.svc.cluster.local:9090Deployment Phase Order
Services are deployed in a strict dependency order across 14 phases. Each phase must complete before the next begins. This order is defined in scripts/config/components.yaml under deployment_phases.
| Phase | Name | Namespace | Components |
|---|---|---|---|
| 0 | Terraform Infrastructure | N/A | Cloud resources (AKS/EKS/GKE, networking, DNS, Key Vault) |
| 1 | Build Setup | N/A | Registry authentication, build tooling |
| 2 | Build Images | N/A | Docker image builds for all services |
| 3 | Package Charts | N/A | Helm chart packaging and dependency resolution |
| 4 | Data Infrastructure | matih-system | PostgreSQL, Redis, Kafka, Elasticsearch |
| 5 | Observability Stack | matih-monitoring | Prometheus, Grafana, Loki, Tempo, OTel Collector |
| 6 | Compute Engines | matih-data-plane | Spark, Flink, Hive Metastore, Trino, ClickHouse |
| 7 | Data Catalogs | matih-data-plane | Polaris, OpenMetadata |
| 8 | Workflow Orchestration | matih-data-plane | Temporal, Airflow |
| 9 | ML Infrastructure | matih-data-plane | Ray, MLflow, Feast, JupyterHub |
| 10 | AI Infrastructure | matih-data-plane | vLLM, Triton, Copilot (requires GPU nodes) |
| 11 | Control Plane | matih-control-plane | All 10 Control Plane services |
| 12 | Data Plane | matih-data-plane | All 14 Data Plane services |
| 13 | Frontend | matih-system | All 8 frontend workbenches |
| 14 | Validation | N/A | Health checks, smoke tests, connectivity validation |
Namespace Summary
| Namespace | Purpose | Service Count |
|---|---|---|
matih-system | Shared infrastructure (PostgreSQL, Redis, Kafka, Elasticsearch, frontend workbenches) | ~12 |
matih-control-plane | Control Plane microservices | 10 |
matih-data-plane | Data Plane microservices and compute engines | ~30 |
matih-monitoring | Observability stack (Prometheus, Grafana, Loki, Tempo, OTel) | 6 |
matih-ingress | Shared NGINX Ingress Controller | 1 |
matih-build | Build pipeline agents and image build jobs | Variable |
matih-tenant-{slug} | Per-tenant dedicated workloads (enterprise tier) | Variable per tenant |
Port Validation
To detect port drift between this documentation, the components.yaml configuration file, and actual running services, use the validation script:
./scripts/tools/validate-ports.shThis script performs the following checks:
| Check | Description |
|---|---|
| Configuration Consistency | Verifies all ports in components.yaml match Helm chart values.yaml files |
| Service Port Match | Confirms Kubernetes Service port definitions match expected values |
| Health Endpoint Verification | Validates that each service's health endpoint responds on the documented port |
| Duplicate Detection | Identifies any unintended port duplicates within the same namespace |
| Range Compliance | Confirms all ports fall within the documented allocation ranges |
Programmatic Port Access
For shell scripts that need to reference service ports, use the port library:
source scripts/lib/core/ports.sh
# Get a service port by name
AI_PORT=$(port_get_service_port "ai-service")
echo "AI Service port: ${AI_PORT}" # Output: 8000
# Get health endpoint for a service
HEALTH_PATH=$(port_get_health_path "ai-service")
echo "Health path: ${HEALTH_PATH}" # Output: /health
# Construct full health URL
HEALTH_URL="http://ai-service.matih-data-plane.svc.cluster.local:${AI_PORT}${HEALTH_PATH}"This approach ensures that port numbers are never hardcoded in scripts and always reference the single source of truth.