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

Remove nginx bwdserver #3635

Merged
merged 42 commits into from
Mar 28, 2022
Merged

Remove nginx bwdserver #3635

merged 42 commits into from
Mar 28, 2022

Conversation

pbiggar
Copy link
Member

@pbiggar pbiggar commented Mar 25, 2022

Part 1 of #3630

This removes nginx from the BwdServer. We needed nginx for a couple of reasons in the past that are no longer necessary or can be handled in other (better) ways:

  • we needed some form of way to protect the app from expensive requests without processing them or recompiling and redeploying the whole thing. nginx gave us a quick way to update the config and restart the containers - instead we can use cloud armor, which is better at it

  • we needed to support requests with missing content-lengths, as users like to make POST requests from curl sometimes and getting the right content-length is annoying. Now kestrel supports omitting the content-length header

  • we needed to proxy requests to other servers for darklang.com, but now we've split the ApiServer from the BwdServer so it's not as important

  • we needed to do gzip on large returned files. Admittedly nginx is better at that than kestrel but it can still be done in kestrel

  • ultimately, i want to remove it as it's "yet another thing to understand" and I'd rather remove a complex step from our infra

This removes nginx from bwdserver only, including removing the deployment/k8s config files.

One major problem was that the test suite had a lot of files with the wrong content-length, which nginx papered over. So a lot of this PR is making sure the content-length is right in all the test files, and adding support to the test suite to make sure of that.

@pbiggar
Copy link
Member Author

pbiggar commented Mar 26, 2022

The predeployment checks CI job failed - that's fine, there's a different config and we'll just have bwdserver down for a few minutes. Since it's prerelease it doesn't matter.

Copy link
Member

@StachuDotNet StachuDotNet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@pbiggar
Copy link
Member Author

pbiggar commented Mar 28, 2022

  • do shipit manual apply just before merging

@pbiggar pbiggar merged commit 2254185 into main Mar 28, 2022
@pbiggar pbiggar deleted the paul/remove-nginx-bwdserver branch March 28, 2022 23:33
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

Successfully merging this pull request may close these issues.

2 participants