Open Grommash9 opened 1 month ago
We've run into the same issue when trying to scale our bot in Kubernetes. It would be great if the Telegram API could natively distribute updates across pods without needing to rely on custom solutions like Kafka. Could cluster mode support be considered in future updates? @levlam
+1
You can distribute the updates sent to webhook in any way you want. You can use a message broker, or a reverse proxy. There is no need to implement all these software in the Bot API server.
Do you maybe know about any example or best practices about it?
Hello all! I want to make my project horizontally scalable.
I am trying to deploy my bot to kubernetes. I have local bot api instance what is calling a cluster of my bot's.
Webhook url is my cluster url, if I am doing any curl request manually from telegram bot api pod - it's working and I am able to see how balancer sending requests for different pods, but it's not working for telegram updates - all of them are going to same POD, I am not sure I understand how it's selected and why is it working like that. Is it like session or something like that?
People in chat's recommending to create a script what will get all the updates and put them into kafka for bot instances to pick them up, but it feels like reinventing the wheel.
Is there are any setting to allow telegram communications working in cluster mode or maybe a flag for it? And if there is nothing like that can it be added? Or it's a bad idea?
Thanks!