ADR-003: Reject Apache AGE
Status
Accepted (2026-02-02)
Context
Evaluated Apache AGE — a PostgreSQL extension that adds graph database functionality via openCypher query language — as a potential alternative to MongoDB/Neo4j.
What is Apache AGE?
- PostgreSQL extension providing graph database functionality
- Query language: openCypher (Neo4j's query language) + SQL
- Storage: Graph data stored in PostgreSQL tables (relational under the hood)
- License: Apache 2.0
Potential Appeal
- Single database (PostgreSQL) for relational + graph + temporal
- SQL + Cypher hybrid queries
- JSONB for rich documents
- Full ACID compliance
Decision
Do not adopt Apache AGE.
Maintain current approach:
- MVP: MongoDB only
- Future scale: Add Neo4j as thin graph index
Rationale
1. Poor Variable-Length Path Performance (CRITICAL)
Real-world benchmarks from GitHub issues show severe scaling problems:
| Path Length | Database Size | Query Time |
|---|---|---|
[*..4] | 1.5M vertices, 1.2M edges | 7 seconds |
[*..5] | Same | 3 min 30 sec |
[*..6] | Same | ~7 minutes |
[*..10] | Same | Never completes |
SecurityV0 Impact: Blast radius queries requiring 4-5 hop traversal would be problematic at scale.
2. No AWS Managed Service (CRITICAL)
| Cloud | AGE Support |
|---|---|
| AWS RDS/Aurora | NOT AVAILABLE |
| Azure Database for PostgreSQL | Available (preview) |
| Google Cloud SQL | Not available |
Self-managed PostgreSQL on EC2 loses operational benefits of managed services.
3. No Graph Performance Advantage
AGE uses PostgreSQL's relational storage model — graph traversal requires index lookups at each hop (like MongoDB), not direct pointer chasing (like Neo4j).
No performance advantage over MongoDB's application-level traversal.
4. Limited Production Track Record
- No published enterprise case studies
- No formal performance benchmarks (AGE vs Neo4j)
- Community reports of users migrating FROM AGE to Neo4j for performance
5. New Technology Risk
Team would need to learn:
- Cypher query language
- AGE-specific patterns
- PostgreSQL extension management
Without clear benefits over existing approach.
Comparison Summary
| Factor | MongoDB | Neo4j | Apache AGE |
|---|---|---|---|
| MVP suitability | Excellent | Overkill | Poor (performance) |
| Scale path | Needs help | Excellent | Unknown/Poor |
| Rich documents | Excellent | Poor | Good |
| Temporal queries | Excellent | Requires TimescaleDB | Requires temporal_tables |
| AWS managed | Atlas | Aura | None |
| Team familiarity | High | Medium | Low |
| Risk profile | Low | Low | High |
Consequences
Positive
- Avoid unproven technology at critical layer
- Maintain simple, proven architecture
- Keep operational complexity low
- Preserve MongoDB → Neo4j migration path
Negative
- May revisit if AGE matures significantly
- Miss potential PostgreSQL unification
When to Reconsider
Apache AGE could be reconsidered if:
- Variable-length path performance improves dramatically (10x+)
- AWS RDS adds AGE support
- Published enterprise case studies demonstrate scale
- Team becomes PostgreSQL-primary for other reasons
None of these conditions currently apply.
Related Documents
- ADR-001 - MongoDB-only decision
- ADR-002 - Single collection decision
- 03-database.md - Database architecture