1

I'm currently polling the youtube rss feed servers about 3 times per second (multiple channels getting the feed every 3 seconds each). Is this too much and will getting it this often result in getting updates slower since it's going to start caching it for me? I'm trying to get new videos updated as quickly as possible but I can't find any gudielines on this sort of stuff.

I used to get them using the /v3/search/ at the same rate but the response from my server was always late compared to what I got when I did it on my local machine(where I didn't poll this often).

Also, is there any good alternatives? (I tried to push notifications but they were highly unreliable)

WinterDev
  • 348
  • 1
  • 11

1 Answers1

1

You should be using caching in your app to reduce bandwidth and latency. When caching, store the eTag so that you can include it when getting a resource. If the resource has not changed, you will get a 304 response code (NOT MODIFIED), which means you can use your cached version. Otherwise, you will get the updated version of the resource.

More info: https://developers.google.com/youtube/v3/getting-started#etags

reinierkors
  • 507
  • 6
  • 19
  • I tried Etags but couldn't get them for the life of me when I made a request to the api using java... But anyways, I ended up fixing my issues with the push notifications and now I get the videos instantly. I should probably find out how Etags work anyways if I'm going to be working with other api's in the future tho. – WinterDev Feb 11 '16 at 01:14