System Architecture
The application transitions from a traditional monolith to a distributed architecture. It uses an API Gateway pattern where the main API Service acts as the single entry point, handling security before routing traffic to internal containerized services.Multi-Process Container Optimization: To optimize cloud resources on Render’s free tier, the Content Service runs multiple Node.js processes (Posts, Follows, Likes) within a single Docker container using a shell script orchestration.
Service Distribution
The ecosystem is divided into specific domain-driven services:CI/CD Pipeline (GitHub Actions)
The deployment strategy is fully automated and vendor-agnostic. Every push to themain branch triggers a workflow that builds the microservices into Docker images and pushes them to a centralized registry.
Infrastructure Stack
Compute
Render: Hosts the containerized web services, automatically pulling the latest images from Docker Hub.
Database
Neon: Provides a highly available, serverless PostgreSQL instance with persistent storage.
Container Registry
Docker Hub: Acts as the centralized repository for all built microservice images.
Automation
GitHub Actions: Handles the continuous integration and delivery pipeline securely using repository secrets.