- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
If they really cared they'd put a rate limit on the service, so don't fret too much
Edit Admin
So you sent requests to their API 3 times per hour? I somehow doubt that they noticed being "hammered".
Edit Admin
It could be read as one set of requests every 30 minutes, one every 15 minutes and one every 5 minutes, for a total of 2+4+12 = 18 requests per hour. Of course, I still don't see how that counts as "hammered", unless it's the colloquial meaning of "hammered", meaning "very drunk".
Edit Admin
It could be there's an implied multiplier of "for each API endpoint" or "per business entity (customer, order, etc.)" Then it might be 18 * 204 or something. Enough to show up on the logs, anyway.
Or not.
Admin
Even if it is 60 times per hour, that's still pretty minor in the grand scheme of things. That third-party API provider probably has hundreds of clients, and so something every 5 minutes or less frequent is business as usual.
Thank you for caring, but this is far from hammering, and probably no one noticed because it was such "low" volume. Barely enough to make a dent on the monitoring graphs.
Admin
Depending on just how thoroughly the spaghetti and meatballs were intertwined, "as soon as we get access, we download the data" could mean that every time the token was refreshed, the full data set was downloaded again.
Also, there's no number given but "Every single consent for that day kept getting refreshed, over and over" does suggest that every query sent to the API received it's own token, and that every single one of those was being refreshed every five, fifteen and thirty minutes in a painfully over-complicated version of Fizz-Buzz.
I've seen worse, but don't envy anyone the task of trying to untangle it all.
Edit Admin
The missing part of the story is what happens after 24 hours when the token actually expires? Does someone have to manually log-in or something? What's the issue?
Admin
This is confusing or just not written clearly enough.
Admin
Or it's a case of "I had to suffer through trying to understand this mess, so now let me share some of that pain"
Edit Admin
I've seen some pretty crazy uses for APIs where that sort of refresh happens way too often, sometimes just as sort of an "is there an internet connection" checker. We've then had to have conversations with the clients about what they're actually doing for those cases and why they're choosing our API to determine that sort of thing.
Also have some APIs where people seem to be just stepping through large amounts of data for ... something. Usually a good indication that we need a better search function somewhere to return just the data desired. :)
Edit Admin
Sounds like a form of OAuth2 with refresh tokens.
Usually you have to log in and you get an access token and a refresh token. The access token lets you do your work for a short period of time (~an hour). After an hour the token expires. You can then use a refresh token to get a new access token (and a replacement refresh token) so you don't have to ask the user to log in again. If the refresh token expires, then you have to ask the user to log in again to get new tokens.
Edit Admin
Oh no. It sounds like a caching service implemented (or meddled with) by someone who doesn't understand caching.