doutao5419 2016-05-23 18:57
浏览 32
已采纳

子域http请求与外部域http请求速度

I have a question regarding http requests. I have a web service with api endpoint at the sub-domain of one website but the api is actually used by two websites.

Basically we have website1.com and website2.com and the api server is located at api.website1.com so when website1 is using the api then the request is sent to it's own subdomain. But when the website2 is using the api it is sending request to api.website1.com which is fully external request.

Would it speed up the requests if I clone api server to the subdomain of website2 or there will be no difference in terms of connection speed?

  • 写回答

1条回答 默认 最新

  • dongxun3424 2016-05-23 19:18
    关注

    All else being equal, it makes no difference.

    If the sites were hosted on different computers and your change meant that an API would move to the same computer as the site that was making requests to it, then you would reduce the amount of network use which would speed things up.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图2.0 版本点聚合中Marker的位置无法实时更新,如何解决呢?
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题