简体   繁体   English

在 IIS vm 上使用 localhost 或公共域名

[英]On IIS vm use localhost or public domain name

I have multiple applications running on a iis vm.我有多个应用程序在 iis vm 上运行。 These applications are publicly available through site.example.com and site2.example.com.这些应用程序可通过 site.example.com 和 site2.example.com 公开获得。

They also connect with each other through a webservice in .net.它们还通过 .net 中的网络服务相互连接。

Which is better to use Localhost to connect or using the public domain names?使用Localhost连接和使用公共域名哪个更好? Especially looking in performance.尤其是看性能。

When you use the localhost, the request goes through DNS and using the public domain, the browser will looking for IP address from DNS first this is the main difference.当您使用 localhost 时,请求通过 DNS 并使用公共域,浏览器将首先从 DNS 中查找 IP 地址,这是主要区别。

But talking about the performance improvement localhost will have batter performance compare to the public domain, but for maintenance purposes, it's better to use the public domain.但是说到性能提升 localhost 会比公共域有更好的性能,但出于维护目的,最好使用公共域。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM