Are you going through these updates one by one? not

a best choice though

22 ответов

19 просмотров

You're still refusing to listen to what were saying. Telegram CAN send more than 100 updates. And yes, if you want to handle more updates, you WILL need to use more threads, so you can use your server to its full potential

Telegram will send a maximum of 100 updates per getUpdate request. But there's nothing stopping you from sending 100 of these requests in quick succession to get 10.000 updates

[In reply to Paul Larsen] Telegram will send a maximum of 100 updates per getUpdates request. But there's nothing stopping you from sending 100 of these requests in quick succession to get 10.000 updates

ignorant-[ she/her ] Автор вопроса

i dont think THIS will work. as limits.tginfo.me said, there’s 30req/sec limit for many methods although this is not valid for some methods (e.g. sendChatAction allows you to send 100+ req/sec), this might be the problem

you don't need to execute actions for every update

ignorant-[ she/her ] Автор вопроса

wait, so there’s 30req/sec limit for methods which are executing some actions?

The best is the Webhook Method

mostly those that require users to transfer bandwidth, but it isn't an exact science

even 30req per sec will give you 3000 updates per second

ignorant-[ she/her ] Автор вопроса

server ping does not think so :P

How can i send, for example request updates in 1 second for get 300 updates? Where i need to do this?

ignorant-[ she/her ] Автор вопроса

tell us what your ping to api.telegram.org and we will tell you how can you send more than 1 getUpdates request per second

0.34 xD

I think that's unreal, for get 400 or more request for 1 second

ignorant-[ she/her ] Автор вопроса

look: you do the getUpdates() request in approx 0.34ms, right? why wouldn’t you do another getUpdates() in exact same second? that would be 2 getUpdates() requests per second and so on you do up to 30 req/sec

correct, based on this I can only get 200 updates but not more

you can, read my comment about threads and/or workers

ignorant-[ she/her ] Автор вопроса

uhhh, in ideal world we have 1000 ms in 1 sec, that gives you 1000 ms / 0.34 ms = ~3000 updates / sec

this requires asynchrony, php does not support this

ignorant-[ she/her ] Автор вопроса

zulul bad for you then?..

https://github.com/amphp/amp/tree/master/examples try read docs 🤔🚶‍♂🚶‍♂😁

Async. One thread to get updates, which then get processed on different threads. The "getUpdates" thread can get thousands of updates per second since it's not blocked on processing the updates all the time.

Похожие вопросы

Карта сайта