- floor: documentation ( source)
- sprintf: documentation ( source)
- crc32: documentation ( source)
<?php
$numberOfShards = 20;
$route = '/ca/health-and-wellness/articles/822109/choosing-a-fit-friend';
$site = 'sheknows.com';
$type = 301;
$dest = 'http://somewhere.com';
$shard = floor(crc32($route) % $numberOfShards);
$key = sprintf('redirects:%s:%s', $site, $shard);
echo $key;