8000 GitHub - rore/finagle-es-proxy: A demo proxy to Elasticsearch using finagle
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

rore/finagle-es-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

finagle-es-proxy

See the blog post about this code here.

This is an example of using [finagle] (https://github.com/twitter/finagle) as a proxy to [Elasticsearch] (http://elasticsearch.org). It demonstrates proxying using the Elasticsearch native client, and creating an authentication layer in front of Elasticsearch.

The ESProxy object is a server (created using the cool [Twitter Server] (https://github.com/twitter/twitter-server) template) that proxies all requests to an Elasticsearch cluster. The cluster settings (hosts and cluster name) can be controlled via initialization parameters (see the [ESProxy] (https://github.com/rore/finagle-es-proxy/blob/master/src/main/scala/im/rore/ESProxy.scala) code).

Doing a simple HTTP proxy to Elasticsearch is rather trivial. But building a proxy using the Elasticsearch native client requires a little hacking. We 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 our own server.

This example also shows how to add an authentication filter to the server which can be used to secure Elasticsearch for unauthorized access.

About

A demo proxy to Elasticsearch using finagle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0