English 中文(简体)
Java中的简单*权威DNS服务器*
原标题:Simple *Authoritative DNS Server* in Java
  • 时间:2011-02-11 20:22:32
  •  标签:
  • java
  • dns

是否有一个已经编写好的只实现权威响应的Java DNS服务器。我想把源代码移到我们将要开发的DNS服务器中,该服务器将使用自定义规则集来决定使用什么TTL和发布什么IP地址。

服务器将不是缓存服务器。它只会返回权威的结果,并且只会在世界卫生组织的域名记录上发布。它永远不会被直接调用。

服务器必须发布MX记录、A记录和SPF/TXT记录。该计划是使用DNS来帮助多个位置的网关服务器之间的负载平衡(我们知道DNS在这一领域的影响力很小)。此外,当网关服务器停机时(故意或意外),它将停止发布网关服务器的IP地址(当然,DNS只能在长时间停机期间提供帮助)。

我们将自己为这一切编写逻辑。。但我非常想从一个经过一点测试的DNS服务器开始,而不是从头开始。

然而,只有当我们复制的内容足够简单时,这才是可行的。否则,结果可能是浪费时间

最佳回答

乔治,

I guess what you need is a java library which implements DNS protocol. Take a look at dnsjava

就所有类型的记录和类的完整规范覆盖而言,这是非常好的。

But the issue which you might face with a java based library is performance. DNS servers would be expected to have a high throughput. But yes, you can solve that by throwing more hardware.

如果性能是您关注的问题,我建议您调查未绑定

问题回答

http://www.xbill.org/dnsjava/

Unfortunately, the documentation states "jnamed should not be used for production, and should probably not be used for testing. If the above documentation is not enough, please do not ask for more, because it really should not be used."

然而,我不知道还有什么更好的选择。

You could take a look at Eagle DNS: http://www.unlogic.se/projects/eagledns

它已经存在了几年了,现在已经经过了很好的测试。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...