Brother wants to be a simple point server cluster load balancer forwards the request to achieve a simple function like. Not much clue, I do not know how to achieve all of the www access requests received , and then according to the load on the server node status handed out .
prawns to the point guidance ah , try java style achieved. Appreciate the ~ ~ ~
------ Solution ---------------------------------- ----------
unless there are some very special requirements , or not necessary , " according to the load on the server node status handed out ."
Considering that you have to ensure that the "session stickiness" to the problem , it is recommended to be processed directly Hash would be more convenient.
Here is a simple example can refer to the following :
http://www.tidytutorials.com/2009/12/simple-java-proxy-servlet-using.html
------ Solution ----------- ---------------------------------
simplify complex issues , take into consideration you will find , load balancing is entire service on the link " choke point ", so if the deal is too complex , it will become the biggest obstacle performance .
So in fact the real system which generally end with a hardware load balancer or EngineX such super lightweight Web server to do load balancing.
The only thing had to consider that the session adhesion problem, is the same JSessionId requests , the need is still distributed on a server.
If you intend to do with the performance of a great relationship , I recommend "Constructing High Performance Web Sites" , Electronic Industry Press, see.
------ Solution ---------------------------------------- ----
Oh, if the purpose is to learn , then, how to do too much.
step by step :
1, the first to achieve a single node forwards ;
2, multi- node Feel free to forward ;
3, multi- node rule ( such as the first cycle , then the node is the least number of connections ) forwarding ;
4, implement session adhesion ;
5, to achieve cache ( that is, the same requests are not forwarded directly to the last request cached data to go back ) ;
6, and so on ...
Come on !
------ For reference only -------------------------------------- -
sense to consider something that is a lot of, external www request came back, if it is only forwarded to the cluster service node did not feel good , if the request is similar to the request , then they have to re- establish a new connection , more waste of resources. I do not know whether it is correct, I suggest you take a look at the heroes slightly , thank you , ldh911.
------ For reference only -------------------------------------- -
being and performance is not so much Oh, I hope we can use a similar lvs teacher or haproxy this soft way to achieve load balancing. I had no contact with this stuff , it is now only a general understanding of how this is going
way to achieve load balancing hardware of course much higher efficiency than the software implementation , I is not doing business with , oh , that is hoping to try to achieve their own out of a simple load balancer , as a practice exercise.
is feeling confused I do not know where to start ,
------ For reference only ---------------------- -----------------
I can easily add your QQ it ? Many do not understand where you may need to ask , do not mind and you want to become friends .
------ For reference only -------------------------------------- -
a mention plus QQ, I was a bit wilt . . . Preceded by a lot of people , and sometimes all but come back .
The main problem is : QQ content on only you can see . The contents of the forum , everyone can search . Sharing degree are too different .
------ For reference only -------------------------------------- -
Oh, also , oh , carry forward the spirit of sharing is very important ah , so that more people can learn something, to solve similar puzzles .
Thank you slightly , let me know more about this stuff , have questions to ask you again , it is recommended to see what information , then please feel free to enlighten me ah !
------ For reference only -------------------------------------- -
ashamed , since out of the school , the really buy their own books relatively less . Most of the time is the basis of its own , and then search the Internet directly to the knowledge needed .
personal habits , I just like to understand the principle , but less focus on hands-on , so often is that some ideas but yourself is very slow ( because there is always to check ) ; according to the principle means to determine whether there is feasible , then then search for the target means ; also detours.
------ For reference only -------------------------------------- -
actually used to achieve load balancing servlet Redirector it is still very simple , just a request is forwarded out later , if the server node to the corresponding problems when requesting service , the correct approach should be to collect information related to this service , and then transferred to another server up right now . Do not know how it feels to achieve ah
------ For reference only ----------------------------- ----------
I feel their very lack of principle knowledge
没有评论:
发表评论