When Simple Wins: Power of 2 Load Balancing
1–10 of 49 posts
Re: When Simple Wins: Power of 2 Load Balancing
#21) Θ( log n = log / log n )
2) Θ(log log n)
Re: When Simple Wins: Power of 2 Load Balancing
#3This solves caching too since you are only ever receiving and caching user data on a single server. No cache communication required. You can enforce it on the server side for security as well.
Doesn't require a load balance server - just an extra line of code.
Keep it simple.
Re: When Simple Wins: Power of 2 Load Balancing
#4The simplest load balancing I've done is modulo the user ID by the number of servers then point at that server. This solves caching too since you are only ever receiving and caching user data on a single server. No cache communication required. You can enforce it on the server side for security as well. Doesn't require a load balance server - just an extra line of code. Keep it simple.
Re: When Simple Wins: Power of 2 Load Balancing
#5The simplest load balancing I've done is modulo the user ID by the number of servers then point at that server. This solves caching too since you are only ever receiving and caching user data on a single server. No cache communication required. You can enforce it on the server side for security as well. Doesn't require a load balance server - just an extra line of code. Keep it simple.
Re: When Simple Wins: Power of 2 Load Balancing
#6The simplest load balancing I've done is modulo the user ID by the number of servers then point at that server. This solves caching too since you are only ever receiving and caching user data on a single server. No cache communication required. You can enforce it on the server side for security as well. Doesn't require a load balance server - just an extra line of code. Keep it simple.
But where is the modulo being calculated?
Re: When Simple Wins: Power of 2 Load Balancing
#7The simplest load balancing I've done is modulo the user ID by the number of servers then point at that server. This solves caching too since you are only ever receiving and caching user data on a single server. No cache communication required. You can enforce it on the server side for security as well. Doesn't require a load balance server - just an extra line of code. Keep it simple.
Load balancing based on consistent hashing is the better way to implement this.
Re: When Simple Wins: Power of 2 Load Balancing
#8Earlier quoted context omitted.
But where is the modulo being calculated?
[removed, brain failure]
Re: When Simple Wins: Power of 2 Load Balancing
#9I like 2Choice because it is not dependent on hash function design & is temporal, but I have a positive aversion to the 2^n hash distributions when it comes to data, specifically for distributed systems which need to flex up/down [1].