envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
25.01k stars 4.81k forks source link

examples/front-proxy: Service requesting to invalid address #2144

Open mmiranda96 opened 6 years ago

mmiranda96 commented 6 years ago

Description: File service.py contains an HTTP request to localhost:

ret = requests.get("http://localhost:9000/trace/2", headers=headers)

Port 9000 is not exposed. Should this be port 8080? Or perhaps port 9000 should be open?

derekargueta commented 6 years ago

@mmiranda96 that route is used in the zipkin-tracing example in which the service envoys run a listener on port 9000 - a little confusing IMO but you can see it referred to in the zipkin-tracing's Docker-compose

front-envoy:
    build:
      context: ../
      dockerfile: front-proxy/Dockerfile-frontenvoy
    volumes:
      - ./front-envoy-zipkin.json:/etc/front-envoy.json
    networks:
      - envoymesh
    expose:
...

and in the Envoy config

{
      "address": "tcp://0.0.0.0:9000",
      "filters": [
        {
          "name": "http_connection_manager",
          "config": {
            "tracing": {
              "operation_name": "egress"
...

I'd like to put up a PR cleanly separating/restructuring these examples if @mattklein123 thinks it's appropriate. I too was confused on what that /trace route was for.

mattklein123 commented 6 years ago

@derekargueta Thank you! That would be awesome. Any/all help appreciated with the examples.

cmluciano commented 6 years ago

@derekargueta Are you still interested in submitting a PR here?

mk46 commented 3 years ago

@phlax I think need to comment here https://github.com/envoyproxy/envoy/blob/0f7952d1850be92620f2add304c8d95fce028f93/examples/front-proxy/service.py#L36 that Route is used in Zipkin tracing.

phlax commented 3 years ago

@mk46 is this bug still an issue ?

im thinking that it was probably fixed when the examples were updated.

if not, i can follow up

mk46 commented 3 years ago

https://github.com/envoyproxy/envoy/blob/0f7952d1850be92620f2add304c8d95fce028f93/examples/front-proxy/service.py#L44 still containing 9000/trace/2 which is used by zipkin-tracing. Port 9000 is not used in front-proxy (checked in service and envoy yaml)

phlax commented 3 years ago

/assign phlax