可接受的http请求率
我想向我的应用程序添加一个功能,该功能可以解析 HTML 页面并依次跳转到每个 。
我从每个页面加载中收集标题、描述和关键字,并且不加载任何其他内容,并且不打算允许跳转超过一个深度。
这本身就是 NSURLDownload
和 NSXMLDocument
的一个简单应用程序,但我想知道......
是否有一个可接受的请求率不会使我的应用程序看起来像 DOS事件就好像我只是以从父页面解析子请求的速度流出子请求,那么我怀疑这会很快被检测到。
I want to add a feature to my applications which parses an HTML page and jumps out to each <a href="http:\\foo" >
in turn.
Im gathering title,description and keywords off each page load and loading nothing else and dont intend to allow the jump to be more than one in depth.
This in itself is a trivial application of NSURLDownload
and NSXMLDocument
but what I want to know...
Is there an acceptable rate of requests that wont make my app look like a DOS event as if I just flow out the child requests at the rate I parse them from the parent page then I suspect this will very rapidly get detected as such.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该遵守机器人排除协议。 RFC 2616 指定每个主机名最多有 2 个并发请求的限制,但是现代浏览器已经超越了这一限制,并且规范的这一部分可能会相应地进行修订。无论如何,
NSURLConnection
可能会在内部使用连接限制,但您应该检查这一点。You should conform to the robots exclusion protocol. RFC 2616 specifies a limit of 2 concurrent requests per hostname, however modern browsers go past this and this part of the specification is likely to be revised in accordance. It's likely that
NSURLConnection
will use a connection limit internally anyway, but you should check this.