我可能会考虑使用key => value存储方法，比如redis，并将这些数据远离主数据存储，这样你的节流验证不会堵塞主数据服务器。
I'm creating a private RESTful API that is to be consumed by my mobile application. I want to set usage limit to the functions on the basis of users (a client has to register to use the app). I'm confused as to how to achieve that. Do I store API call count against every user, fetch and check it on every request and update it once a request is executed successfully? Wouldn't it create extraordinary overhead on the server as users start to grow? Is there any faster way to achieve that?
You will have to record usage against each user, if you are doing for every API method, then this will create exponential data usage per user, and you should consider this when choosing your data-storage method.
I would probably consider a key=>value storage method for this, like redis, and keep this data away from your main data store, so that your throttle validation isn't clogging up the main data server.