Load Balancing

Hey So i'm new to setting up load balancing, I paid for the plan that i can get load-balancing with. And i just don't know how to set it up correctly because cloudflare is saying both endpoints are unreachable and critical or whatever. I am using ionos has a domain provider and just wonder what i need to do after changing the nameservers in ionos.
102 Replies
MDev
MDev•2mo ago
Be patient. NS changes can take some time, ping your domain regularly, if a Cloudflare IP is returned the switch should have succeeded (from you ISP's POV)
Bolt
BoltOP•2mo ago
I understand it can take between 24-48hrs for the nameserver to be propagated, I was just asking if that's all i need to do in order for the endpoints to be reachable from cloudflare
MDev
MDev•2mo ago
In the best case yes 😉 And do you have 2 separate origin servers in replication to profit from the load balancing? Have you've set them up correctly on Cloudflare Load Balancer already? I've always been interested in the subject but never tried it myself 😉 Best of luck! Replicated your master origin DNS record to Cloudflare already? should allow for a smooth transition/zero downtime when switch succeeded and in that best case scenario 🤣
Bolt
BoltOP•2mo ago
Technically there would be at least 15 seconds if downtime, right? Because it has to check for 15 seconds if there isn't a response It would also still kick people from the server and need them to reconnect I believe I have 1 server but 2 separate ISPs for dual wan Well I guess technically the dns would only be down 15 seconds, not the server itself ALSO
Bolt
BoltOP•2mo ago
Dog
No description
Bolt
BoltOP•2mo ago
No description
Bolt
BoltOP•2mo ago
He started falling asleep in my hand
MDev
MDev•2mo ago
Ie believe so, could depend maybe but the nslookup timeout would indeed be your downtime 😄
Bolt
BoltOP•2mo ago
Ok, yeah cloudflare gives way too many options. I thought I understand how to set it up, but maybe not, I'm gonna change the nameserver then see
MDev
MDev•2mo ago
Can be a bit owerwhealming at first, you'll get a hang of it sooner or later ^^ you maybe will love CF DNS straight away, its almost near instant any changes made once nameservers point to CF If one of my origin's fails for example i just change the record to a backup server and I'm on again but yea I'll still have to do it manually :p
Bolt
BoltOP•2mo ago
I have 1 server machine but I own them The router we have is configured for dual wan
MDev
MDev•2mo ago
Ooh i get you, you want failover to the second public IP's if primary goes down?
Bolt
BoltOP•2mo ago
Yes, i want my domain to redirect to the secondary ip incase the primary goes down
MDev
MDev•2mo ago
I don't think CF Load Balancing can do that unless you have 2 separate origin servers with their own public IP. What you could do is use something like ddclient to fetch your public IP on the server every x minutes and update the record on cloudflare every time WAN IP changes 🙂
Bolt
BoltOP•2mo ago
i read clourdflares load balancing and used chatgpt to help with some questions and looked it up online xD it just said if you want the loadbalancing to be a failover, set the primary ip to 1 and the secondary to 0, and in quotes it said only failover if secondary is at 0, 1 is 100% which means everything goes towards the primary as long as it's online and it has 2 wans
MDev
MDev•2mo ago
Not with 2 default gateways i suppose?
Bolt
BoltOP•2mo ago
no idea, i believe it has 2 seperate default gateways i'm certain it has 2
MDev
MDev•2mo ago
Ooh, maybe it's already in failover setup as well on your router?
Bolt
BoltOP•2mo ago
yes it is thats why i said the domain/dns is the only thing i need to setup for failover Because if you setup in a domain provider, and give it 2 public ips, it just splits the traffic
MDev
MDev•2mo ago
Cool! maybe it should just work with one origin server than, I'm not sure, keep me updated 😄
Bolt
BoltOP•2mo ago
I mean, everything says it does
MDev
MDev•2mo ago
but your passive server will probably always monitor as dead/offline
Bolt
BoltOP•2mo ago
wdym
MDev
MDev•2mo ago
0 experience in it, you prob already know more than me tbh ^^ i meant connection*
Bolt
BoltOP•2mo ago
oh okay, yeh the only thing i was having a problem with was the domain itself The failover works great The failover internet i mean
MDev
MDev•2mo ago
sweet should be straightforward i think
Bolt
BoltOP•2mo ago
do you know where i can find the logs for monitors in cloudflare? in cloudflare for the monitor its saynig "Response code Mismatch error" yeah this is a pain, im just gonna wait for help xD ooo i got the monitor to work 😄
MDev
MDev•2mo ago
That'sb awesome! I bet the transfer has completed?
Bolt
BoltOP•2mo ago
Unfortunately when i try pinging it, it still says "Ping request could not find host boltcraft.net. Please check the name and try again." so i dont know what i did wrong Think i found the problem, it wasn't setup yet, now it's receiving stuff, but i think it's going to take 24 hours for the ips to propogate maybe? Idk what DNS records i need to add though, especially if im using load balancing
MDev
MDev•2mo ago
Copy over original DNS records from ionos to cloudflare, just proxy them all 🙂
Bolt
BoltOP•2mo ago
well the reason i said idk if thats what i need to do is because the a records are for pointing the domain, idk if i need to make 2 A records, one for each IP, or just the original IP, and the load balancing works with it. or if i just need the srv record I know i need to fix something though because my server management software is available through the public ip lmao If you get a moment do you think youd be willing to help me?
MDev
MDev•2mo ago
I bet everything was just working fine yesterday before the whole transfer, when NS was still with ionos?
MDev
MDev•2mo ago
Cloudflare Docs
Quickstart | Cloudflare Load Balancing docs
Get up and running quickly with Load Balancing. For more in-depth explanations, refer to the Learning path.
MDev
MDev•2mo ago
Probably 2 DNS zones you can set-up using "Pools" one pool for each WAN address 😉
Bolt
BoltOP•2mo ago
no, i have that stuff setup I have the monitor getting a healthy reading
MDev
MDev•2mo ago
make sure the records you had on IONOS are properly copied over to both these 🙂
Bolt
BoltOP•2mo ago
right now when i ping boltcraft.net it gives me their ips for the proxies, i just dont know how it works Also the records are different on ionos than in cloudflare for dns
MDev
MDev•2mo ago
should become the same as it was before when it was still working, as before ionos was used i suggest you copy the records over to CF 😉
Bolt
BoltOP•2mo ago
okay, so it's probably just the nameservers and everything propagating riight? I did i believe But there's hundreds of records on there
MDev
MDev•2mo ago
thats prob. fine when u indeed retrieve CF IP when pinging damn O.o
Bolt
BoltOP•2mo ago
okay, i just dont want to pay for business membership yet xD
MDev
MDev•2mo ago
Too bad CF didn't copy those over when registeruing the domain, in my experience it did
Bolt
BoltOP•2mo ago
yea ionos has 24/7 call support for me well i didn't transfer the domain
MDev
MDev•2mo ago
me neither just NS
Bolt
BoltOP•2mo ago
Oh, when i clicked register it wasn't letting me because it's looking for domains to buy
MDev
MDev•2mo ago
my registrar is not CF :p
Bolt
BoltOP•2mo ago
so you use another domain provider with cf?
Bolt
BoltOP•2mo ago
this is what it shows in my manage domains
No description
MDev
MDev•2mo ago
Yeas same, blank for me there :p ionos is still your registrar
Bolt
BoltOP•2mo ago
oh okay, that's why i thought you meant because it says register domains there
MDev
MDev•2mo ago
yea like the set-up for a new website process on CF :p
Bolt
BoltOP•2mo ago
should say this right?
No description
Bolt
BoltOP•2mo ago
yeah it says active
MDev
MDev•2mo ago
Cloudflare Docs
Import and export records | Cloudflare DNS docs
Use import and export to have more control over your DNS records and make processes like migrating a domain or bulk editing record comments easier.
Bolt
BoltOP•2mo ago
No description
MDev
MDev•2mo ago
Cool ^^ might rly just try that one day myself ^^
Bolt
BoltOP•2mo ago
okay cool, but yeah in ionos there isn't anything i see about exporting dns records
MDev
MDev•2mo ago
You could try to delete the site on CF and re-add it to see if you can import the records during the process too bad yea 😦
Bolt
BoltOP•2mo ago
i might call them and ask if they can send it, because thats what i need to do xD
MDev
MDev•2mo ago
Good luck, you could add the most critical records manually ^^ should become active if all goes well nearly instantly if TTL is default
Bolt
BoltOP•2mo ago
yeah i tried, hasn't done anything so im calling ionos
MDev
MDev•2mo ago
A record root for example? Should just work i think 😮 Also tried with Proxy disabled? (gray cloud)
Bolt
BoltOP•2mo ago
let me try without proxy i checked the ips they are from cloudflare So i know that much xD it does show this tho
Bolt
BoltOP•2mo ago
No description
Bolt
BoltOP•2mo ago
No description
Bolt
BoltOP•2mo ago
when i hover over the warning
MDev
MDev•2mo ago
yes true, and still receive CF ip when pining?
Bolt
BoltOP•2mo ago
yes i think it's just pining the nameserver when i do it
MDev
MDev•2mo ago
Allright thats maybe good! could indicate the load balancing is managing DNS?
Bolt
BoltOP•2mo ago
so maybe it still hasn't fully propagated? turned off load-balancing and it still shows the same ip
MDev
MDev•2mo ago
By the looks of it it won't work like that i think unless your minecraft TCP/UDP connections route over ports 80 or 443
Bolt
BoltOP•2mo ago
wdym
MDev
MDev•2mo ago
You prob. need origin rules to fix this
Bolt
BoltOP•2mo ago
i copied from ionos tho
MDev
MDev•2mo ago
by default cloudflare only routes HTTP traffic on those HTTP ports
Bolt
BoltOP•2mo ago
so what should i do to fix that?
MDev
MDev•2mo ago
Prob. with this:
MDev
MDev•2mo ago
No description
Bolt
BoltOP•2mo ago
why would i need one of them though
MDev
MDev•2mo ago
forget what i said 😮 Would only apply to your A record weird, so unproxied that record doesn't work? the SRV?
Bolt
BoltOP•2mo ago
do i need to provide an ssl certificate or anything well im trying to ping it, the ping should take it to the public ip the minecraft server would use, correct? wait boltcraft is working nvm weird though oh once i turned off proxy it works it just needed to update i guess so should i have 2 A records? one for the primary ip and one for the secondary?
MDev
MDev•2mo ago
2 on both by the looks of it each pointing to its WAN address
Bolt
BoltOP•2mo ago
okay i'm turning proxy back on for testing
MDev
MDev•2mo ago
But yea unproxied wouldn't be recommended, Not sure if it could be fixed with the origin rule for Port rewrite
Bolt
BoltOP•2mo ago
oh nvm its working with the proxy it looks like So that should be good, thanks!
MDev
MDev•2mo ago
Try a hard refresh pls
Bolt
BoltOP•2mo ago
i guess the only way to tell if load balancing is working, is by fixing the primary internet, right? wdym
MDev
MDev•2mo ago
flushing temp caches CRTL + SHIFT + R
Bolt
BoltOP•2mo ago
oh no im saying in minecraft im using windows cmd and minecraft
MDev
MDev•2mo ago
the website i meant :p
Bolt
BoltOP•2mo ago
no ik, i did that, what should i look for? XD
MDev
MDev•2mo ago
still works? proxied?
Bolt
BoltOP•2mo ago
yes Load balancing seems to be working, considering the domain is consitently pointing to my secondary ip, while there's 2 A records Now that I am an expert on it, if you ever need help with load balancing, let me know xD however idk if theres a problem with my primary ip tho, because it is back up and working, but for some reason it still says criticial in monitors then figured out the problem again tcp is the kind for port 25565
MDev
MDev•2mo ago
Awesome ^^
Bolt
BoltOP•2mo ago
Do you have any experience with Physical servers and Raid configurations?
MDev
MDev•2mo ago
Yes, which system do you need help with?
Bolt
BoltOP•2mo ago
oh sorry i didnt see your response
MDev
MDev•2mo ago
Still need help? :p
Bolt
BoltOP•2mo ago
Yes, how can I dynamically configure raid without needing to restart the server
MDev
MDev•2mo ago
You have a spare server available? It can depend from system to system, but to my knowledge, changing the raid type/config itself, most would require restarting, thats why i ask if a spare is available to serve as the temp storage during maintenance of the primary one It isn't a synology DSM by any chance? These don't require the restart to my knowledge, but it's rather limited to change the active type. Changing to anything not supported is indeed a re-config of the drives and requiring a restart Or by Dynamic raid do you mean merge/alter the combination of multiple raid(s)?
Bolt
BoltOP•2mo ago
I'm wanting to setup a dynamic raid configuration Because I want it to be as efficient as possible Like how does hypixel never run out of storage
MDev
MDev•2mo ago
There are several techniques that can be used to expand storage and never go down / offline. A lot of times a plain expand drive to existing RAID pool can also be done without needing to restart. But the pool itself will become somewhat unusable / slow during this operation Pure efficiency is raid 0 but you'll lose all data protection measures that higher raid configs have! Only these higher configs will allow you to expand and or replace drives without downtime but with some performance bottlenecks I wouldn't recommend raid 0 unless you have decent periodic backup's of all the data on a separate server with a fault-tolerant raid onfig 🙂
Want results from more Discord servers?
Add your server