title: Envoy proxy: 503 Service Unavailable
body: <h2>State of Servies:</h2>
  <p>Client (<code>nuxt</code>) is up on <code>http://localhost:3000</code> and the client sends
  requests to <code>http://localhost:8080</code>.</p>
  <p>Server (<code>django</code>) is running on <code>0.0.0.0:50051</code>.</p>
  <p>Also <code>docker</code> is up</p>
  <pre><code>78496fef541f   5f9773709483      &quot;/docker-entrypoint.…&quot;   29 minutes
   ago   Up 29 minutes   0.0.0.0:8080-&gt;8080/tcp, :::8080-8080/tcp,
   10000/tcp   envoy
  </code></pre>
  <hr />
  <h2><code>envoy.yaml</code> Configurations:</h2>
  <p>I configured the <code>envoy.yaml</code> file as follows:</p>
  <pre><code>static_resources:
    listeners:
      - name: listener_0
        address:
          socket_address: { address: 0.0.0.0, port_value: 8080 }
        filter_chains:
          - filters:
              - name: envoy.filters.network.http_connection_manager
                typed_config:
                  &quot;@type&quot;: type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
                  codec_type: auto
                  stat_prefix: ingress_http
                  route_config:
                    name: local_route
                    virtual_hosts:
                      - name: local_service
                        domains: [&quot;*&quot;]
                        routes:
                          - match: { prefix: &quot;/&quot; }
                            route:
                              cluster: greeter_service
                              max_stream_duration:
                                grpc_timeout_header_max: 0s
                        cors:
                          allow_origin_string_match:
                            - prefix: &quot;*&quot;
                          allow_methods: GET, PUT, DELETE, POST, OPTIONS
                          allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout
                          max_age: &quot;1728000&quot;
                          expose_headers: custom-header-1,grpc-status,grpc-message
                  http_filters:
                    - name: envoy.filters.http.grpc_web
                    - name: envoy.filters.http.cors
                    - name: envoy.filters.http.router
    clusters:
      - name: greeter_service
        connect_timeout: 0.25s
        type: logical_dns
        http2_protocol_options: {}
        lb_policy: round_robin
        load_assignment:
          cluster_name: cluster_0
          endpoints:
            - lb_endpoints:
                - endpoint:
                    address:
                      socket_address:
                        address: 0.0.0.0
                        port_value: 50051
  </code></pre>
  <hr />
  <h2><strong>Error:</strong></h2>
  <p>But the following error occurs and, as it seems, the requests do not reach the Django <code>0.0.0.0:50051</code> server.</p>
  <blockquote>
  <p><strong>503 Service Unavailable</strong></p>
  <p>grpc-message: upstream connect error or disconnect/reset before
  headers. reset reason: connection failure, transport failure reason:
  delayed connect error: 111</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/QaiBv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QaiBv.png" alt="chrome screenshot" /></a></p>