More information about cloud regions and the way they are determined
The docs only very briefly explain that:
"You can create as many rooms as you’d like, and Normcore will automatically determine the ideal region to host the room based on the players connecting."
How does that work?
Won't the first player (the one creating the room) determine the region for everyone the will follow? Can rooms migrate between servers/regions as new players join/leave?
Are room names unique world-wide or region specific?
Thanks
8 Replies
Hi @Niv. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Great questions! Here’s what the knowledge sources say about Normcore’s cloud regions, region selection, room migration, and room name uniqueness:
How are cloud regions determined?
When a client requests to connect to a room, the Normcore matcher service checks if the room is already running in any available clusters (regions). If not, it determines the ideal cluster (region) to host the server—this is based on the players connecting, specifically the first player to join. The matcher measures the latency between the client and all available regions to pick the one with the lowest latency, ensuring the best possible experience for that initial player. Normcore runs servers in regions across the globe and leverages Google’s premium fiber network for low-latency connections Server Placement, Cloud Infrastructure.
Does the first player determine the region for everyone?
Yes, the first player to connect to a room determines the region for that room session. The room server is spun up in the region with the lowest latency for that player. All subsequent players who join that room will connect to the same server in that region for the duration of the room session Cloud Infrastructure.
Can rooms migrate between servers/regions as new players join/leave?
No, rooms do not migrate between regions or servers while the room is active. The region is fixed for the duration of the room session. However, after all players have disconnected and the room server has been idle for 30 seconds, the room server shuts down. When a new player connects after that, a new room server is spun up, and the region is again chosen based on the latency of the new first player Room Server Configurations.
Are room names unique worldwide or region-specific?
Room names are unique per App Key, not per region. Any room name used with a different App Key is considered a different room server by Normcore. The room name is not region-specific; it is global within the context of your application Realtime.
---
Summary:
- The first player determines the region for the room session. - Rooms do not migrate between regions while active. - Room names are unique per App Key, not per region. If you need more details or have a specific use case, let me know! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
- The first player determines the region for the room session. - Rooms do not migrate between regions while active. - Room names are unique per App Key, not per region. If you need more details or have a specific use case, let me know! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
<@269927864265211906> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
this is all correct
is there a way to determine a player's region without actually connecting to a room?
We have matchmaking done outside of Normal and that needs to be part of the process ..
Normcore doesn’t provide an API for this but we generally recommend folks use GeoIP. There are free databases that will give you city-level accuracy based on their IP which is plenty accurate.
Normcore 3 will open up the preferredRegions API (already documented in the docs) which will let you override Normcore’s region selection
most titles right now rely on just having the first player from that region join the room which works well
I'm not worried about that kind of resolution - but I do want to avoid connecting to, say, US based rooms from Russia
how many regions do you have on Normal Cloud right now - what are they?
22 data centers, but they’re rotated in and out based on connection quality (outside the US and Europe datacenter connections are a lot less reliable). the published list for Normcore 3 looks something like this: us-east, us-central, us-west, europe, southamerica, oceania, india, asia-east, asia-maritime with Normcore identifying the ideal data center for each one based on the day.
thanks - going to follow up on this privately 🙂