How munyeol-yoon/ticketnest-pub works
Main Components
a. Client Layer:
• Frontend Application (React/Next.js implied from separate FE repository)
• Connection to Load Balancer (HAProxy)
b. Load Balancing Layer:
• HAProxy for application load balancing
• Pgpool-II for database load balancing
c. Application Layer:
• Multiple NestJS server instances
• Core modules:
• Auth Module (JWT-based authentication)
• Booking Module (ticket reservation system)
• Goods Module (ticket inventory management)
• Redis Module (caching and Pub/Sub)
d. Data Layer:
• PostgreSQL database cluster
• Redis instances (separate for caching and Pub/Sub)
e. Monitoring Layer:
• Elastic APM
• Kibana dashboard
Key Relationships to Highlight
a. Traffic Flow:
• Load distribution patterns
b. Data Flow:
• Redis Pub/Sub message flow for booking operations
• Cache hit/miss patterns
• Database read/write operations through Pgpool-II
c. Monitoring Flow:
• APM data collection paths
• Logging routes
Specific Implementation Details
a. Authentication Flow:
• JWT token validation path
• User authentication process
b. Booking Process:
• Redis-based queue system
• Concurrent booking handling
• Database transaction flow
Important Architectural Patterns to Emphasize
a. High Availability:
• Multiple instance deployment
• Failover configurations
b. Scalability:
• Horizontal scaling of application servers
• Database replication
c. Performance Optimization:
• Cache layer implementation
• Message queue system
Technical Details
• TypeORM integration
• Redis cache configuration
• PostgreSQL replication
• APM integration points
• Middleware placement
Monitoring Layer
This architecture should be drawn with emphasis on the scalability and performance optimizations implemented, as these are the core strengths of the system according to the project documentation.