Where is this internet traffic coming from?
zwork101
HOBBYOP

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

zwork101
HOBBYOP

2 years ago

41a00fef-a128-4df4-b833-4c8b31b28f9f


adam
MODERATOR

2 years ago

There is no way to ssh into a service on Railway. The traffic is likely coming from bots


adam
MODERATOR

2 years ago

You’re only charged for outbound traffic, not inbound


zwork101
HOBBYOP

2 years ago

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.


adam
MODERATOR

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


zwork101
HOBBYOP

2 years ago

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


adam
MODERATOR

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?


zwork101
HOBBYOP

2 years ago

Nope


zwork101
HOBBYOP

2 years ago

Not for that service


zwork101
HOBBYOP

2 years ago

SO ok, let me be more clear


zwork101
HOBBYOP

2 years ago

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.


zwork101
HOBBYOP

2 years ago

Sorry, I wasn't very clear


adam
MODERATOR

2 years ago

I see


adam
MODERATOR

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


adam
MODERATOR

2 years ago

Your app should not be responding to most bot requests. putting cloudflare in front of the custom domain may help


zwork101
HOBBYOP

2 years ago

Side note: Does traffic to another service count as outgoing for the purposes of falling asleep


adam
MODERATOR

2 years ago

Yes


adam
MODERATOR

2 years ago

The service is processing and communicating, that requires resources and so service will be aware


zwork101
HOBBYOP

2 years ago

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.


zwork101
HOBBYOP

2 years ago

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


zwork101
HOBBYOP

2 years ago

I'm a bit baffled that the (Strapi) web server is only sending a few hundred bytes, consistently every few minutes.


brody
EMPLOYEE

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


adam
MODERATOR

2 years ago

it does not count for charged traffic, but it does count for staying awake


brody
EMPLOYEE

2 years ago

private network traffic, nope it's not counted anywhere


brody
EMPLOYEE

2 years ago

you can't even currently wake a service via the private network


adam
MODERATOR

2 years ago

Oh really, didn't know that


adam
MODERATOR

2 years ago

that's not great


brody
EMPLOYEE

2 years ago

soon ™️


Loading...