Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tfw_sched_hash: implement Highest Random Weight (Rendezvous) hashing #58

Closed
wants to merge 2 commits into from

Conversation

vdmit11
Copy link
Contributor

@vdmit11 vdmit11 commented Feb 20, 2015

The HRW hashing method allows to stick HTTP messages to their home back-end
servers, and preserve this mapping even if the number of servers is changed.

In order to achieve that, the tfw_sched_hash is updated. Now it hashes not only
HTTP requests, but also servers (TfwServer objects). For each incoming HTTP
request it searches for a best match among all server hashes.
Each Host/URI hash has only one best matching TfwSrver hash which is chosen,
and thus any request always goes to its home server unless it is offline.

@vdmit11 vdmit11 force-pushed the rendezvous-hashing branch 2 times, most recently from c1eda11 to 7ea9443 Compare March 27, 2015 13:19
@vdmit11
Copy link
Contributor Author

vdmit11 commented Mar 27, 2015

Done some fixes. @krizhanovsky, please review it again.

@@ -515,3 +515,4 @@ tfw_addr_sa_len(const TfwAddr *addr)
validate_addr(addr);
return (addr->family == AF_INET6) ? sizeof(addr->v6) : sizeof(addr->v4);
}
EXPORT_SYMBOL(tfw_addr_sa_len);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented many times: do not pollute space of exported symbols names. The function is pretty short and must be moved to .h file instead of being exported.

@vdmit11
Copy link
Contributor Author

vdmit11 commented Apr 22, 2015

The pull request is obsolete. Now these changes are the part of the iss78 branch.

@vdmit11 vdmit11 closed this Apr 22, 2015
@krizhanovsky krizhanovsky deleted the rendezvous-hashing branch May 4, 2015 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants