Skip to content

Connecting to Riak KV cluster through Nginx Reverse Proxy  #385

Closed
@SserwangaV

Description

@SserwangaV

I'm trying to connect to the Riak cluster through reverse proxy to leverage load balancing and abstract the applications from the cluster configurations. I succeed to open up a socket connection, but the connection is not persistent, that is, I get a response {error,disconnected} immediately. This is unlike the case when I connect to a Riak node directly where the connections stay as long as they are not closed or interrupted externally.

Here below is the snippet of the configuration

upstream riak_cluster_servers { least_conn; keepalive 32; server riak1.example.com:8087; server riak2.example.com:8087; server riak3.example.com:8087; server riak4.example.com:8087; server riak5.example.com:8087; }

The server block is setup as below

server { listen 0.0.0.0:80; listen [::]:80; server_name riak.example.com; location / { proxy_pass http://riak_cluster_servers; proxy_http_version 1.1; proxy_set_header Connection ""; } }

What could be causing this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions