xiaolong
xiaolong

Reputation: 1

How to connect with an Elasticsearch cluster using Nginx to do the reverse proxy?

I am using elastic.v3 (for Elasticsearch 2.3/2.4)

In order to load balance, I use nginx to do the reverse proxy。It provides an agent address.Through the curl command I can random access to the nodes in the cluster with the agent address,but how to connect the cluster thorough the agent address use elastic.v3 client for load balance?

Upvotes: 0

Views: 2830

Answers (1)

Kulasangar
Kulasangar

Reputation: 9434

You should have the routing to your elasticsearch cluster as such within your configuration:

server {
    listen 8080;
    location / {
        proxy_pass http://localhost:9200;
    }
}

Maybe you might want to have a look at these: Deploying NGINX Plus with Elasticsearch & Setting up nginx for ES. Hope it helps to get started.

Upvotes: 1

Related Questions