Closed 19h closed 10 years ago
Strange, works now w/o intervention:
[ { createIndex: 72,
modifyIndex: 72,
key: 'hello',
flags: 0,
value: 'world' } ]
Ha, yeah sorry... I accidentally committed that throw to remind my self to figure out all the response code's it uses. I would point to master for the next week as some things flesh out.
@KenanSulayman fixed in 010a2784bc30829e82467adc690d0294f3e834ed
@KenanSulayman also, if you run your app via DEBUG=* node your-app.js
you will get the response codes and other goodies. Please paste in here so I can fix or submit a PR with a fix :-)
Thanks! :+1: for DEBUG=*
, I usually never use env variables.
Btw, wouldn't it be faster to use plain tcp sockets? I'll look into it
@KenanSulayman conul's RPC API does not support all the features of the HTTP API. However, I think it would make sense to support both.
Maybe something like:
var consul = require('consul-node');
// http client
var api = consul.http({ host: 'localhost' });
// tcp client
var rpc = consul.rpc({ host: 'localhost' });
// dns utility
var dns = consul.dns({ host: 'localhost' });
Nice. Actually I mean the communication to the HTTP interface, though.
I just rewrote the Requestor.prototype.get
to connect over a TCP socket and send a plain buffer ("GET /path HTTP/1.1") and was able to reduce the first-byte-latency by almost 50% on my Mac. I guess the abstractions of request are quite expensive for this particular "atomic" use-case.
Let's see, everything is possible.
:walking:
Ah, I see... I think once everything is working, I would just drop down to the native http|https
modules if needed. Despite the speed benefits, there is a lot that would have to be done to correctly support everything over raw TCP and I'd rather spend that time implementing and maintaining the endpoints.
Drop this on your λmaster lib/requestor.js and check the differences: http://data.sly.mn/code/1n2r1T3k091e/requestor.patch
:walking:
Hi,
we're giving Consul a spin because it sounds fruitful but stumbled over an issue.
We're running a node in datacenter (1) and another in datacenter (2), where node (2) is joining dc1, the cluster of node (1). So far so good, both give positive signals.
When doing this:
=>
... is thrown
_Update_
When upgrading to latest master, this is thrown instead:
aha, this is pointing to
return callback(new Error('not implemented'));
.. fun that the error fails to error :facepunch: