Consistent Hash Implementation in Perl

2017-12-16 07:08Edit this page

OpenResty has consistent hash implementations in Lua and C that produce the same results as nginx, used to achieve consistent hash results identical to nginx within OpenResty. However, there was no such module in Perl, so I referenced the Lua and C code (basically pixel-level copying) and implemented consistent hash in Perl with identical results (test cases verified).

Project at: https://github.com/xiaocang/perl-balancer

TODO: No XS version implementation yet

Unless otherwise stated, articles on this blog are licensed under the Creative Commons Attribution 4.0 International License. Please credit the original author and source when sharing.


Tags: perl

Leave a comment

Creative Commons © 2013 — 2026 xiaocang | Theme based on fzheng.me & NexT | Hosted by Netlify