民意调查政策 [英] policy for polling rss

查看:159
本文介绍了民意调查政策的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序可以在网上查看几个RSS源。

I have an application that polls several rss sources on the web.

轮询其他网络服务器时的礼节是什么。投票的频率等等?

What is the etiquette when polling other's web servers. How frequently to poll, etc?

最佳做法是什么?

推荐答案


  1. 使用HTTP缓存。发送 Etag LastModified 标头。识别 304未修改响应。这样可以节省大量带宽。此外,一些脚本识别 LastModified 标题并仅返回部分内容(即只有两个或三个最新项目,而不是全部30个左右)。

  1. Make use of HTTP cache. Send Etag and LastModified headers. Recognize 304 Not modified response. This way you can save a lot of bandwidth. Additionally some scripts recognize the LastModified header and return only partial contents (ie. only the two or three newest items instead of all 30 or so).

不要从支持 RPC Ping的服务中推送RSS (或其他PUSH服务,例如 PubSubHubbub )。即如果您从服务接收PUSH通知,则不必在标准时间间隔内轮询数据 - 每天执行一次以检查机制是否仍然有效(ping可以被禁用,重新配置,损坏等等) )。这样您就可以仅在接收通知时获取RSS,而不是每小时左右。

Don’t poll RSS from services that supports RPC Ping (or other PUSH service, such as PubSubHubbub). I.e. if you’re receiving PUSH notifications from a service, you don’t have to poll the data in the standard interval — do it once a day to check if the mechanism still works or not (ping can be disabled, reconfigured, damaged, etc). This way you can fetch RSS only on receiving notification, not every hour or so.

检查TTL(在RSS中)或缓存控制头(在ATOM中过期,并且在资源到期之前不要获取。

Check the TTL (in RSS) or cache control headers (Expires in ATOM), and don’t fetch until resource expires.

尝试适应新项目的频率在每个RSS提要中。如果在过去一周内,特定Feed中只有两个更新,请不要每天多次获取。 AFAIR Google阅读器可以做到这一点。

Try to adapt to frequency of new items in each single RSS feed. If in the past week there were only two updates in particular feed, don’t fetch it more than once a day. AFAIR Google Reader does that.

降低夜间或网站流量较低时的费率。

Lower the rate at night hours or other time when the traffic on your site is low.

最后,每小时做一次。 ;)

At last, do it once a hour. ;)

这篇关于民意调查政策的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆