-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Description
Hi, thanks for go-ipam!
When running go-ipam as a gRPC microservice with multiple instances + Redis, we see frequent optimistic lock conflicts under concurrent IP allocations/releases (~30 QPS, multiple namespaces). This leads to retries and higher latency.
From the code/behavior it seems each operation:
Uses an optimistic lock on a namespace key in Redis
Reads namespace state → modifies in memory → writes back
This works well for read-heavy loads, but becomes a bottleneck with steady concurrent writes.
For a simplified use case (mainly prefix + IP allocation/release), could we support an alternative Redis backend that:
For each {namespace, prefix}, keeps all allocatable IPs in a Redis SET
Allocation: SPOP (or SRANDMEMBER + SREM)
Release: SADD
This would rely on Redis atomic SET operations instead of namespace-level optimistic locking, potentially reducing conflicts in write-heavy scenarios.
Questions:
Would such a “SET-based” mode/backend fit the project direction (even as an optional/experimental feature)?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status