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 关于#网络安全#的问题:求ensp的网络安全,不要步骤要完成版文件
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥20 使用Photon PUN2解决游戏得分同步的问题
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM