High latency
shxkm
HOBBYOP

2 years ago

Is it expected to have much higher latency on the Hobby plan? My WSGI server is mostly responding in 2 digit ms, but curl timing shows 700-1000ms response times.

If that’s expected because routing is somehow loaded, I’m OK with that. Just wondering if that’s a factor.

Closed

90 Replies

shxkm
HOBBYOP

2 years ago

1b0d51d3-f173-4fd6-bf29-f0025eae2d1a


2 years ago

I think this is a service specific issue - my services are showing 100-200ms on public domain


2 years ago

Are you putting your service in a distant region (e.g. us -> eu)?


shxkm
HOBBYOP

2 years ago

Yes. I’m in EU, all services are in US. I’ll check this direction once Amsterdam becomes available. Just don’t want to waste time if it’s something with Hobby. 1000ms is on the higher end and as stated the server itself is returning pretty fast.


2 years ago

Do you have traces enabled to back that up?

It's not a hobby specific issue, railway doesn't change networking based on your plan


shxkm
HOBBYOP

2 years ago

I have the WSGI server logs which measure the time from the time the request is received and until it's fully processed.


shxkm
HOBBYOP

2 years ago

     time_namelookup:  0.002090s
        time_connect:  0.070697s
     time_appconnect:  0.279802s
    time_pretransfer:  0.279955s
       time_redirect:  0.000000s
  time_starttransfer:  0.681046s
                     ----------
          time_total:  0.681129s
100.64.0.3 - - [06/Feb/2025:12:42:16 +0000] 'GET /[REDACTED] HTTP/1.1' 302 0 '-' 'curl/8.7.1' in 21823µs

shxkm
HOBBYOP

2 years ago

And a lot more. Pretty sure most of the time is happening outside the WSGI server.

     time_namelookup:  0.112218s
        time_connect:  0.189007s
     time_appconnect:  0.343297s
    time_pretransfer:  0.343528s
       time_redirect:  0.000000s
  time_starttransfer:  0.750120s
                     ----------
          time_total:  0.750215s
100.64.0.6 - - [06/Feb/2025:12:58:18 +0000] 'GET /REDACTED HTTP/1.1' 302 0 '-' 'curl/8.7.1' in 24472µs

shxkm
HOBBYOP

2 years ago

I'm willing to deploy a route that simply returns a 200 without any processing if that will help looking into this.


shxkm
HOBBYOP

2 years ago

Even health check route that’s returning 3000 microseconds is taking 700ms to reach. This is too much for geography to account for.


2 years ago

The last time someone in the help thread was having latency issues was related to not being on runtime v2


2 years ago

Just out of curiosity, is this service of yours on the runtime v2?


2 years ago

was it created after 2024/06/04 (YYYY/MM/DD)?


shxkm
HOBBYOP

2 years ago

Yeah, I saw that thread while researching. The service is less than a week old. And I verified that it’s on V2.


shxkm
HOBBYOP

2 years ago

I’m gonna try to move it to us-east-1 (alongside DB and Redis) and see if that makes any difference.


shxkm
HOBBYOP

2 years ago

Oh, I can’t move Postgres to us-east-1.


shxkm
HOBBYOP

2 years ago

Quite interesting. Even with the DB in another region, I’m seeing sub 500ms responses for the first time. Still far too slow.


shxkm
HOBBYOP

2 years ago

Oh, I can’t in the Hobby plan.


2 years ago

make sure your app and db are in the same region!


2 years ago

same zone too


shxkm
HOBBYOP

2 years ago

They are


shxkm
HOBBYOP

2 years ago

The response times I’ve listed include the trips to the DB.


2 years ago

Then yeah just looks like it's geographical distance coming into play now


shxkm
HOBBYOP

2 years ago

That’s interesting


shxkm
HOBBYOP

2 years ago

I think it’s still too much to account for that


2 years ago

got a command you'd like me to run? I'm closer to US-West than you are


shxkm
HOBBYOP

2 years ago

EDITED OUT


2 years ago

what do you use for these printouts?


shxkm
HOBBYOP

2 years ago

the first one's source is based on: https://stackoverflow.com/a/22625150/14207055


shxkm
HOBBYOP

2 years ago

the 2nd is server logs from Railway (which I can access)


2 years ago

yay windows option too


shxkm
HOBBYOP

2 years ago

oh Brody, I'm so sorry for you


2 years ago

     time_namelookup:  0.018679s
        time_connect:  0.050818s
     time_appconnect:  0.323807s
    time_pretransfer:  0.323857s
       time_redirect:  0.000000s
  time_starttransfer:  0.508170s
                     ----------
          time_total:  0.508457s

2 years ago

and here is a request to a service on us-east metal (i am much more east) -

\>curltime.bat https://utilities-metal.up.railway.app/ok200
     time_namelookup:  0.048874s
        time_connect:  0.100423s
     time_appconnect:  0.155786s
    time_pretransfer:  0.155836s
       time_redirect:  0.000000s
  time_starttransfer:  0.270153s
                     ----------
          time_total:  0.270172s

shxkm
HOBBYOP

2 years ago

that's more like the number I'd like to see (270ms) since this route is doing absolutely nothing.

500ms for that seem a bit high for me, especially since for [SOME COMPETITOR], even a US route is returning at sub 250ms consistently (and that route is doing something).


2 years ago

270ms*


shxkm
HOBBYOP

2 years ago

yeah yeah, sorry


shxkm
HOBBYOP

2 years ago

fixed that typo


2 years ago

so yeah this is just a distance thing


shxkm
HOBBYOP

2 years ago

I'm doubtful it's all due to geolocation. I'm sure some of it is, 500ms seems much.

Again, I'm seeing servers in California returning a response at sub 250ms consistently for another provider, and that's for a route I know has to do some lookups.

At first I thought "yeah they're much better engineers / using better mechanisms / etc...", but then I saw my server response times, and even the route I gave you at /up does literally nothing.

I guess I'll wait for Amsterdam to see and evaluate my options.


shxkm
HOBBYOP

2 years ago

100.64.0.3 - - [06/Feb/2025:16:51:21 +0000] 'GET /up HTTP/1.1' 301 0 '-' 'curl/8.7.1' in 1225µs

2 years ago

did you want me to run the utilities in Amsterdam?


shxkm
HOBBYOP

2 years ago

no no, what I'm saying is that Railway US west vs a competitor hosted elsewhere US west is a no contest.

My route that does nothing takes >700ms from where I am, theirs takes less than 280ms 99% of the time.

Something may be missing in my tests, but I'll have to evaluate.


shxkm
HOBBYOP

2 years ago

That's why I'd like to wait to Amsterdam, because I'm much closer to it, in order to weigh on how much latency Railway's LBs or whatever add into the mix.


2 years ago

yeah and thats why i offered to run the utilities in Amsterdam


shxkm
HOBBYOP

2 years ago

sorry, I don't get the point of that (meaning, I literally don't understand the purpose of that test)


shxkm
HOBBYOP

2 years ago

can you elaborate?


2 years ago

you want to deploy something to Amsterdam.

you cannot deploy something to Amsterdam since you are hobby.

i have offered to deploy something to Amsterdam for you.


shxkm
HOBBYOP

2 years ago

Like, my app? Or the test app you’re using? Either way sounds interesting


2 years ago

my test app, you mentioned you just want something that returns 200


shxkm
HOBBYOP

2 years ago

Sure. Thank you.


2 years ago

will do


2 years ago

done -


2 years ago

gcp since eu-west metal isnt ready for workloads yet


shxkm
HOBBYOP

2 years ago

Between 0.25-0.5 seconds


shxkm
HOBBYOP

2 years ago

Same app deployed in US east in another provider:

     time_namelookup:  0.002456s
        time_connect:  0.016633s
     time_appconnect:  0.146623s
    time_pretransfer:  0.146761s
       time_redirect:  0.000000s
  time_starttransfer:  0.328444s
                     ----------
          time_total:  0.328547s

Would be awesome if Railway engineers were at least willing to conisder this.


2 years ago

consider what?


shxkm
HOBBYOP

2 years ago

consider that Railway adds significant latency


shxkm
HOBBYOP

2 years ago

that cannot be accounted for due to geography, or application code


2 years ago

theres a lot more that goes into play that railway cannot control


shxkm
HOBBYOP

2 years ago

I'm sure but when it's +2x than the competitors, I'd at least want to rule that out. But, it's understandable.


2 years ago

try us east metal -


2 years ago

i guess it wont make a difference the edge proxies are still gcp


shxkm
HOBBYOP

2 years ago

I can't move the DB to US east (yet).

I guess I'll give Pro a spin soon enough to make a fair assessment.


2 years ago

let me know how that works!


shxkm
HOBBYOP

2 years ago

With Pro, i'll be able to move the DB off west and to east right?


2 years ago

yep, and even to EU


shxkm
HOBBYOP

2 years ago

us-east-1 is much better than us-west-1

around 0.45-0.50s most times, still slower than the competition

Trying Amsterdam


2 years ago

in my humble opinion, you should wait until we have the edge proxies on metal too, then make your final decision, right now, no matter if you use gcp or metal, you are still talking to gcp first


shxkm
HOBBYOP

2 years ago

in my humble opinion, you should wait until we have the edge proxies on metal too

Is there an ETA?

I very much like Railway, and have some time to decide.


shxkm
HOBBYOP

2 years ago

been banging my head trying to deploy properly on that other platform


shxkm
HOBBYOP

2 years ago

So Brody do you mean that right now on Metal, even though the machines are better, you're still "behind" gcp?


shxkm
HOBBYOP

2 years ago

Because I just moved to Amsterdam, and this is pretty sweet:

     time_namelookup:  0.002964s
        time_connect:  0.080993s
     time_appconnect:  0.157722s
    time_pretransfer:  0.158244s
       time_redirect:  0.000000s
  time_starttransfer:  0.231267s

Even though it's not metal.


2 years ago

yes your http request still hits our edge proxy on gcp first no matter what, eta for proxy on metal should be by the end of this Q


shxkm
HOBBYOP

2 years ago

so if I understand correctly, non-metal already have edge-proxies?


2 years ago

i mean metal or non-metal, any http request will still hit the edge proxies that are gcp only right now


shxkm
HOBBYOP

2 years ago

oh, got it


2 years ago

metal edge proxies coming by the end of this Q, hopefully at least.

our metal data centers have better routing and better isp hookups, so the time should improve, at least thats the goal


shxkm
HOBBYOP

2 years ago

OK, tested the same exact route.

Railway in Amsterdam (DB & Redis in the same region), 4,500 km:

0.706260s

0.579180s

0.372202s

Competitor in Frankfurt, 4,000 km:

0.287137s

0.290455s

0.288477s

us-east-1 vs. us-east-1: competition (from my location) just blows Railway away.

Railway's deployment flow and UI are light years more convenient to me, but this service is going to be a bit sensitive in terms of timing.

I'm definitely looking forward to edge proxies and hopefully don't have to make the decision before then. Reverting to Hobby until then and will test again.


2 years ago

drop the competitor's name, this is a safe space


shxkm
HOBBYOP

2 years ago

Vercel.

I didn't want to come off as trying to spam/advertise. Thank you.


2 years ago

ah yea AWS, they have far better routing than GCP


2 years ago

hopefully metal will have better than both, but only time will tell


shxkm
HOBBYOP

2 years ago

Yeah. In my day job I work extensively with all 3 cloud providers directly and have been doing so for >4 years. My guess of why Railway picked GCP is startup credits (totally legit) because working with the product (GCP) sometimes feels hostile. Hopefully metal routing will be comparable.


2 years ago

from what ive heard, we picked gcp because its more put together than aws, more well rounded, seems like a cohesive product, could be wrong, who knows, long pre-dates my time with railway


shxkm
HOBBYOP

2 years ago

Let’s see what happens with the in-house proxies. One thing is sure: I wouldn’t even have stayed with Railway if not for your help (in ~Jan 2024 you helped me put together my first project on here)


2 years ago

ouuuu tell me about this project


shxkm
HOBBYOP

2 years ago

It sucked and failed, like most of them.


2 years ago

yeah but I wanna know what it is, I forgor these things


2 years ago

@foo229 - we would be honored if you can give it a try - https://discord.com/channels/713503345364697088/1344913382427332670


Welcome!

Sign in to your Railway account to join the conversation.

Loading...