2 years ago
I have a service that doesn't even have a public domain, yet it's receiving KBs of data ever minute. Why is this happening? I know this isn't another internal service communicating with it. This there any way to start a shell inside the service and see?
28 Replies
2 years ago
There is no way to ssh into a service on Railway. The traffic is likely coming from bots
2 years ago
You’re only charged for outbound traffic, not inbound
Is there any way to force my web server to sleep? That was a big point that railway would put my service to sleep, and I wasn't going to use the service much. But the bots are keeping the service awake.
2 years ago
Outbound traffic is what keeps services awake, so as long as your service is not responding to the requests it will sleep
I guess I'm out of luck, even if I can modify the firewall, I wouldn't know what ranges to block, and I don't have IPs to whitelist
2 years ago
When you say your service doesn’t have a public domain, do you mean a custom domain? Do you have a .railway.app domain active?
I have two services. One is not public facing, and receives traffic. However, this is not the service I actually want to sleep. The second service is public facing, and I do want it to see, but it also receives network traffic. The second service does have a custom domain.
2 years ago
I see
2 years ago
Whitelisting would be the wrong way to go about preventing this, unless you have a specific ip address you are going to be accessing the service from VPN or otherwise
2 years ago
Your app should not be responding to most bot requests. putting cloudflare in front of the custom domain may help
Side note: Does traffic to another service count as outgoing for the purposes of falling asleep
2 years ago
Yes
2 years ago
The service is processing and communicating, that requires resources and so service will be aware
Ok. The thing is the public application receiving a lot of data isn't sending a lot of data, only a few hundred bytes every few minutes. I'm not sure why, if it's just being pinged maybe, or maybe it's passively communicating with the database, I need to do more investigating.
I'm not sure if you can see the project metrics, but if you can I'd be interested in what you think is going on
I'm a bit baffled that the (Strapi) web server is only sending a few hundred bytes, consistently every few minutes.
2 years ago
so for clarity, communicating to another service / database via the private network does not count for any network traffic, your service could be connecting to the database publicly or it could be sending telemetry
2 years ago
it does not count for charged traffic, but it does count for staying awake
2 years ago
private network traffic, nope it's not counted anywhere
2 years ago
you can't even currently wake a service via the private network
2 years ago
Oh really, didn't know that
2 years ago
that's not great
2 years ago
soon ™️