Building a distributed WaitGroup with Go and Redis
If you’ve done any concurrency work in Go you’ve used WaitGroups. They’re awesome!
Now lets say you have a bunch of workers that do some stuff, but at some point they all need to hit a single API that your rate limited against.
You could move to just using a single process and limiting it that way, but that doesn’t scale out very well.
While there are quite a few distributed lock libraries in Go, I didn’t find any that worked similarly to WaitGroups, so I set out to write one.
Josh Rendek