This is a tough question to phrase in the limited space for the title, but I'll try my best to explain myself. I want the users of my website to be able to run the servers themselves. Those servers would be valued and rated. I want to submit those values to my load balancer so that it weights the traffic between all the servers based on how powerful they are. The load balancer should dynamically balance the load between temporary servers, so every time someone starts up a server, it would be added to the list of servers to balance with their weighted score. How would I do this? Could it be done at all? diagram
Asked
Active
Viewed 215 times
1 Answers
0
I can't quite grasp what problem you're trying to solve, nor do I understand what you intend to achieve by letting your users run your website infrastructure...
But to "dynamically add servers to a load balancer" you have roughly two different strategies:
your loadbalancer provides an API (and you trigger an API call to add/remove servers from a pool)
your loadbalancer supports a service discovery mechanism.
A fairly common one is DNS. You use for example a singlemyservice.example.com
hostname in the loadbalancer pool/backend configuration and when servers are added/removed you don't need to change the loadbalancer config, but only the DNS record:myservice.example.com. 90 IN A 192.168.2.131 myservice.example.com. 90 IN A 192.168.2.132 myservice.example.com. 90 IN A 192.168.2.133

Rob
- 1,175
- 1
- 7
-
i was thinking of using NGINX, does it have an API to use? all of the ip addresses being balanced are from different networks, so would that also work? – Nick M Apr 28 '22 at 10:20