Looking for some efficiency guidance for an app with high API usage

Hey guys!

I run a Discord bot called CouchBot and I’m currently rebuilding him from scratch. Previously, using v5 … I just polled for everything. With the shift to Helix and my rewrite aligning … I felt like now was a good time to create a hybrid approach to how the back end process works. I’ve got almost 6,000 tracked unique Twitch channels, about 100 channels, and I’m going to be adding community tracking as well.

The polling approach works. I can get it under the Rate Limit of 120 per minute. However, I’m seeing this as a chance to do things the most efficient way.

Things I’d like to track:

  1. Stream online/offline
  2. Channel feed messages
  3. Follower notifications

I’ve looked at Webhooks and PubSub.

  • Webhooks allows for 1000 subscriptions. With 6000 channels, 1 subscription for Follows, 1 subscription for Stream Up/Down, that’s 12,000 subscriptions and the bot grows daily.

  • PubSub allows for 50 topics per connection, which we’ll blow away pretty quickly. We could multi-thread connections - but with 10 allowed, that’s 500. We still push past that.

I’m curious what you guys think the best approach would be? As I understand it - I can request higher limits. What is the likelihood of that occurring?

Thanks for your time guys :slight_smile:

I’d recommend requesting higher rate limits and using the webhooks. Sounds like that’s the right tool for the job here.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.