Where is this internet traffic coming from?
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?
17 Replies
Project ID:
41a00fef-a128-4df4-b833-4c8b31b28f9f
41a00fef-a128-4df4-b833-4c8b31b28f9f
There is no way to ssh into a service on Railway. The traffic is likely coming from bots
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.
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
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?
Nope
Not for that service
SO ok, let me be more clear
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.
Sorry, I wasn't very clear
I see
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
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
Yes
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.
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
it does not count for charged traffic, but it does count for staying awake
private network traffic, nope it's not counted anywhere
you can't even currently wake a service via the private network
Oh really, didn't know that
that's not great
soon ™️