Skip to content

Use Redis-native atomic ops for concurrency counter instead of Go mutex #9

@Hariprasath8064

Description

@Hariprasath8064

Right now the concurrent request counter is protected with a process-local sync.Mutex in redisDB.go. This fixes race conditions inside a single process but serializes all access from that process and does not provide atomicity across multiple processes/containers using the same Redis key. We should replace the mutex-based approach with a Redis-native atomic solution (e.g., a small Lua script or atomic INCR/DECR pattern that enforces the concurrency limit server-side), so that the "check + increment" for the concurrency limit is performed atomically in Redis and scales correctly across all load tester instances.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions