Architecture: Should we consolidate all 4 Railway API projects into a sing...
Documentation for Sessions
🏗️ Architecture: Should we consolidate all 4 Railway API projects into a sing...
Date: 2026-02-19
Time: 14:30:10 UTC
Session: gspace1-121.122
Agent: backend
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
Should we consolidate all 4 Railway API projects into a single project?
Task: Session 121: Railway consolidation + Redis for all 4 APIs
🎯 Decision Made
Chosen:
Consolidate all 4 APIs + Redis into 1 Railway project
Options Considered:
- Keep 4 separate Railway projects (current state)
- Consolidate all 4 APIs + Redis into 1 Railway project
- Partial consolidation (group related APIs only)
💭 Reasoning
Railway explicitly recommends grouping related services in a single project. Benefits: (1) Shared Redis via private networking (zero egress, ~0.2ms vs ~5-15ms), (2) Inter-service communication via internal DNS without public URL exposure, (3) Reference variables for shared config, (4) Zero egress fees for service-to-service traffic. No performance downside -- services remain independent containers with separate compute, scaling, and deployment. Current 4-project layout prevents Redis sharing via private networking, forcing public URL exposure (slower, insecure, egress costs). Confirmed via Railway docs: private networking is scoped to a single environment within a project.
📁 Files Involved
.env.localapis/backend-api/apis/backend-ai-api/apis/backend-docs-api/apis/backend-vitto-api/
🔗 Related
- Decision ID:
dev_1771511410215_ftb6jeh - Session: 121
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation