1,463 karma · joined June 25, 2011
- Pushing Through Friction by Dan Na: https://youtu.be/8bxZuzDKoI0?si=FRVYc-XAK_HuRNs3. Great talk about how ideas get stalled in the big organisational machine, and what you can do about it.
- You Deserve Nice Things by Soroush Khanlou: https://youtu.be/CTZOjl6_NuY?si=a1pmGILQzGR9T4Wv. Eye opener about making nice-to-use data structures / APIs.
- The Most Important Design Guideline by Scott Meyers: https://youtu.be/sfLZ7v9gEnc?si=QFNdmcguaOHbmFfX. A fun exploration of badly designed software.
The simulation retries failed requests using various retry strategies, and then after a successful request will wait a configured amount before sending the next request.
Enjoy! :)
TIL! Seems like it can have tricky emergent behaviour. I bet if you implement it wrong you can end up in very weird situations. I should visualise it. :)
Funnily, you'll notice that some of the visualisations have the clients staggering their first request. It's exactly for this reason. I wanted the visualisations to be as deterministic as possible while still feeling somewhat realistic. This staggering was a bit of a compromise.
Not sure what is meant by "if your exponential backoff counter is not global", though. Would love to know more about that.
I've been thinking about creating a separate repo to house the source code of posts I've finished so people can see it. I don't like all the bundling and minification but sadly it serves a very real purpose to the end user experience (faster load speeds on slow connections).
Until then feel free to email me (you'll find my address at the bottom of my site) and I'd be happy to share a zip of this post with you.
I'll look about giving it a nod in the text, thank you for the feedback. :)
I had fun with the details of the explosion animation. When it explodes, the number of requests that come out is the actual number of in-progress requests.
I’m the author of this post, and happy to answer any questions :)
I deliberately didn't go in to that for a few reasons.
1. It would have made this article very, very long. 2. It's a bit out of scope for an article on hashing. 3. I think I might give hash maps their own article in future.
Hash maps are fantastically deep. So many different ways to do it. You'll find a lot of material online but I'd recommend Raymond Hettinger's talk on how Pythons hash map data structure has evolved over time: https://www.youtube.com/watch?v=p33CVV29OG8.
I figured that people who know enough to point this out already know what's up. People who don't will benefit from the code being easier to read.
I wrote a version that used 2-element arrays but the code became more dense and I worried about losing people. I was hoping that how easy it would be to translate it to not use objects would give me a pass here, but apparently not :D
I've noticed in this post that a 2nd character that's a proxy for an "expert" in a topic would also be handy. Taking suggestions for a good dog breed to represent this character.
Some load balancers do use hashing in much the same way hash maps do. Usually they'll take a combination of: source IP, source port, destination IP, destination port, and hash it. They'll then use that hash to pick a server. The practical impact of this is that each user always gets mapped to the same server. This is typically called "session sticky load balancing" because it means session information about that user can live on the server, safe in the knowledge that the user will always end up on that server and not get routed to any others.
Thanks for exposing me to xxhash! I'll store that away as an alternative to murmur3 if I ever need one in future. :)
Thank you, sir! As soon as I can reliably spell “quaternions” I will think about trying it.
Funnily, one of the ideas I have cooking in my head is going to require a foray into 3D.