A simple throttle class might be a better interface to the existing throttle functions. The global redis instance limits the ability to use multiple instances easily and generally isn't a great pattern. The alternative of passing a redis instance to each function doesn't seem great either. A class would make it easily to encapsulate some of this logic and settings.