Seeking Advice on Optimizing the Tech Stack for My SaaS Web Project [closed]

I’m working on a SaaS-based web app project and could use some insights from the community. Here’s a quick rundown of my stack:

Frontend: Next.js
Backend: Node.js (TypeScript) REST APIs
Database: PostgreSQL
Real-time: Socket.io for chat and notifications
Other Tech: Planning to integrate Kafka and Redis soon
The app operates on a multi-tenant architecture, where companies register and I provide each company with separate databases and domains for their services. Everything is subscription-based. Now, I’m looking for advice on a few key areas:

Single API Endpoint for Multi-Tenant System: Should I stick with a single API block to serve all platforms, or could this approach become overloaded? Could it create bottlenecks or other issues at scale? I’m hosting on KVM v4 VPS with Hostinger, so I’m conscious of the limitations.

Tech Stack Adjustments: Do I need to rethink my current stack? I’ve had suggestions to adopt Docker for containerization—could this be beneficial for managing microservices? If so, how would it improve the current setup?

Subscription Management: What’s the best way to handle blocking access when a company’s subscription expires or goes unpaid? Should I disable API access, or is there a more effective method you’d recommend for this kind of scenario?

Kafka and Nginx: On the VPS, I’m running Nginx and planning to integrate Apache Kafka. I’ve been told that Nginx can act as a reverse proxy for Kafka (for example, using Kafka REST Proxy). Could someone explain the setup for this or point me to the best approach for handling it?

I appreciate any guidance or best practices you can share.

Thanks in advance!

Moeez Ahmed

I’m in the process of refurbishing my project and want to first confirm if my current tech stack is solid, especially since I’m planning to add Kafka and Redis for better performance. Additionally, I’m trying to understand how Docker can help improve my setup.

I’m also debating whether to use a single API to serve all tenants or provide each tenant with their own APIs to better handle workload and boost performance. Finally, regarding subscription control, on the API side, should I block API responses for tenants with expired subscriptions, and if so, what’s the best approach for implementing this?