Api call statistics

I write a lot of api, myself. These api may be called by many three parties. How should I count the situation of each third party calling api? should the statistics be updated before each call to the API, and then return the interface data? or should multithreading deal with this problem, both at the same time?


typically stores an original record when the interface is called, and then another service (or thread) is used alone to update statistics based on the original record.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e47851-44c32.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e47851-44c32.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?