Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try removing the nginx reverse-proxy for BwdServer #3630

Closed
pbiggar opened this issue Mar 24, 2022 · 12 comments
Closed

try removing the nginx reverse-proxy for BwdServer #3630

pbiggar opened this issue Mar 24, 2022 · 12 comments

Comments

@pbiggar
Copy link
Member

pbiggar commented Mar 24, 2022

We have no real use for the nginx proxy for bwdserver, and it just provides another thing to configure and maintain. We need nginx for the apiserver and we used to have the apiserver and the bwdserver in the same process.

Let's try without it.

@pbiggar
Copy link
Member Author

pbiggar commented Mar 24, 2022

If we stick with this we'll need:

  • DDOS protection (try cloud armor) as we used nginx to allow load-shedding
  • a redirect for one customer
  • similar gzip behaviour
  • test "host" header in production - does it have the right port

@pbiggar
Copy link
Member Author

pbiggar commented Mar 25, 2022

  • We'll need to update the changelog to say that the content-length needs to be right.

@pbiggar
Copy link
Member Author

pbiggar commented Mar 25, 2022

Need a test with what happens with incorrect content-length:

  • too long
  • too short

[edit: tests added]

@pbiggar
Copy link
Member Author

pbiggar commented Mar 25, 2022

  • test the xforwarded for works in production

@pbiggar
Copy link
Member Author

pbiggar commented Mar 25, 2022

There was a bug I couldn't figure out when developing this. It turns out Kestrel really does not like you to have the wrong content-length. It manifested as a full 400 error being returned by Kestrel AFTER a response had already happened (just jammed right on the end of the HTTP output stream, and in some cases in the middle of it).

I speculate that nginx really didn't care that much which is why we didn't notice the tests were wrong.

@pbiggar
Copy link
Member Author

pbiggar commented Mar 25, 2022

  • Remove "Kestrel" header

@pbiggar
Copy link
Member Author

pbiggar commented Mar 26, 2022

  • check assets passed through via serveLatest work

@pbiggar
Copy link
Member Author

pbiggar commented Mar 29, 2022

  • test "host" header in production - does it have the right port

Yes, no port exists. (in the url field either)

@pbiggar
Copy link
Member Author

pbiggar commented Mar 29, 2022

Note for when I come back to this:

  • it seems that asp.net is using transfer-encoding a lot, but that's possibly because the APIs we're using are async or provide streams or something, while we actually have strings we could write in directly with a known content-length.

@pbiggar
Copy link
Member Author

pbiggar commented Apr 8, 2022

  • check assets passed through via serveLatest work

Being handled in #3658

@pbiggar
Copy link
Member Author

pbiggar commented Apr 12, 2022

a redirect for one customer

There's two customers with a canvas that redirects, but it seems neither of them are terribly active, and there aren't any requests to the non-www version of their page anyway. We'll see if they complain.

@pbiggar
Copy link
Member Author

pbiggar commented Apr 12, 2022

Closing this - the remaining work in covered in #3664.

@pbiggar pbiggar closed this as completed Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant