I am going to create a telegram bot to handle 150k users simultaneously (per second).
I am going to use TDLib (because I do want to face Telegram Bot API limits about 30 messages per second).
Previously I always used Telegram Bot Webhook. I registered webhook to point on my server. And my server handles requests from Telegram and sends messages to users. I had no any loading on my server. Max loading is 10 or 30 users per second.
Now I am going to use TDLib. So interactions by architecture.
Interaction 1. Telegram Webhook + TDLib
It doesn't work because in logs of nginx I see that nginx doesn't receive any webhook requests when TDLib is running.
Interaction 2. Several instances of TDLib
It works. Every instance can send message and get updates. But I am worry about network traffic because every instance will get all updates.
Interaction 3. One instance of TDLib (SELECTED CURRENTLY)
One instance of TDLib gets all updates and just sends it to the queue (lets call it as in.queue).
I will write a program to handle the updates from the queue in.queue.
The processing of the update from the queue is create a response command and post it to another queue (out.queue).
The TDLib instance listens out.queue and applies command.
But I want to know how I could test my bot before deploying on prod.
Does it possible to somehow emulate such loading (150k users simultaneously) to test my architecture?