# Envoy Deploy gRPC web

**URL:** <https://community.fly.io/t/envoy-deploy-grpc-web/20648>\
**Category:** Questions / Help\
**Tags:** login-only\
**Created:** [July 1, 2024, 3:17pm UTC](https://community.fly.io/t/envoy-deploy-grpc-web/20648 "2024-07-01T15:17:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![electwix](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/electwix/32/36760_2.png) [@electwix](https://community.fly.io/u/electwix)\
**Post date:** [July 1, 2024, 3:17pm UTC](https://community.fly.io/t/envoy-deploy-grpc-web/20648/1 "2024-07-01T15:17:52Z")

</div>

Hi people I looked into [gRPC service behind Envoy proxy](https://community.fly.io/t/grpc-service-behind-envoy-proxy/4716) and other ones that similar but I think I’m doing something wrong.

I deployed my grpc server `grpc-test-server` that run perfectly.  
I created `grpc-test-server` for put envoy proxy to use grpc-web but couldn’t manage to do it.

I’m using `envoyproxy/envoy:v1.30-latest` as docker image with my config on it.

`grpc-test-server` is not responding to any calls but it is working I checked live log and it seems like working in there.

envoy.yaml

```auto
admin:
  address:
    socket_address: { address: "::", port_value: 9901, ipv4_compat: true }

static_resources:
  listeners:
    - name: listener_0
      address:
        socket_address: { address: "::", port_value: 8080, ipv4_compat: true }
      filter_chains:
        - filters:
            - name: envoy.http_connection_manager
              typed_config:
                "@type": 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: ["*"]
                      routes:
                        - match: { prefix: "/" }
                          route: { cluster: echo_service }
                http_filters:
                  - name: envoy.grpc_web
                    typed_config:
                      "@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb
                  - name: envoy.filters.http.router
                    typed_config:
                      "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
  clusters:
    - name: echo_service
      connect_timeout: 0.25s
      type: LOGICAL_DNS
      typed_extension_protocol_options:
        envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
          "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
          explicit_http_config:
            http2_protocol_options: {}
      lb_policy: ROUND_ROBIN
      load_assignment:
        cluster_name: echo_service
        endpoints:
          - lb_endpoints:
              - endpoint:
                  address:
                    socket_address:
                      address: grpc-test-server.internal
                      port_value: 443
                      ipv4_compat: true

```

fly.toml

```auto
app = 'grpc-test-server-proxy'
primary_region = 'ams'

[build]

[http_service]
  internal_port = 8080
  force_https = true

[[services]]
  protocol = 'tcp'
  internal_port = 8080

  [[services.ports]]
    port = 443
    handlers = ['tls']

    [services.ports.tls_options]
      alpn = ['h2']

[[vm]]
  size = 'shared-cpu-1x'

```

---

<div class="post-metadata">

**Author:** ![electwix](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/electwix/32/36760_2.png) [@electwix](https://community.fly.io/u/electwix)\
**Post date:** [July 2, 2024, 10:47am UTC](https://community.fly.io/t/envoy-deploy-grpc-web/20648/2 "2024-07-02T10:47:45Z")

</div>

I tried with nginx

nginx.conf

```cfg
server {
        listen 8080;
        listen [::]:8080;

        #charset koi8-r;

        #access_log logs/host.access.log main;

	    # api
        location / {
                resolver [fdaa::3];
                grpc_set_header Content-Type application/grpc;
                grpc_pass grpc://grpc-test-server.internal:54321;
        }
}

```

but similar problem cannot get any respond from gRPC server that deployed.

the gRPC server I’m trying to connect.  
fly.toml

```app
primary_region = 'ams'

[build]
  [build.args]
    GO_VERSION = '1.22.4'

[env]
  PORT = '8080'

[[services]]
  internal_port = 8080
  protocol = "tcp"

  [[services.ports]]
    handlers = ["tls"]
    port = "443"

  [services.ports.tls_options]
    alpn = ["h2"]

[[vm]]
  size = 'shared-cpu-1x'

```

---

<div class="post-metadata">

**Author:** ![electwix](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/electwix/32/36760_2.png) [@electwix](https://community.fly.io/u/electwix)\
**Post date:** [July 2, 2024, 12:49pm UTC](https://community.fly.io/t/envoy-deploy-grpc-web/20648/3 "2024-07-02T12:49:47Z")

</div>

Update:  
after some testing I can verify nginx is making some traffic to fly machine to serves `gRPC` but still couldn’t manage to create `grpc-web` connection

 ![2024-07-02](https://global.discourse-cdn.com/fly1/original/3X/7/3/7377478c5b1f64b179fcba6bd1b338a2dc584fe9.png)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [July 9, 2024, 12:50pm UTC](https://community.fly.io/t/envoy-deploy-grpc-web/20648/4 "2024-07-09T12:50:46Z")

</div>

Closed on July 9, 2024, 12:50pm UTC

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