datawire / envoy-steps

Envoy Step by Step
Apache License 2.0
74 stars 36 forks source link

Usersvc2 service.py should listen on 127.0.0.1 #6

Open gsacavdm opened 5 years ago

gsacavdm commented 5 years ago

The tutorial states, in order to prep for using Envoy:

Flask can go back to listening only on the loopback interface.

And that these changes are in usersvc2 however, that's not the case

https://github.com/datawire/envoy-steps/blob/25e9dd66710c1f702f189a8e9b8b159760475ad5/usersvc2/service.py#L208

This line should be changes to listen on 127.0.0.1

PS: Nice tutorial!

vishal-yadav commented 5 years ago

I believe that's determined by below section for usersvc cluster for edge envoy vs service envoy. See host URL changed to localhost for service envoy version (usersvc2).

"clusters": [
  {
    "name": “usersvc”,
    ...
    "hosts": [
      {
        "url": “tcp://usersvc:80”
      }
    ]
  }
]
"clusters": [
  {
    "name": “usersvc”,
    ...
    "hosts": [
      {
        "url": “tcp://127.0.0.1:80”
      }
    ]
  }
]