Hi n8n Community.
I’m currently designing a robust infrastructure for a Medical Clinic client in Latam. They handle approx 4,500 WhatsApp consultations per week (mostly audio and text) and rely heavily on phone calls, which causes a huge drop-off.
My goal is to centralize everything into a WhatsApp-first experience using a Self-Hosted “All-in-One” Stack. I wanted to share my architecture to give back to the community and ask for your feedback/roast on potential bottlenecks, especially regarding the new v2 architecture.
# The Use Case
Volume: ~20,000 incoming messages/month.
Peaks: Monday mornings are brutal (burst traffic).
Constraint: Client budget allows for high-end hardware but prefers open-source software over expensive per-seat SaaS CRMs.
Goal: 100% Uptime, Zero message loss during bursts.
# The Infrastructure
I’m deploying this on a 32GB RAM / 8 vCPU / NVMe VPS using Docker Compose.
#The Stack:
n8n (Queue Mode): Handles logic, AI routing, and API connections.
Chatwoot: For human agents to handle complex cases (handover).
NocoDB: Acts as a visual CRM/Database for the clinic directors to view patients and appointments (connected to the Postgres DB).
Shared Resources: Single Postgres 16 (with separate users/DBs for each service) and Redis instance to maximize RAM usage efficiency.
Traefik: Reverse proxy handling SSL for all subdomains.
# The Redis Logic:
To handle the WhatsApp burst traffic without overwhelming the AI Agent or creating race conditions, I’m implementing a serialized lock system in n8n:
Webhook: Receives message → Respond Immediately.
Redis Push: Pushes the payload to a list inbox:{phone_number}.
Redis Lock: Attempts to set a key lock:{phone_number} with NX (Not Exists).
If Locked: Workflow stops (the active worker will pick up the new message from the list).
If Unlocked: Worker starts → Loops through the Redis List → Processes AI Agent → Checks List again → Unlocks when empty.
# Hardware Specs
Provider: Hostinger KVM 8
RAM: 32 GB (We want to cache everything in Postgres/Redis).
Storage: 400 GB NVMe.
# My Questions for the Experts:
Logging: With 20k executions, I’m worried about disk space. I plan to set EXECUTIONS_DATA_SAVE_ON_SUCCESS=none. Is there any other “hidden” log killer I should know about in Docker?
Shared Postgres: Is it safe to share the same Postgres container for n8n, Chatwoot, and NocoDB (using different DB names/users), or should Chatwoot strictly have its own isolated container?
n8n v2 Architecture: Since I’m deploying v2.2.3, do I need to add a dedicated n8n-task-runners container to my Docker stack for this volume? Or is the standard Worker container sufficient to handle Code Node isolation efficiently?
Thanks for reading! I’ll update this thread with my results once we go live next week.
n8n version: 2.2.3 (Latest Stable)
Database (PostgreSQL): Postgres 16
n8n EXECUTIONS_PROCESS setting: queue
Running n8n via: Docker Compose
Operating system: Ubuntu 22.04 LTS