a year ago
Does railway even support UDP? Need it for my game server
100 Replies
a year ago
Railway doesn't support UDP yet
what can I use instead of railway for UDP?
by Yet, should I wait? Or do it?
a year ago
I'm not sure, I only use Railway so
a year ago
I'd say it's worth waiting, unless you're in a hurry
well depends how long they take to do it, i wouldnt mind funding their research into implementing it.
I love railway, would be sad to not use it, for one reason.
a year ago
it cant hurt for me to ask, how much would you pledge
I would put the money in depending in how long it takes to do it. I would need a time scale before I can estimate the pledge
As I said, I would do it for the cause. Just need to know for my sake, as a game developer as well
a year ago
considering its not currently on the roadmap, it would have to be quite the sum of money
a year ago
right but there isnt spend to back up the asks
a year ago
we may be able to do it in the next quarter for a committed 100k spend, but im not the person who decided that stuff
great, time to find a new service and migrate everything!
thanks for the support overall! Means a lot :D
a year ago
unfortunately that wouldn't even get us talking about it, but i appreciate the sentiment
what other VPS could I use? (too lazy to migrate it all + already spent enough money on railway, i dont want to waste it)
what other VPS could I use? (too lazy to migrate it all + already spent enough money on railway, i dont want to waste it)
(still going to use railway as it does all the other stuff)
(UDP is seperate + the game servers)
a year ago
i dont have any preferences, personally, if something doesnt run on railway I'd just build it differently until it can run on railway
can you give like a estimate of how long the team thinks it would take to implement, so i can have some faith
(and do what you suggest)
a year ago
we dont have any plans to implement it to begin with
what are the reasons why outgoing is allowed but not incoming publicly?
(private incoming and outgoing is allowed, i know that)
a year ago
we can't implement features without clear spend to back up the asks
a year ago
outgoing udp traffic just works, we didnt need to do anything there, thats just how the internet works
a year ago
we need to build a router for that
a year ago
what if you build the server in a way that doesnt need udp
I'm making a realtime VR game so it requires low latency, if you can think of a way I can deliver data with low latency then please suggest!
a year ago
websockets 🙂
I Can't for the life of me get my go socket to connect however… Which is strange as it all works and was double checked by several coders…
a year ago
yeah but once the connection is established and the upgrade made, then its just a data stream
which go is the language that is speedy and lightweight from what i know…
a year ago
websockets and go work just fine on railway

heyo! for the life of me, I cannot get websockets to work. There are no templates online, tried AI and it doesnt work, python overall is struggling, do you mind sharing some resources or code I could use for the server and client, secondly…
with this url what parts of it do we need?
As soon as websockets work even for a simple code we're good overall lol, just need something simple to go off as nothing is working
a year ago
you cannot try to access your service on anything other than port 443
alright let me try this again, if all else fails and i resort to throwing my computer out of a window, i'll come here!
damn, where have I gone wrong.
import asyncio
import websockets
async def connect():
uri = "wss://port-production-6c5f.up.railway.app/ws"
async with websockets.connect(uri) as websocket:
msg = await websocket.recv()
print("Server says:", msg)
asyncio.run(connect())import asyncio
import websockets
async def handler(websocket):
await websocket.send("Hello client!")
async def main():
async with websockets.serve(handler, "0.0.0.0", 443, ssl=None):
await asyncio.Future()
asyncio.run(main())a year ago
you shouldn't be listening on 443, listening on 3004 was fine, you just can't access the service publicly from 3004, you need to access the service publicly from 443
could you please share some code I could go from, I'm really lost
5 days of trying is finally hitting me
a year ago
it's super simple, please just take the guidance I just gave
a year ago
if it still doesn't work, make sure your target port is set correctly
Im really sorry if i'm just really bad at this and its super clear however I really dont know. Sorry :(
import asyncio
import websockets
async def connect():
uri = "wss://port-production-6c5f.up.railway.app/ws"
async with websockets.connect(uri) as websocket:
msg = await websocket.recv()
print("Server says:", msg)
asyncio.run(connect())import asyncio
import websockets
import os
PORT = int(os.getenv("PORT", 3004))
async def handler(websocket):
await websocket.send("Hello client!")
async def main():
print(f"Listening on port {PORT}...")
async with websockets.serve(handler, "0.0.0.0", PORT):
await asyncio.Future()
asyncio.run(main())Starting Container
Listening on port 8790...again, to repeat, sorry :(
a year ago
is your target port set correctly?
The port takes the OS port (server), unless I need to target a port in the client?
a year ago
you need to set the target port in Railway
In the variables? Where sorry? The code?
Im somewhat blind at simple things
a year ago
never overlook the docs -
a year ago
there's a search bar for a reason 😉
a year ago
you need to set it to the port your app is listening on
curl -i https://port-production-6c5f.up.railway.app
HTTP/1.1 404 Not Found
Content-Length: 112
Content-Type: application/json
Server: railway-edge
X-Railway-Edge: railway/europe-west4
X-Railway-Fallback: true
X-Railway-Request-Id: SsibjGmwTieYdhnlFWm6wQ_3243920489
Date: Fri, 18 Apr 2025 22:30:39 GMT
{"status":"error","code":404,"message":"Application not found","request_id":"SsibjGmwTieYdhnlFWm6wQ_3243920489"}I know its simple and all, however i do request some sort of setup guide, or at least the code.
Im not letting the 5 days of struggle go to waste!!!
a year ago
that's not the same domain that you just showed in your screenshot?
curl -i https://port-production-751c.up.railway.app
HTTP/1.1 502 Bad Gateway
Content-Length: 120
Content-Type: application/json
Server: railway-edge
X-Railway-Edge: railway/europe-west4-drams3a
X-Railway-Fallback: true
X-Railway-Request-Id: NfayxZWvQp-S_HFEarGpug_3554946428
Date: Fri, 18 Apr 2025 22:35:55 GMT
{"status":"error","code":502,"message":"Application failed to respond","request_id":"NfayxZWvQp-S_HFEarGpug_3554946428"}a year ago
your target port was still wrong, i fixed that for you, please try again
a year ago
yeah
a year ago
your target port was wrong, for future ref -
there's a search bar for a reason 😉
a year ago
imagine me when I'm not on my day off
Brody turns on his phone
phone connects to internet provider
alerted of 100+ pingshave a great one and dont forget to mark this as !s whenever you do it
a year ago
slack and discord combined give me over 100 notifications a day according to android
a year ago
!s
Status changed to Solved brody • 11 months ago

