hyperqueue

package
v0.0.0-...-1be87f1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package hyperqueue provides a sharded WorkqueueService implementation that consistently distributes keys across N backend workqueue services using consistent hashing.

Hyperqueue acts as a transparent router that implements the WorkqueueService gRPC interface. It takes a slice of backend WorkqueueServiceClients and routes incoming requests to the appropriate shard based on the request key.

Keys are assigned to shards using FNV-1a hashing:

hash(key) % len(backends) -> shard index

This ensures:

  • Deterministic routing: the same key always routes to the same shard
  • Even distribution: keys are roughly evenly distributed across shards
  • Fast computation: FNV-1a is a fast non-cryptographic hash

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a sharded WorkqueueServiceServer from the provided backend clients. The shard count is determined by len(backends). Keys are consistently routed to shards using hash(key) % len(backends).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL