I picked the wrong place to refresh my Redis know-how
I started this post with the intention of making some notes about my experiences with learning more about how to apply Redis to solve a few common problems, but I stumbled across some out of date content and odd behaviour of the redis.io website so I'm making some notes about that instead.
Rate limiting
Java sample code missing
This was of interest as it sometimes comes up in interviews, so I wanted to look into an elegant solution.
https://redis.io/learn/howtos/ratelimiting
As I am mainly a Java developer, I followed the instructions for Java but didn't get very far as the repository that is mentioned seems to have been cleared out.
The commit history seems to indicate that the repository has not been updated for a couple of years, so this wasn't a great start.
Python. NodeJS and Ruby all show as still having code in their Github repositories.
Website connection timeout
The references section on the rate limiting howto page linked to pages that result in timeouts.
I don't know the details, so I'm speculating that somewhere in the configuration between Cloudflare and redis.io the "not found" situation goes into a timeout black hole. To test but not necessarily prove that theory I have attempted to access a non-existent page under the redis.io site and observed that it results in the same timed out error.
What have we learnt?
Not much about Redis, but a little bit about some grey areas of the redis.io website.
If you're applying a content delivery network (CDN) to front for your website then be sure to pay attention to how errors will be handled.
Handling of "not found" URLs isn't a difficult optional extra feature to have in place.
Reported to the AI Chatbot
Unsurprisingly the AI Chatbot on the redis.io site wasn't able to reason about the Cloudflare configuration or the empty Github repository when I mentioned the issues.
Comments
Post a Comment