PHPackages                             dkkoma/hrw - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dkkoma/hrw

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dkkoma/hrw
==========

Rendezvous(highest random weight) hashing

121[1 PRs](https://github.com/dkkoma/hrw/pulls)PHPCI passing

Since Jan 15Pushed 4w ago1 watchersCompare

[ Source](https://github.com/dkkoma/hrw)[ Packagist](https://packagist.org/packages/dkkoma/hrw)[ RSS](/packages/dkkoma-hrw/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (3)Used By (0)

[![](https://github.com/dkkoma/hrw/workflows/Test/badge.svg)](https://github.com/dkkoma/hrw/workflows/Test/badge.svg)
=====================================================================================================================

[](#)

HRW
===

[](#hrw)

This is Rendezvous(highest random weight) hashing library. It requires PHP7+.

Installation
------------

[](#installation)

```
composer require dkkoma/hrw
```

Usage
-----

[](#usage)

```
$nodes = ['node-1', 'node-2', 'node-3'];
$hrw = new Hrw\Hrw($nodes);

$key = 'test-key';

$node = $hrw->pick($key); // node-2
```

FYI
---

[](#fyi)

[https://en.wikipedia.org/wiki/Rendezvous\_hashing](https://en.wikipedia.org/wiki/Rendezvous_hashing)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance62

Regular maintenance activity

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/50fd1c8f2e0eb6bebca73c1fe10a405d7dd753fe4b3fe526f97520ce9baa5feb?d=identicon)[dkkoma3](/maintainers/dkkoma3)

---

Top Contributors

[![dkkoma](https://avatars.githubusercontent.com/u/1209568?v=4)](https://github.com/dkkoma "dkkoma (15 commits)")[![kengos](https://avatars.githubusercontent.com/u/968151?v=4)](https://github.com/kengos "kengos (1 commits)")

### Embed Badge

![Health badge](/badges/dkkoma-hrw/health.svg)

```
[![Health](https://phpackages.com/badges/dkkoma-hrw/health.svg)](https://phpackages.com/packages/dkkoma-hrw)
```

###  Alternatives

[joaopaulolndev/filament-edit-env

Package to edit env file

322.5k](/packages/joaopaulolndev-filament-edit-env)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
