I recently moved my Rails app from Heroku to Render. NewRelic is showing that my Redis performance has degraded significantly. I’ve attached a screenshot from NewRelic showing the last couple of weeks (the gap is a few days when I had removed NewRelic). September 25th is when I moved my server over to Render (I moved my db from Heroku to Crunchy Bridge a week earlier). The graph shows that my redis performance when it was on Heroku (via Redis Cloud) was consistently under 6ms but now it’s between 20 and 40ms.
One thing I’d like to know is are there any performance differences between the different Redis plan you offer? If I switched to a more expensive plan should I expect the same performance? I have 2 redis instances (one for my Rails cache and one for my Sidekiq background job queue) & both are on the Standard plan because I don’t need very much RAM – neither instance has had more than 200M of data stored.
Side note: NewRelic is showing a similar decrease in my Ruby execution speed. That’s decreased from ~20ms to now ~60ms. But I’m not sure if that’s due to ruby’s interactions with redis or not.
I’m looking into what might be causing these performance issues. Your current plan appears to be appropriate for your workload based on Redis’ metrics, but I will update you further.
I am not seeing any abnormalities with your production Redis instances. On Heroku, were you using the Redis Enterprise Cloud with their 250MB plan?
I do see that you have ~25 concurrent connections and ~6 blocked clients using the info command from the redis-cli. I encourage you to look at these stats further.
Entering a shell into your web service, I tried running redis-cli -h red-cco7lpcgqg47haknasv0 --latency which reported min: 0, max: 52, avg: 1.21 (1446 samples), or 1.21 milliseconds of latency. The problem is likely not network latency.
Yes, one of my Redis Cloud instances was on the 250MB plan & the other was a 100MB plan.
Thanks for the tip on the blocked clients. I’ll see if I can figure out what’s going on there. I guess I’ll try playing out with my Redis client’s config. I’d just left it as it was from Heroku
No, I never found anything odd in my config. New Relic is reporting that my redis performance has gotten steadily better over the last couple of weeks. Here’ a screenshot: