Skip to main content

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:

  1. MVP: MongoDB only
  2. 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 LengthDatabase SizeQuery Time
[*..4]1.5M vertices, 1.2M edges7 seconds
[*..5]Same3 min 30 sec
[*..6]Same~7 minutes
[*..10]SameNever completes

SecurityV0 Impact: Blast radius queries requiring 4-5 hop traversal would be problematic at scale.

2. No AWS Managed Service (CRITICAL)

CloudAGE Support
AWS RDS/AuroraNOT AVAILABLE
Azure Database for PostgreSQLAvailable (preview)
Google Cloud SQLNot 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

FactorMongoDBNeo4jApache AGE
MVP suitabilityExcellentOverkillPoor (performance)
Scale pathNeeds helpExcellentUnknown/Poor
Rich documentsExcellentPoorGood
Temporal queriesExcellentRequires TimescaleDBRequires temporal_tables
AWS managedAtlasAuraNone
Team familiarityHighMediumLow
Risk profileLowLowHigh

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:

  1. Variable-length path performance improves dramatically (10x+)
  2. AWS RDS adds AGE support
  3. Published enterprise case studies demonstrate scale
  4. Team becomes PostgreSQL-primary for other reasons

None of these conditions currently apply.