diff --git a/conf/nutch-default.xml b/conf/nutch-default.xml
index d28e588..a9031ab 100644
--- a/conf/nutch-default.xml
+++ b/conf/nutch-default.xml
@@ -248,6 +248,13 @@
+
+ http.store.responsetime
+ true
+ Enables us to record the response time of the
+ host which is fetch a page from start connection to end connection.
+
+
diff --git a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
index a2f798d..4ac8ac7 100644
--- a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
+++ b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
@@ -19,11 +19,13 @@
// JDK imports
import java.io.IOException;
import java.net.URL;
+import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.LinkedList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.avro.util.Utf8;
import org.apache.hadoop.conf.Configuration;
import org.apache.nutch.net.protocols.Response;
import org.apache.nutch.protocol.Content;
@@ -33,6 +35,7 @@
import org.apache.nutch.protocol.ProtocolStatusCodes;
import org.apache.nutch.protocol.ProtocolStatusUtils;
import org.apache.nutch.storage.WebPage;
+import org.apache.nutch.util.Bytes;
import org.apache.nutch.util.GZIPUtils;
import org.apache.nutch.util.DeflateUtils;
import org.apache.nutch.util.MimeUtil;
@@ -41,6 +44,8 @@
import crawlercommons.robots.BaseRobotRules;
public abstract class HttpBase implements Protocol {
+
+ private final static Utf8 RESPONSE_TIME = new Utf8("_rs_");
public static final int BUFFER_SIZE = 8 * 1024;
@@ -130,7 +135,15 @@
try {
URL u = new URL(url);
+
+ long startTime = System.currentTimeMillis();
Response response = getResponse(u, page, false); // make a request
+ long elapsedTime = System.currentTimeMillis() - startTime;
+
+ if(this.getConf().getBoolean("http.store.ip.address", true)) {
+ page.putToMetadata(RESPONSE_TIME, ByteBuffer.wrap(Bytes.toBytes(elapsedTime)));
+ }
+
int code = response.getCode();
byte[] content = response.getContent();
Content c = new Content(u.toString(), u.toString(),