(转自:http://www.devcomments.com/DNS-server-in-node-js-at291155.htm)
Sep 4, 2010 |
 Donovan
|
Hi,
as anyone had any thoughts or experience on the idea of writing a simple DNS server in node.js? I'm working on a geo-aware service that would benefit from users being referred to their nearest server using DNS alone. I've looked at the NginX module and Apache mod_geoip:
http://wiki.nginx.org/NginxHttpGeoIPModule
http://www.maxmind.com/app/mod_geoip
which would both work, but the most efficient way is to answer each individual DNS request with the most local ip, for which the BIND patch is suitable:
http://www.caraytech.com/geodns/
But, seeing as everything else is so easy to write in node.js, I thought it made a lot of sense to simply respond to port 53 requests using the service itself, therefore every deployment could also deal with DNS without complicated BIND installs and no need for Apache or Nginx! If I add new servers in new locations I could alter a simple conf in Github and git pull to every server and it's done!
The spec of TinyDNS seems about right:
http://cr.yp.to/djbdns/tinydns.html
Anyone got any thoughts or ideas? node-geodns?
Cheers,
Donovan.
|
|
Sep 4, 2010 |
 Paul Querna
|
You might also be interested in pgeodns:
<http://geo.bitnames.com/>
it is what several open source groups (apache, perl, etc) use to do geo-based load balancing.
|
|
分享到:
相关推荐
speech-to-text-nodejs, IBM Watson语音到文本服务的样例 node.js 应用程序 向文本浏览器应用程序添加语音 在文本转换中使用了ibm的语音识别功能来将多种语言中的语音转换成文本,从而实现文本的转换。 传入音频的...
基于uni-app和nodejs开发的在线学习微信小程序源码.zip 代码完整下载即用,无需修改确保可以运行。 基于uni-app和nodejs开发的在线学习微信小程序源码.zip 代码完整下载即用,无需修改确保可以运行。基于uni-app...
前端开源库-microtime-nodejsmicrotime nodejs,用于microtime(https://github.com/wadey/node-microtime)包的本机javascript填充程序
Wechat-NodeJS微信公众平台开发NodeJs SDK,本SDK要求NodeJs >= 4.x,欢迎大家在issues提问。 安装 npm install wechat-nodejs 说明 使用所有sdk功能前需要初始化wechat句柄
node-websocket-client, NodeJS的Web Socket客户端 一个 Prototype Web Socket 客户端实现 node.js 。测试 miksago/node-websocket-server v1.2.00.需要 nodejs 0.1.98或者更高版本。安装按如下方式使用 np
line-bot-sdk-nodejs, 用于在线消息传递API的node.js SDK line-bot-sdk-nodejs 用于在线消息传递API的Node.js SDK正在启动安装使用 npm插件:$ npm install @line/bot-sdk文档参考指南。API参考
# Access the project folder in the cmd / terminal $ cd UDP-TCP-Nodejs # Install the dependencies $ npm install 剧本 # UDP server $ npm run udpserver # UDP client $ npm run udpclient # TCP server $ ...
nodejs-microservice-starter, NodeJS RESTful API Microservice Starter NodeJS RESTful API Microservice v1.2.0这个存储库包含运行 NodeJS rest式 API Microservice启动器的完整配置。 要求NodeJS用于本地开
vscode-debug-nodejs-es6, 如何使用VSCode调试 ES6 NodeJS vscode-debug-nodejs-es6如何使用VSCode调试 ES6 NodeJS 先决条件VSCode: http://code.visualstudio.com/NodeJS: https://nodejs.o
color-sdk-nodejs 安装 $ npm install git+https://github.com/avinoamr/color-sdk-nodejs.git 用法 var color = require ( "color-sdk-nodejs" ) ; var conn = new color . SDK ( "APIKEY" , "APISECRET" ) ; ...
用node.js实现区块链开发,对区块链开发有兴趣的同学可以下载看看
webpack-iconfont-plugin-nodejs 使用svg文件构建iconfont文件(ttf,woff2,woff,eot,svg),css文件,js数据文件和html预览文件。 特征: Iconfont输出格式:WOFF2,WOFF,EOT,TTF和SVG。 生成CSS文件,js...
jcr-oak-rpc-api-nodejs 用于通过 nodejs 访问 Jacrabbit Oak 存储库的 Api 入门 安装模块: npm install jcr-oak-rpc-api-nodejs var jcr - oak - rpc - api - nodejs = require ( 'jcr-oak-rpc-api-nodejs' ) ;...
co-fs, nodejs核心fs模块 thunk"co" node 核心 fs 包装函数,返回 co的thunk 。安装$ npm install co-fs示例使用所有常规的非同步fs函数,无回调地狱:var json = yield fs.readFile('
spm-agent-nodejs 这是的代理。 收集以下信息并将其传输到SPM(云或本地版本): 操作系统指标(CPU /内存) 进程记忆 EventLoop统计信息 垃圾收集器统计 Web服务器统计信息(请求,错误率,响应时间等)适用于...
jotform-api-nodejs - NodeJS 客户端安装$ npm install jotform文献资料您可以在找到此客户端 API 的文档验证JotForm API 需要所有用户相关调用的 API 密钥。 您可以在我的帐户页面的创建您的 API 密钥。例子 var ...
服务器初始化和MySQL-PHP-Python 3-Redis-Nodejs-Nginx-ikev2自动安装脚本,包括站点管理工具_initServer
Ansible-ansible-role-nodejs.zip,使用不可操作角色提供nodejs和npm模块的ansible角色:nodejs,ansible是一个简单而强大的自动化引擎。它用于帮助配置管理、应用程序部署和任务自动化。
思路:温湿度计通过MQTT协议连接到IoT套件,规则引擎针对数据上报Topic配置转发到函数计算(FunctionComputer)中编写好的函数pushData2DingTalk,函数Nodejs脚本处理数据,post到钉钉群机器人的Webhook,配置了温湿度...