tdlib / telegram-bot-api

Telegram Bot API server
https://core.telegram.org/bots
Boost Software License 1.0
3.12k stars 593 forks source link

[Feature request]add cluster mode #635

Open LimLex opened 3 weeks ago

LimLex commented 3 weeks ago

please,add cluster mode,sir.so we can decrease the delay caused by different datacenter problem.(user's and bot's)

levlam commented 3 weeks ago

What do you mean?

LimLex commented 3 weeks ago

What do you mean?

There is currently an issue with my local server where it cannot deploy my bot in cluster mode. If you can add compatibility for cluster mode, it will solve the following two problems:

  1. The performance bottleneck caused by a single machine. If I have multiple machines and can use a cluster, I will be able to improve performance at a lower cost.
  2. When I tried to deploy my local server, I found that it can only communicate well with a few specific Telegram data centers, while communication with other data centers is slow. If you support cluster mode, it would allow bot nodes to be deployed near different data centers, improving communication speed.
levlam commented 3 weeks ago

This is not possible and even it would be possible, it can't improve communication speed with different datacenters. Data transmission speed can't be faster than the speed of light.

LimLex commented 3 weeks ago

This is not possible and even it would be possible, it can't improve communication speed with different datacenters. Data transmission speed can't be faster than the speed of light.

Why is that? Could you explain it for learning purposes? Thank you very much!

levlam commented 3 weeks ago

Users from multiple locations can be in the same chat.

Also, there is no way to provide consistency guarantees if bot communicates with multiple datacenters without making the bot extremely slow increasing latency multiple times.

LimLex commented 3 weeks ago

Thank you very much! Is there a method that can solve this problem?

levlam commented 2 weeks ago

There is no way to speed up bot responses for all users around the world.