OVH Community, your new community space.

Best way to load balance


Kode
16-08-2014, 18:29
Quote Originally Posted by ctype_alnum
Why not use a CDN?
Because a CDN has nothng to do with load balancing an API that is output by 2 or more backend servers?

As it happens, Cloudflare *IS* a CDN, and I use it for serving the resources on the actual site and for serving the images provided by the API (Over the last 30 days it has saved me 19.5 TB bandwidth out of 31.8 TB total bandwidth), for the API the DNS is provided by cloudflare so that it can use the ssl certificate but the actual requests bypass the cloudflare network.

ctype_alnum
16-08-2014, 16:21
Why not use a CDN?

Kode
15-08-2014, 21:28
Quote Originally Posted by Razakel
It's OVH only. Your best bet is probably some sort of round-robin technique.
Exactly what I'm using at the moment

so currently I'm using a dedicated server with a 1gbit connection running nginx to do the load balancing

Razakel
15-08-2014, 17:12
Quote Originally Posted by Kode
Hi Danny, thanks for your reply, I have looked at the load balancing IP before and it does look interesting. Can it be used with SYS or is it OVH only?

It probably wouldn't work for me though as, while I'm looking to bring some servers back to OVH(SYS), not all of them would be on OVH.

Also I use cloudflare pro which already provides me will an SSL cerrtificate so I would be paying twice for it from the looks of it.

It's mostly theoretical though, I'm not pushing anywhere near that bandwidth at the moment, so currently I'm using a dedicated server with a 1gbit connection running nginx to do the load balancing for my API, and that is serving nearly 300 million requests a month
It's OVH only. Your best bet is probably some sort of round-robin technique.

Kode
15-08-2014, 09:14
Hi Danny, thanks for your reply, I have looked at the load balancing IP before and it does look interesting. Can it be used with SYS or is it OVH only?

It probably wouldn't work for me though as, while I'm looking to bring some servers back to OVH(SYS), not all of them would be on OVH.

Also I use cloudflare pro which already provides me will an SSL cerrtificate so I would be paying twice for it from the looks of it.

It's mostly theoretical though, I'm not pushing anywhere near that bandwidth at the moment, so currently I'm using a dedicated server with a 1gbit connection running nginx to do the load balancing for my API, and that is serving nearly 300 million requests a month

Dani
14-08-2014, 13:10
Hi

There is the option of the OVH load balancing IP at:

https://www.ovh.co.uk/solutions/ip-load-balancing/

It would work with multiple servers. Where by if we have 4 servers each with 500 Mbps, the load balancing IP server request at 2Gbps though its highly unlikely you would meet these limits as it would be also dependent on the ACE limit.

As for the actual application of the load balancing, if we have 4 servers and there is 100 connections coming in, you will have the following:

Connection 1 >> backend server 1
Connection 2 >> backend server 2
Connection 3 >> backend server 3
Connection 4 >> backend server 4
Connection 5 >> backend server 1
Connection 6 >> backend server 2
Connection 7 >> backend server 3
etc

I hope this helps

Thanks

Danny

Kode
24-07-2014, 18:36
Not with DSR

http://blog.haproxy.com/2011/07/29/l...r-return-mode/

Pros
  • very fast load-balancing mode
  • load-balancer network bandwith is not a bottleneck anymore
  • total output bandwith is the sum of each backend bandwith
  • less intrusive than the layer 4 load-balancing NAT mode
on the other hand I have no idea how to enable DSR or even if you can, it might only be possible with their appliances.

Razakel
24-07-2014, 15:44
Quote Originally Posted by Kode
It appears HAproxy might allow you to do it, https://www.digitalocean.com/communi...ncing-concepts according to that used as a layer 4 load balancer "The user accesses the load balancer, which forwards the user's request to the web-backend group of backend servers. Whichever backend server is selected will respond directly to the user's request." Whether that is accurate or not I'm not sure.
Yeah, but you're still limited to the 250mbps throughput of the server running the load balancer.

Kode
23-07-2014, 20:14
It appears HAproxy might allow you to do it, https://www.digitalocean.com/communi...ncing-concepts according to that used as a layer 4 load balancer "The user accesses the load balancer, which forwards the user's request to the web-backend group of backend servers. Whichever backend server is selected will respond directly to the user's request." Whether that is accurate or not I'm not sure.

Razakel
23-07-2014, 17:50
I don't think there is a workaround, really. OVH's load balancing would let you do this, but that's limited to the professional servers.

Maybe shift your large files onto some Kimsufis and link the user to a randomly-selected server?

Kode
23-07-2014, 16:16
I've never really used load balancing except through nginx and currently with cloudflare round robin, however neither are that great an option.

Take this example:

You have 10 servers, each have 250mbit connections, so potentially you have 2.5gbit throughput

With round robin DNS it will pick an IP every 30 seconds, so every 30 seconds a single server gets hammered, total throughput 250mbit

With nginx again theres a single endpoint so even though there are another 9 servers behind it throughput will again be limited to the 250mbit on the single machine, the only reason this is a better option is if cpu load is high as the work can be shared.

Is there a better solution that would allow you to make the most out of what you have?