From 695ba488e139b31e91fc0c988138eed9ecd676a4 Mon Sep 17 00:00:00 2001 From: Reg Chiu Date: Thu, 19 Oct 2023 01:17:09 +0800 Subject: [PATCH] Add ordered lists number for 6 common load-balancing algorithms (#6) --- README.md | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index c07fed8..ff32bf0 100644 --- a/README.md +++ b/README.md @@ -422,24 +422,31 @@ The diagram below shows 6 common algorithms. - Static Algorithms -1. Round robin -The client requests are sent to different service instances in sequential order. The services are usually required to be stateless. +1. Round robin -2. Sticky round-robin -This is an improvement of the round-robin algorithm. If Alice’s first request goes to service A, the following requests go to service A as well. + The client requests are sent to different service instances in sequential order. The services are usually required to be stateless. -3. Weighted round-robin -The admin can specify the weight for each service. The ones with a higher weight handle more requests than others. +3. Sticky round-robin -4. Hash -This algorithm applies a hash function on the incoming requests’ IP or URL. The requests are routed to relevant instances based on the hash function result. + This is an improvement of the round-robin algorithm. If Alice’s first request goes to service A, the following requests go to service A as well. -Dynamic Algorithms -Least connections -A new request is sent to the service instance with the least concurrent connections. +4. Weighted round-robin -Least response time -A new request is sent to the service instance with the fastest response time. + The admin can specify the weight for each service. The ones with a higher weight handle more requests than others. + +6. Hash + + This algorithm applies a hash function on the incoming requests’ IP or URL. The requests are routed to relevant instances based on the hash function result. + +- Dynamic Algorithms + +5. Least connections + + A new request is sent to the service instance with the least concurrent connections. + +7. Least response time + + A new request is sent to the service instance with the fastest response time. ### URL, URI, URN - Do you know the differences?