Example - ES proxy using finagle and the native client


I've created an example project showing a proxy server to Elasticsearch
using Finagle https://github.com/twitter/finagle (scala/Java).
You can check out the code here: https://github.com/rore/finagle-es-proxy

The project demonstrates two interesting things:

  1. Using the native Java client inside the proxy. Using the native
    client makes the proxy cluster aware and eliminates the need for an
    additional round trip.
    (It also demonstrates how to do a simple HTTP proxy, but that is
    trivial. Using the native client requires a small hack - you need to pass
    the request to the REST controller of Elasticsearch, provide it with a mock
    channel to capture the response and return it in through the proxy.)
  2. Creating an authorization filter as part of the finagle service
    chain. This allows the proxy to function as an authentication layer in
    front of Elasticsearch for securing it.
    Since the proxy uses the native client, using it as an authentication
    layer has a minimal overhead.

Hope you find it useful.

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.