How to configure nginx for frontend_worker?

I decided to introduce frontend into the current cluster and I would like to configure frontend_address in frontend_worker instead of downstream_url in frontend per the discussion in

Besides, I would like to put the 2 frontend services into nginx to make them load balancing, and here is the configuration of loki:

  log_queries_longer_than: 5s
  #downstream_url: http://centos8:3100
  compress_responses: true

  frontend_address: centos8:9095
  parallelism: 12

centos8 is the server that nginx locates in and its config file(based on is like:

upstream query-frontend {
      server centos8-3:9095;
      server centos8-4:9095;

server {
    listen 9095 http2;
    location / {
        grpc_pass grpc://query-frontend;

But once loki is spun up, error like below posted:

Aug 24 01:24:34 centos8-2 loki-linux-amd64[6725]: level=error ts=2021-08-23T17:24:34.719783648Z caller=frontend_processor.go:70 msg="error processing requests" address= err="rpc error: code = Internal desc = stream terminated by RST_STREAM with error code: PROTOCOL_ERROR"

I think there must be some mis-configuration in nginx, please guide me how to move on.

Though I added another upstream for port 3100 in nginx, it still failed.

Hi @dujas ,
Do you make it works? I also want to make the fronted service load balancing with nginx, but failed.

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