Just a gotcha i want to mention to anyone reading. ApacheBench is a good first start.
Just a gotcha i want to mention to anyone reading. ApacheBench is a good first start.
wrk, h2load, boom, vegeta are more sound load testing tools.
Whats with the nitpicking on hacker news?
For instance, try and read a map, it will crash your code.
It won't show this as a problem until you have real traffic on your service.. Hitting it in your browser isn't enough to test properly.
Slightly ambiguous wording, so just to clarify:
Go maps are safe to read concurrently
Go maps are not safe to read AND write concurrently
Go maps are not safe to write concurrently
I suppose one ought to guard such maps with a RW lock, or a `sync.Map` which is tailor-made for this kind of situation.
Go designed their map implementation to be unsafe for both read and write. I kind of don't care, i was trying to point out something simple and everyone is nitpicking.