I am 99.99999% certain that this isn’t possible, but I want to be 100% sure. What if the game server sent an HTTP request to my web server, and my web server used that request to get the IP of the server to send requests to? Is there any way at all you could create a custom way of listening for HTTP requests within Roblox? Even if it’s super hacky?
You could always get Roblox to send a request to your server every X seconds, and then the server responds to the request when it needs to. If the request times out, the server sends another. If the server receives a response then it sends another and waits for more responses. This works fine in most cases, but I want to know if there is a more efficient and reliable way?
curl has a timeout of 2 minutes (how roblox sends requests), and it also depends on your web server setup. nginx will hold requests just fine (if you configure it to do so), but if its through cloudflare, it will timeout pretty fast.
I am using Express on Google App Engine. If Roblox sends a request to the server, Roblox will timeout after 2 mins, correct? Does the time it takes for Cloudflare, etc, effect that (I am considering using cloudflare).
I haven’t tested express timeout (even though i use express), I based the 2 minutes off the default curl timeout, and the fact i’ve used long polling previously without issue on roblox’s end. Cloudflare will return an error if the origin doesnt respond within 15 seconds.
For my personally, i just poll every 15 seconds, send information, and receive information, works quite well.
Okay, thanks. I am considering creating some crappy implementation of a game server on Roblox as a proof of concept. That’s why I need this. Thanks for the help!
This is very helpful, thank you! However one concern I have is that won’t sending requests in a while loop hit a brick wall in terms of rate limits roblox-side?
Honestly, i think they misinterpreted it. I wanted a client-implementation, like the roblox server makes an outgoing socket to our own server, instead of us making a socket to the roblox server. Could be wrong.