The developer of a no-code Telegram bot constructor implemented a scalable architecture to manage hundreds of bots within a single Node.js process. Instead of using resource-heavy long polling, the system uses a shared webhook endpoint that identifies bots via a unique ID in the URL and validates requests using a secret token.

Updates are stored in a PostgreSQL table, which serves as a message queue. A worker processes these updates using the 'FOR UPDATE SKIP LOCKED' SQL command to prevent race conditions. This setup avoids the need for external brokers like Redis or RabbitMQ, keeping the infrastructure lightweight and manageable.

Mini Apps are powered by a single shared runtime written in TypeScript, weighing approximately 5 KB. This runtime renders projects based on JSON descriptions, ensuring high performance even on slow mobile connections. The system uses a single process for webhooks, workers, and the management dashboard.

Load testing on a 4 vCPU, 16 GB RAM server showed stable performance with 100 to 500 clients. The current worker handles approximately 8 messages per second, with a theoretical capacity of up to 166 messages per second without network latency. The developer plans to scale by parallelizing worker tasks and separating web and worker processes.