在我的应用程序配置中使用 IP 地址

发布于 2024-10-19 16:37:41 字数 245 浏览 2 评论 0原文

多年来,我们一直在配置数据库中使用 IP 地址(所谓的点分四边形)来识别远程主机。

我们有一位新开发人员坚持认为我们应该使用名称而不是数字来连接到远程计算机上的进程。

这听起来不错,理论上,因为并非所有名称都能在我们公司的地理区域之间解析。我还担心,虽然它似乎在开发或质量保证环境中工作(正如他向我展示的那样),但整个事情会在生产中爆炸,当爆炸发生时我们会被抓到。

我怎样才能让他相信 IP 地址比主机名更好?

For many years we have been using IP addresses (so-called dotted quads) in our configuration database to identify remote hosts.

We have one new developer who insists that we should use names and not numbers to connect to proceses on remote machines.

This sounds alright in theory by not all names will resolve between geographic regions in our company. I am also concerned that while it may seem to work in a development or QA environment (as he has shown me) the whole thing will blow up in production and we'll be caught with our pants down when the explosion happens.

How can I convince him that IP addresses are better than hostnames?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

避讳 2024-10-26 16:37:41

(作业?)

我很惊讶“爆炸”还没有发生。

使用 DNS/主机名,因为...

  • ...您可以在眨眼之间更改网络中所有客户端的主机名的目标 IP
  • ...主机名更容易记住(对于人类)
  • ...IP 地址可能改变;特别是如果您使用“公共”IP 地址
  • ...如果主机名发生更改(或修复配置文件),则无需重新编译代码。

请先了解一些基本的 DNS(域名服务器)技术。

您可能需要每个区域位置上有一个本地 DNS 服务器(网关/路由器旁边)和一个“中央”名称服务器(可能由专业托管提供商托管)。

(Homework?)

I'm surprised "the explosion" didn't happen yet.

Use DNS/hostnames because...

  • ... you can change the target IP of a hostname for all clients in the network in the blink of an eye
  • ... hostnames are easier to remember (for humans)
  • ... IP addresses might change; especially if you are using "public" IP addresses
  • ... you don't have to re-compile code if a hostname changes (or fix configuration files)

Please learn a bit about basic DNS (Domain Name Server) techniques first.

You might want a local DNS server (next to the gateway/router) on each regional location and a "central" name server (possibly hosted by a professional hosting provider).

清眉祭 2024-10-26 16:37:41

这完全取决于部署环境。你最好支持两者

编辑:

先生,你没有听别人想说的话。看起来您在提问之前就已经下定决心,现在您只是在寻求您的意见的支持。抱歉,这里不行。

It totally depends on the deployment environment. You better support both.

Edit:

You sir are not listening to what other people are trying to say. It looks like you already made up your mind before asking the question and now you are just looking for support of your opinion. Sorry, it doesn't work like this here.

爱格式化 2024-10-26 16:37:41

当部署 IPv6 时,虚线四边形不会特别有用。

Your dotted quads aren't going to be particularly useful when IPv6 is deployed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文