I am asking this question in the context of DRF but this can be generalized too. We are maintaining an API service where we are serving 1K+ real-time requests. In the current scenario, we are counting the API calls in real-time, i.e. we are updating the database column of API calls count against the user for each API call.
But is there an effective method? For example, logging the API calls somewhere else and then updating the database after a few minutes? Or is this fine what we are doing at the moment? How large-scale API services might be handling this? No specific content is available on the web for this problem.