Using load balancing to route users to different servers

Hi guys, I am trying to make use of Cloudflare's load balancing to route players to the correct Minecraft server instance. Potentially load balancing isn't the right tool for this, but I think it is - would appreciate if anyone knows a better route? Anyhow, I have no idea how to start this so would be great to be pointed in the right direction where to start. I have an EU Velocity (Velocity is a Minecraft proxy) server and an NA Velocity server, I would like a player to be able to put in one IP address (e.g. myserver.com) and it point them to the correct proxy (e.g. eu.myserver.com if the player is connecting closer to EU). Currently my servers are behind TCPShield (https://tcpshield.com/), so in my DNS, I have two CNAMEs that point to TCPShield. Thanks for any help
11 Replies
Hello, I’m Allie!
Cloudflare Docs
Proxy status · Cloudflare Load Balancing docs
You can load balance your traffic at different levels of the networking stack, including:
josh
joshOP10mo ago
Thank you! I'll take a look :)
josh
joshOP10mo ago
So I messed about turning the proxying off and now it at least resolves, it points to my EU endpoint. Though even when testing with a VPN and my connection being from America, I still point to EU. I've also tried changing my fallback pool to my NA one, but I am still routed to EU? Also, both my monitors show as Critical, which I assume can't be too good! I switched them to TCP rather than HTTP but still showing as Critical
No description
Hello, I’m Allie!
Cloudflare Docs
Geo steering · Cloudflare Load Balancing docs
Geo steering directs traffic to pools tied to specific countries, regions, or — for Enterprise customers only — data centers.
Hello, I’m Allie!
Probably should have posted both
josh
joshOP10mo ago
No worries, will take a look at this too, thank you
josh
joshOP10mo ago
So I've tried looking at both Geo & Proximity. It looks like it's half working? I'm not sure. So in my Minecraft client I can see my ping to these servers, the first screenshot is my ping to the EU server, the second is my ping to the NA server, and the third is the load balancer. I am on a VPN in the USA atm so this makes sense that my ping shows as the same for NA & LB, makes me think it's pointing there, but I can see from the server description it's still giving me the EU one, and when I connect I connect to the EU server too
No description
No description
No description
josh
joshOP10mo ago
Although worth noting that without the VPN it appears my ping on the LB still mirrors that of the NA server (NA is currently fallback). Also not sure why my ping is said to be so low on NA (I am based in England), may be something to do with TCPShield
No description
No description
No description
josh
joshOP10mo ago
Interestingly I now change my fallback to EU rather than NA, and the LB ping begins to reflect the EU server. Screenshot order is still EU, NA, LB
No description
No description
No description
josh
joshOP10mo ago
Even more obvious with the USA VPN on
No description
No description
No description
josh
joshOP10mo ago
So I am pretty confident that the LB is routing my connection to the fallback pool, but that leaves me with two problems. 1) I'm not sure what I'm doing wrong with Geo or Proximity routing 2) It's not actually giving me the correct Minecraft server instance, despite my connection reflecting the right one The guys over at TCPShield have helped me figure out what I was doing wrong! My problem was pointing my LB to the CNAMEs when instead I should have pointed the LB to my backend proxies, and pointed TCPShield to the LB hostname
Want results from more Discord servers?
Add your server