![](/img/trans.png)
[英]how to link local IP Address to a domain name in local network, so website can be accessible to any device using the domain name?
[英]Is there a substantial overhead when connect to a database by the domain name instead of the IP Address, over a local network?
通过域名而不是IP地址通过本地网络连接到数据库时,会产生大量开销吗?
我有一个应用程序服务器,该服务器将连接到在单独实例但具有相同本地网络上运行的mongodb服务器。 DNS查找有大量开销吗?
例如:
[ app ]
1.1.1.1:27017
> [ Mongo ]
VS
[ app ]
mongo.example.com:27017
> [ Mongo ]
编辑
通常认为使用IP地址代替域名是一种最佳做法吗?
更多信息:
谢谢!
查找名称有时会出现延迟,可能会很长时间。 但是结果将被缓存在任何合适的操作系统上,因此大多数连接都不必等待DNS查找。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.