TelegramBots / Telegram.Bot.Extensions.Polling

Provides ITelegramBotClient extensions for polling updates
MIT License
46 stars 12 forks source link

handle million of users #25

Closed MarshalOfficial closed 2 years ago

MarshalOfficial commented 2 years ago

Hi there,

how to handle the load of million of users' messages and process them all without speed lag?

botClient.StartReceiving( HandleUpdateAsync, HandleErrorAsync, receiverOptions, cancellationToken: cts.Token);

I've used new thread initialization in HandleUpdateAsync and all of my backend services are async, but I have critical speed problems in busy times.

MarshalOfficial commented 2 years ago

Speed issue solved via threading that I said above.

My main problem is my country that banned Telegram and connecting via proxy is not a good idea for bot in production mode. so I published the bot on a foreign VPS server.