i would claim that this foreign key shard is not even necessary  the shard table can just be a   dumb   mapping of ip board  where no ips have the same board  on every heartbeat the moblab sends it is ip  and receives any incomplete jobs with the given board  which you will then insert if not exists any unleased hosts with the given board easy 