HTTP Server


The Droonga HTTP Server is as an HTTP protocol adapter for the Droonga Engine.

The Droonga Engine supports only the fluentd protocol, so you have to use fluent-cat or something, to communicate with the Drooga Engine. This application provides ability to communicate with the Droonga Engine via HTTP.


It is released as the droonga-http-server npm module, a Node.js module package. You can install it via the npm command, like:

# npm install -g droonga-http-server


Command line options

It includes a command droonga-http-server to start an HTTP server. You can start it with command line options, like:

# droonga-http-server --port 3003

Available options and their default values are:

--port <13000>
The port number which the server receives HTTP requests at.
--receive-host-name <>
The host name (or the IP address) of the computer itself which the server is running. It is used by the Droonga Engine, to send response messages to the protocol adapter.
--droonga-engine-host-name <>
The host name (or the IP address) of the computer which the Droonga Engine is running on.
--droonga-engine-port <24224>
The port number which the Droonga Engine receives messages at.
--default-dataset <Droonga>
The name of the default dataset. It is used for requests triggered via built-in HTTP APIs.
--tag <droonga>
The tag used for fluentd messages sent to the Droonga Engine.
If you specify this option, log messages are printed to the standard output.
--cache-size <100>
The maximum size of the LRU response cache. Droonga HTTP server caches all responses for GET requests on the RAM, unthil this size.

You have to specify appropriate values for your Droonga Engine. For example, if the HTTP server is running on the host and the Droonga engine is running on the host with following configurations:


  type forward
  port 24324
<match books.message>
  name localhost:24224/books
  type droonga
<match output.message>
  type stdout


  "version": 2,
  "effectiveDate": "2013-09-01T00:00:00Z",
  "datasets": {
    "Books": {

Then, you’ll start the HTTP server on the host, with options like:

# droonga-http-server --receive-host-name \
                      --droonga-engine-host-name \
                      --droonga-engine-port 24324 \
                      --default-dataset Books \
                      --tag books

See also the basic tutorial.

Built-in APIs

The Droonga HTTP Server includes following APIs:


GET /tables/<table name>

This emits a simple search request. The source is filled by the table name in the path. Available query parameters are:

Corresponds to output.attributes. The value is a comma-separated list, like: attributes=_key,name,age.
Corresponds to condition.*.query. The vlaue is a query string.
Corresponds to condition.*.matchTo. The vlaue is an comma-separated list, like: match_to=_key,name.
Corresponds to condition.*.matchEscalationThreshold. The vlaue is an integer.
Corresponds to condition in the script syntax. If you specity both query and script, then they work with an and logical condition.
Corresponds to adjusters.
Corresponds to sortBy. The value is a column name string.
Corresponds to output.limit. The value is an integer.
Corresponds to output.offset. The value is an integer.

Groonga HTTP server compatible API

GET /d/<command name>