gethostbyaddr()瓶颈? [英] gethostbyaddr() bottleneck?

查看:50
本文介绍了gethostbyaddr()瓶颈?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当IP地址上没有rDNS记录时,可能需要一段时间才能反向查找超时。我正在考虑如何在追踪器上你可以观察延迟。


如果是这样,那么调用gethostbyaddr()会延迟服务网页,

对吗?因为gethostbyaddr()没有分叉到一个单独的进程中。所以我

假设我需要调用gethostbyaddr()作为脚本的最后一项任务。

听起来合适吗?或者还有另一种延迟方式吗?

解决方案

RJ_32写道:


IP地址上没有rDNS记录,然后可能需要一段时间才能反向查找超时。我正在考虑如何在追踪器上你可以观察延迟。


如果是这样,那么调用gethostbyaddr()会延迟服务网页,

对吗?因为gethostbyaddr()没有分叉到一个单独的进程中。所以我

假设我需要调用gethostbyaddr()作为脚本的最后一项任务。

听起来合适吗?或者还有其他方法可以延迟吗?



为什么你甚至试图调用gethostbyaddr()?你需要什么

在你的页面?


即使它是你页面上的最后一件事,它仍会延迟

交付页面内容。


-

================ ==

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


Jerry Stuckle写道:


RJ_32写道:


>当IP地址上没有rDNS记录时,可能需要
而反向查找才能超时。我正在考虑如何在tracert上你可以观察延迟。

如果是这样,那么调用gethostbyaddr()可以延迟网页的服务页面,<对吗?因为gethostbyaddr()没有分叉到一个单独的进程中。
所以我想我需要调用gethostbyaddr()作为
脚本的最后一项任务。
听起来不错吗?或者还有其他方法可以延迟吗?



为什么你甚至试图调用gethostbyaddr()?您需要什么

在您的页面?



只是为了记录访客来自哪里。


我会想到当我想要检查日志时,可能会运行一个单独的批处理。


>

即使它是您页面上的最后一件事,它仍然会延迟

页面内容的传递。



然后flush()解决了吗?


RJ_32写道:


Jerry Stuckle写道:


> RJ_32写道:


>>当IP地址上没有rDNS记录时,可能需要
而反向查找才能超时。我正在考虑如何在tracert上你可以观察延迟。

如果是这样,那么调用gethostbyaddr()可以延迟网页的服务页面,<对吗?因为gethostbyaddr()没有分叉到一个单独的进程中。
所以我想我需要调用gethostbyaddr()作为
脚本的最后一项任务。
听起来不错吗?或者还有其他方法可以延迟吗?


为什么你甚至试图调用gethostbyaddr()?您在页面中需要什么?



仅用于记录访客来自哪里的日志。


我会想到可能会运行一个单独的批次,所以当我想要检查日志时,


>即使它是'在您的页面上的最后一件事,它仍将延迟页面内容的传递。



然后flush()解决了吗?



不,它赢了''吨。但那是错误的做法。这就是服务器

日志的用途。


-

========== ========

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


When there is no rDNS record on an IP address, then it might take a while for
the reverse lookup to timeout. I''m thinking of how on a tracert you can
observe the delay.

If so, then calling gethostbyaddr() can delay the serving of the web page,
right? Because gethostbyaddr() is not forked into a separate process. So I
suppose I''d need to call gethostbyaddr() as the very last task for a script.
Does that sound right? Or is there another way around the delay?

解决方案

RJ_32 wrote:

When there is no rDNS record on an IP address, then it might take a while for
the reverse lookup to timeout. I''m thinking of how on a tracert you can
observe the delay.

If so, then calling gethostbyaddr() can delay the serving of the web page,
right? Because gethostbyaddr() is not forked into a separate process. So I
suppose I''d need to call gethostbyaddr() as the very last task for a script.
Does that sound right? Or is there another way around the delay?

Why are you even trying to call gethostbyaddr()? What do you need it
for in your page?

And even if it''s the last thing on your page, it will still delay
delivery of the page content.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


Jerry Stuckle wrote:

RJ_32 wrote:

>When there is no rDNS record on an IP address, then it might take a
while for
the reverse lookup to timeout. I''m thinking of how on a tracert you can
observe the delay.

If so, then calling gethostbyaddr() can delay the serving of the web
page,
right? Because gethostbyaddr() is not forked into a separate process.
So I
suppose I''d need to call gethostbyaddr() as the very last task for a
script.
Does that sound right? Or is there another way around the delay?


Why are you even trying to call gethostbyaddr()? What do you need it
for in your page?

just for a log to get an idea of where the visitors are coming from.

I''d alternatively thought of maybe running a separate batch so to speak when I
wanted to inspect the log.

>
And even if it''s the last thing on your page, it will still delay
delivery of the page content.

Then would flush() solve that?


RJ_32 wrote:

Jerry Stuckle wrote:

>RJ_32 wrote:

>>When there is no rDNS record on an IP address, then it might take a
while for
the reverse lookup to timeout. I''m thinking of how on a tracert you can
observe the delay.

If so, then calling gethostbyaddr() can delay the serving of the web
page,
right? Because gethostbyaddr() is not forked into a separate process.
So I
suppose I''d need to call gethostbyaddr() as the very last task for a
script.
Does that sound right? Or is there another way around the delay?

Why are you even trying to call gethostbyaddr()? What do you need it
for in your page?


just for a log to get an idea of where the visitors are coming from.

I''d alternatively thought of maybe running a separate batch so to speak when I
wanted to inspect the log.

>And even if it''s the last thing on your page, it will still delay
delivery of the page content.


Then would flush() solve that?

No, it won''t. But then this is the wrong approach. That''s what server
logs are for.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


这篇关于gethostbyaddr()瓶颈?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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