# Loadbalancing with nginx not effective working

**URL:** <https://discuss.elastic.co/t/loadbalancing-with-nginx-not-effective-working/196889>\
**Category:** Elasticsearch\
**Created:** [August 27, 2019, 7:08am UTC](https://discuss.elastic.co/t/loadbalancing-with-nginx-not-effective-working/196889 "2019-08-27T07:08:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![khergner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khergner/32/130758_2.png) [@khergner](https://discuss.elastic.co/u/khergner)\
**Post date:** [August 27, 2019, 7:08am UTC](https://discuss.elastic.co/t/loadbalancing-with-nginx-not-effective-working/196889/1 "2019-08-27T07:08:48Z")

</div>

Hi,  
I want to use F5 load balance because ı have 2 nodes  
ı get the following error at nginx

```
2019/08/27 09:56:20 [error] 13388#11836: *529 no live upstreams while connecting to upstream, client: 127.0.0.1, server: , request: "POST /_bulk HTTP/1.1", upstream: "http://elasticsearch/_bulk", host: "127.0.0.1:8080"
2019/08/27 10:06:14 [error] 13388#11836: *700 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 127.0.0.1, server: , request: "POST /_bulk HTTP/1.1", upstream: "http://127.0.0.1:9200/_bulk", host: "127.0.0.1:8080"

```

My arch.  
Logstash --\> F5\* --\> Elasticsearh1 || Elasticsearch2 --\> Kibana  
**My nginx conf**

```
events {
    worker_connections 1024;
}
http {
  upstream elasticsearch {
    server 127.0.0.1:9200;
    server 127.0.0.1:9201;
    server 127.0.0.1:9202;
    keepalive 15;
  }
  server {
    listen 8080;
    location / {
      proxy_pass http://elasticsearch;
      proxy_http_version 1.1;
      proxy_set_header Connection "Keep-Alive";
      proxy_set_header Proxy-Connection "Keep-Alive";
    }
  }
}

```

How can ı solution above error?  
Regards

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 24, 2019, 7:08am UTC](https://discuss.elastic.co/t/loadbalancing-with-nginx-not-effective-working/196889/2 "2019-09-24T07:08:48Z")

</div>

Closed on September 24, 2019, 7:08am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
