Pergunta

Question: does the instagram realtime API automatically unsubscribe you from high-volume subscriptions (e.g., popular tags)?

I have successfully subscribed to realtime feed updates for a couple of modest-volume tags, and I can see all updates.

However, when I subscribe to high-volume tags (e.g., ones that get multiple updates per second), even when I rate-limit my API requests on my end, I stop getting notifications from Instagram. They just stop hitting my callback URL. I checked to see whether I was still subscribed, and my subscriptions still appear. Just nothing is coming through.

Instagram states that their newsgroup is closing down and that they are monitoring StackOverflow, so I am asking this question here. If they are sending data at such a high rate that they throttle (even though I have built throttling into my platform), that is a problem that cannot be solved by users of their API.

UPDATE Checking the subscriptions, it actually demonstrates that I get auto-unsubscribed from the high-volume tag subscriptions after a few seconds. Benchmarking, it looks like I send my response to them within 0.1 milli-seconds, and they ask for a response within 2 seconds, so I believe that non-responsiveness on my end is not the problem.

Foi útil?

Solução

It appears that Instagram is not auto-unsubscribing from high volume tags UNLESS your server is not responding quickly enough.

Although it was not obvious to me at the time, it seems that there must have been times where my server was taking 2 seconds to respond, possibly due to concurrent calls on some blocking resource.

After posting this question, I ripped out everything from my HTTP responder except for one method call to copy the data that Instagram sent; everything else happens asynchronously, so if there is any blocking it does not prevent the HTTP response from going back to Instagram. I am able to stay subscribed to multiple high-volume tags (including the #1 tag on Instagram) without getting auto-unsubscribed.

It also does seem to be true (and undocumented) that if you fall behind/respond slowly, you get unsubscribed from the problematic tag.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top