Welcome! Log In Create A New Profile

Advanced

Implement New Load Balancing Algorithm

Posted by uyung 
Implement New Load Balancing Algorithm
February 24, 2015 06:44AM
How to implement new load balancing algorihtm in nginx? i found a new method from one paper to do a load balancing using content-based, and i want to try to realize this method in my own cluster in my laboratory..i spend 2 days google it
Re: Implement New Load Balancing Algorithm
February 24, 2015 07:42AM
It depends how you detect which content is which, with Lua you can peek into requests at lower levels and then decide which upstream to use.

So you need to explain first what the test criteria is before we can think of a way to manage them.

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: Implement New Load Balancing Algorithm
February 24, 2015 08:28AM
Actually i'm new in nginx, the truth is i still don't have a plan about this.. But i have one concept to cluster every request coming from client by requested header or page. Let's say i have cluster A and cluster B. If request contains only GET method or page that only showing result from querying database i will redirect the request to cluster A. Then if request contains POST method or page that contains some form to be filled, i will redirest the request to cluster B. In fact, i will use layer 7 to read this, or maybe there is another another way to read it.

Sorry for my bad english
Re: Implement New Load Balancing Algorithm
February 24, 2015 08:44AM
You can use 'map' to set a variable based on several client browser values and use that variable to pass the request to whichever proxy or fcgi server.

Some reading stuff:
http://forum.nginx.org/read.php?2,194480,194990#msg-194990
http://www.cyberciti.biz/faq/nginx-redirect-backend-traffic-based-upon-client-ip-address/
http://www.kutukupret.com/2011/05/11/nginx-reverse-proxying-multiple-domains-using-map-module/

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: Implement New Load Balancing Algorithm
February 24, 2015 09:05AM
Anyway thanks for the information about map, it's really nice thing.. But my problem isn't the way to pass the request to some server, i have to implement my own algorithm on nginx. It is have to be done with implementing my algorithm to know it's really work. The thing i hope i know is the way nginx load balance a cluster using chosen method (e.g. round robin, least conn)
Re: Implement New Load Balancing Algorithm
February 24, 2015 10:07AM
Well without knowing what exactly you want to do we can't advice if, or how, it can be done :)

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 204
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready