Rate limiting isn't something your app should be concerned about. That should be handled a layer up, e.g. nginx. Chances are it does a much better job than whatever you could come up with.
Maybe if it's trivial blanket rate-limiting on a single server.
Anything more complicated that needs synchronization/database access, I'd rather just read and maintain application-level middleware. It's not rocket science.