> ## Documentation Index
> Fetch the complete documentation index at: https://help.decodo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 代理速度问题

## **住宅代理**

许多因素会影响住宅代理的速度：不同的ISP、位置、移动信号强度等。

尽管如此，我们的代理网络已针对最佳速度进行了优化，我们的平均代理响应时间可能从大约半秒到几秒不等，具体取决于国家和其他各种因素。

<img src="https://mintcdn.com/decodo/eRLuBYAbadfvmqDE/images/docs/2828a6317516834a42a4d04a85f5bb6ed5b3cd90e3e84b930e14717f4048c768-Group_427323121.png?fit=max&auto=format&n=eRLuBYAbadfvmqDE&q=85&s=851e37d267bcdb46f6de5ad73bb7a9c7" style={{ width:"64%" }} className="mx-auto" width="3448" height="3064" data-path="images/docs/2828a6317516834a42a4d04a85f5bb6ed5b3cd90e3e84b930e14717f4048c768-Group_427323121.png" />

由于住宅代理的性质，某些IP比其他IP更快。如果您遇到速度问题，请尝试更改端口和/或端点。然后，运行几次测试以查看是否解决了问题。

您使用的工具也会影响代理速度。例如，网络浏览器连接总是会慢得多，因为它必须加载每个媒体文件。您自己的互联网连接和位置也会影响连接速度。

### 我们如何使用Python测试住宅IP速度

此Python代码向美国端点发送500个请求以进行轮换会话，并打印出单个请求所需的最低、最高和平均响应时间，以及500个请求中成功请求的数量。您只需要更改用户名和密码变量，当然，如果您愿意，也可以更改端点/端口。

<CodeGroup>
  ```python Python theme={null}
  import time
  import requests
  url = 'https://ip.decodo.com/ip'
  username = 'user'
  password = 'pass'
  proxy = f'http://{username}:{password}@us.decodo.com:10000'
  average = 0
  lowest = 50
  highest = 0
  success = 0
  for i in range(500):
      start = time.time()
      response = requests.get(url, proxies={'http': proxy, 'https': proxy})
      end = time.time()
      total = (end - start)
      print(total)
      average += total
      if total < lowest: lowest = total
      if total > highest: highest = total
      if response.status_code == 200: success += 1
      else: print(response.status_code)
      if i == 499:
          print("average: " + str(average / 500))
          print("lowest: " + str(lowest))
          print("highest: " + str(highest))
          print("success: " + str(success))
  ```
</CodeGroup>

***

## **数据中心代理**

数据中心代理通常比住宅代理更快。为了获得最佳速度，您应该选择离您最近的代理。查看**数据中心按流量付费**代理提供的位置[**这里**](https://help.decodo.com/docs/cn/datacenter-pay-per-gb-proxy-locations)，以及**数据中心按IP付费**代理提供的位置[**这里**](https://help.decodo.com/docs/cn/datacenter-pay-per-ip-proxy-locations)。

***

<Columns cols={2}>
  <Card title="支持" href="https://direct.lc.chat/12092754" cta="让我们聊聊！">
    需要帮助或只是想打个招呼？我们的支持团队全天候为您服务。 \
    您也可以随时通过电子邮件 [support@decodo.com](mailto:support@decodo.com) 联系我们。
  </Card>

  <Card title="反馈" href="mailto:feedback@decodo.com" cta="分享反馈">
    找不到您要找的内容？请求一篇文章！ \
    有反馈意见？分享您对我们如何改进的想法。
  </Card>
</Columns>
