Service Consolidation Summary - Executive View
Service Consolidation Summary - Executive View
Created: 2026-02-01 Related: ADR-001, Issue #66, Full Analysis
The Challenge
The Agile Network platform currently operates across 190 repositories: - 59 active Java/Spring microservices (plus 23 archived) - 8 active BPM process repos (plus 5 archived) - 14 frontend applications (2 active monorepos + 12 legacy) - 30+ database migration repos (all deprecated) - 75+ repositories ready for immediate archival
This fragmentation creates: - High operational complexity (coordinating 100+ services) - Slow deployment cycles (need to coordinate changes across services) - Difficult onboarding (4-6 weeks for new developers) - Increased infrastructure costs - Knowledge silos (who owns what?)
The Solution
Consolidate to 15 domain-aligned services following Domain-Driven Design principles:
graph TB
subgraph "Identity Layer"
identity[1. identity-service]
profile[2. profile-service]
end
subgraph "Content Layer"
content[3. content-service]
knowledge[4. knowledge-graph]
end
subgraph "Live Experiences"
broadcast[5. broadcast-service]
shoutout[6. shoutout-service]
event[7. event-service]
end
subgraph "Commerce"
commerce[8. commerce-service]
end
subgraph "Communication"
notification[9. notification-service]
end
subgraph "Platform"
journey[10. journey-service]
bpm[11. bpm-service]
gateway[12. api-gateway]
end
subgraph "Operations"
admin[13. admin-service]
analytics[14. analytics-service]
config[15. config-service]
end
style identity fill:#e1f5ff
style profile fill:#e1f5ff
style content fill:#fff4e1
style knowledge fill:#fff4e1
style broadcast fill:#ffe1f5
style shoutout fill:#ffe1f5
style event fill:#ffe1f5
style commerce fill:#e1ffe1
style notification fill:#f5e1ff
style journey fill:#f0f0f0
style bpm fill:#f0f0f0
style gateway fill:#f0f0f0
style admin fill:#ffe1e1
style analytics fill:#ffe1e1
style config fill:#ffe1e1
Impact Summary
| Metric | Before | After | Improvement |
|---|---|---|---|
| Active Services | 107+ | 15 | -86% |
| Deployment Coordination | Manual, weekly | Automated, daily | 10x faster |
| Infrastructure Cost | Baseline | -40% | $XXk/year savings |
| Developer Onboarding | 4-6 weeks | 1-2 weeks | 3x faster |
| Mean Time to Recovery | 2-4 hours | <30 minutes | 4-8x faster |
| Repositories | 190 | ~35 | -82% |
Repository Distribution
Current State
| Category | Active | Archived | Total |
|---|---|---|---|
| Services | 59 | 32 | 91 |
| BPM Processes | 8 | 5 | 13 |
| Frontends | 5 | 7 | 12 |
| Databases | 0 | 30+ | 30+ |
| Infrastructure | 9 | 1 | 10 |
| Libraries | 1 | 2 | 3 |
| Other | 22 | 15 | 37 |
| TOTAL | 104 | 92 | 196 |
Consolidation Plan
pie title "Repository Disposition"
"Keep Active (35)" : 35
"Archive Immediately (75)" : 75
"Consolidate to Nexgen (42 services)" : 42
"Low Activity - Evaluate (20)" : 20
Consolidation Roadmap
Phase 1: Foundation (Months 1-3)
- config-service
- identity-service
- api-gateway
Goal: Foundational services enabling gradual migration
Phase 2: Low-Risk (Months 3-6)
- journey-service
- shoutout-service
- event-service
- analytics-service
Goal: Build confidence with non-critical services
Phase 3: Core Domain (Months 6-12)
- profile-service (8 services consolidated)
- notification-service (11 services consolidated)
- content-service (10 services consolidated)
Goal: Migrate majority of services
Phase 4: Revenue Critical (Months 9-15)
- commerce-service (8 services, Stripe/Dwolla)
- broadcast-service (6 services, Mux/Jitsi)
Goal: Zero-downtime migration of revenue services
Phase 5: Knowledge & Orchestration (Months 12-18)
- knowledge-graph
- bpm-service
- admin-service
Goal: Complete complex integrations
Phase 6: Cleanup (Months 18-20)
- Archive 75+ legacy repos
- Decommission old infrastructure
- Knowledge transfer
Goal: Clean slate, modern architecture
Top 15 Services by Consolidation Size
| Target Service | Source Services | Total LOC | Complexity |
|---|---|---|---|
| broadcast-service | 6 services + BPM | 238,683 | High |
| content-service | 10 services + BPM | 133,117 | High |
| knowledge-graph | 2 services | 89,439 | Medium |
| notification-service | 11 services | 44,891 | Medium |
| commerce-service | 8 services + BPM | 42,599 | High |
| profile-service | 8 services | 40,698 | Medium |
| bpm-service | 8 BPM definitions | 25,764 | Medium |
| analytics-service | 2 services + integrations | 24,705 | Low |
| shoutout-service | 2 services + BPM | 23,359 | Low |
| journey-service | 1 service | 12,095 | Low |
| event-service | 2 services + BPM | 9,557 | Low |
| identity-service | 3 services | 7,822 | Low |
| config-service | New service | ~8,000 | Low |
| api-gateway | New + graphql-migration | ~6,000 | Medium |
| admin-service | New + extracted logic | ~15,000 | Medium |
Archive Candidates (75 Repos)
By Category
pie title "Archive Candidates by Type"
"Services (32)" : 32
"Database Repos (30)" : 30
"Frontend Apps (7)" : 7
"BPM (5)" : 5
"POCs (3)" : 3
"Libraries (2)" : 2
"Other (15)" : 15
Top 10 Largest Archives (by LOC)
- peeq-documentation (598,511 LOC) - Markdown docs (2022)
- peeq-fan-ionic (637,355 LOC) - Legacy mobile (2022)
- peeq-fan-fe (648,650 LOC) - Legacy frontend (2023)
- peeq-meetandgreet-for-iOS (545,682 LOC) - iOS app (2021)
- peeq-load (499,961 LOC) - Load testing (2022)
- peeq-kibana (359,770 LOC) - Custom Kibana (2021)
- peeq-keycloak-archive (357,466 LOC) - Old Keycloak (2022)
- peeq-conference (186,249 LOC) - DO NOT ARCHIVE (active, migrate to broadcast-service)
- peeq-broadcast-query (64,468 LOC) - Deprecated query service (2021)
- peeq-sandbox (67,899 LOC) - Sandbox environment (2022)
Total LOC to Archive: ~3.8 million lines (60% of codebase)
Technology Modernization
Current State (Legacy)
- Java 11-17 (mixed versions)
- Spring Boot 2.x - 3.x (mixed)
- PostgreSQL 12-14 (mixed)
- RabbitMQ messaging
- Elasticsearch 7.x
- Camunda 7.x
Target State (Nexgen)
- Java 17 LTS (standardized)
- Spring Boot 3.2+ (latest)
- PostgreSQL 15+ (unified)
- Kafka 3.x (event streaming)
- Elasticsearch 8.x (search)
- Camunda 8.x (cloud-native BPM)
- GraphQL Federation (unified API)
- OpenTelemetry (observability)
Risk Mitigation
High-Risk Services
| Service | Risk | Mitigation Strategy |
|---|---|---|
| commerce-service | Revenue impact | Blue-green deployment, 2-4 week parallel run, feature flags |
| broadcast-service | Live event failures | Parallel infrastructure, gradual cutover, legacy fallback |
| Data Migration | Data loss | Comprehensive backups, validation scripts, rollback plan |
| Stripe/Dwolla Integration | Payment failures | Integration test suite, contract testing, sandbox validation |
Quality Gates
Every service migration requires: - [ ] 100% integration test coverage - [ ] Contract tests with dependencies - [ ] Load testing (same or better performance) - [ ] Security scanning (no new vulnerabilities) - [ ] Parallel run (2+ weeks for critical services) - [ ] Rollback plan documented and tested
Success Criteria
Technical Metrics
Business Metrics
Operational Metrics
Investment Required
Team Composition (Recommended)
Migration Tiger Team (6-8 engineers)
- 2 Senior Architects
- 4-6 Senior/Staff Engineers
- 1 SRE/DevOps Lead
Duration: 18-20 months (phased approach)
Parallel Work Streams:
- Stream 1: Foundation & Low-Risk (3 engineers)
- Stream 2: Core Domain (3 engineers)
- Stream 3: Revenue Critical (2 engineers + architect)
Alternative Approaches
| Approach | Team Size | Duration | Risk | Cost |
|---|---|---|---|---|
| Phased (Recommended) | 6-8 engineers | 18-20 months | Low | Baseline |
| Big Bang | 12+ engineers | 6-8 months | High | 1.5x cost |
| Gradual (Current Pace) | 2-3 engineers | 36+ months | Low | 0.5x cost |
Recommendation: Phased approach balances risk, cost, and business continuity.
Next Steps
Week 1-2 (Immediate)
Month 1
Month 2-3
Month 6
Questions & Answers
Q: Why not a monolith? A: 15 services provide domain isolation, independent deployability, and team autonomy while avoiding microservice complexity.
Q: Why consolidate instead of rewrite? A: Consolidation preserves business logic and reduces risk. We modernize incrementally while maintaining functionality.
Q: What about existing data? A: Data migration is included in each phase. We use blue-green deployments and parallel runs to ensure zero data loss.
Q: Can we go faster? A: Yes, with more resources (12+ engineers). However, faster increases risk and coordination overhead.
Q: What if we don’t consolidate? A: Continued operational complexity, slower feature velocity, higher costs, and technical debt accumulation.
For detailed analysis, see: Service Consolidation Analysis
Related ADRs: ADR-001 (Service Consolidation Strategy)
Related Issues: #66 (Service Consolidation Planning)