server latency
g2rise
FREEOP

5 months ago

hello to everyone.
recently started to deal with telegram bots, began to search for hostings, tried many different, and faced one problem, is the response of telegram bot, when you press the button the bot instantly gives the necessary information specifically on railway, but on other hostings it happens with a small delay, about 0.1-0.3 seconds, this is not significant, but I as a developer can see it well.
I have two questions:

  1. why this happens, if the location on my hostings was the same as on railway (nevernandah), and telegram api server is just there, no loads, network problems also, but I still do not understand why the response to the railway came out than other hosting (vps) that I manually set up.

  2. why I can’t stay on the railway:
    I have bot locally overwriting . json and . txt (logs) in the server root, I need it, and connect mongodb, as well as log data on the server I do not need. and the problem is that railway doesn’t do any overwriting online, it works with what they give it, whether it can be changed in some way, I heard about volumes where you can put these project files but didn’t quite figure out how much it will cost and how to do it

I would be very grateful for a detailed answer to both questions, I no longer know who to contact.

$10 Bounty

0 Replies

g2rise
FREEOP

5 months ago

a9ffc2e6-4ae0-46ae-a914-3b904e3b2a96


noahd
EMPLOYEE

5 months ago

I found this article on telegram bots:
https://dev.to/imthedeveloper/optimising-your-telegram-bot-response-times-1a64
Might be useful.

Railway does support local files being written/overwritten with persistence using something called volumes
https://docs.railway.com/reference/volumes
I dont think (someone correct me if I'm wrong) that adding a volume will cost you anything on top of it.
As long as you stay below the storage of your plan you are good!


brody
EMPLOYEE

5 months ago

I dont think … that adding a volume will cost you anything

The only cost would be the data that's actually stored.


noahd
EMPLOYEE

5 months ago

it does look like you have this

1392150947966353400


noahd
EMPLOYEE

5 months ago

How much does it cost if you were to go over it?


brody
EMPLOYEE

5 months ago

Its a hard limit, same way you can't store more than 64gb on a 64gb thumb drive


noahd
EMPLOYEE

5 months ago

👍


g2rise
FREEOP

5 months ago

Unfortunately the first article didn't give anything new, but thanks for the information about volumes.
8gb RAM and 8 cores is a lot for one such bot, so, i think with hobby plan i can run at least 20 projects with telegram bots,
I have another question if you don't mind answering, is it realistic to host a teamspeak3 server on railway? I heard that it is possible to do it via docker, but I'm not sure that there won't be any problems with UDP protocol.


noahd
EMPLOYEE

5 months ago

I'm not 100% familiar with what teamspeak3 does. Does it have constant inbound connections? There have been issues related to constant streams of connections in the past.


noahd
EMPLOYEE

5 months ago

Upon googling, railway does not support inbound UDP



noahd
EMPLOYEE

5 months ago

there we are


g2rise
FREEOP

5 months ago

without incoming UDP traffic teamspeak should not work(
sad, but thanks for that too.


noahd
EMPLOYEE

5 months ago

Yep sorry!


noahd
EMPLOYEE

5 months ago

Hope I was able to help sort this out


Loading...