-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: switch from Cowboy to Bandit, upgrade to Phoenix 1.7 #678
Conversation
42b8ba2
to
9415b77
Compare
9fd66cb
to
2035a91
Compare
82b046c
to
54d39c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it would be worth it to (have you already?) load test this module vs. Cowboy - I'm not opposed to just throwing it into production and reverting if necessary but it might be interesting to see how much extra stability / performance we can get out of it in a synthetic test too.
Specifically, # of concurrent connections per instance would be very interesting given the issue last week.
My only q w/ what's here is the http_1_options
- I assume that was added for a reason so I just wanted to make sure we wouldn't benefit from the compression on HTTP2 as well.
@nlwstein I'm throwing it back up on dev-blue for further testing. When I was testing it last night, I was able to get it up to around 1,000 |
[Bandit](https://hexdocs.pm/bandit/Bandit.html) is a new web server, designed around supporting the Plug interface that Phoenix uses.
@nlwstein doing some further testing:
I'd be okay with doing a temporary deploy to |
I support trying a prod deploy. Maybe do it from this branch though so we can revert it easily? |
a484d8c
to
2e9c096
Compare
So I went down a bit of a rabbit hole on this one looking into the various errors. It turns out that this was a known issue with how Bandit logs errors coming from Phoenix (see phoenixframework/phoenix#5445 for more), so Phoenix needed to be upgraded in order to address the errors. There were quite a few changes in Phoenix between 1.6 and 1.7, so the upgrade was a bit more involved than simply bumping the version in the All that being said: I'll run this on dev-green overnight to make sure there aren't any other unexpected issues, and then maybe we can try it on production again? |
Coverage of commit
|
Coverage of commit
|
Bandit is a new web server, designed around supporting the Plug interface that Phoenix uses.
It also logs errors much more aggressively, which Phoenix 1.7 handles much better than Phoenix 1.6.
Best to review this commit-by-commit: the reformatting commit adds a bit of noise.
Formatting has moved into the "Dev" tasks, as it now depends on the compiled dependencies. I'll remove it from the requirements when this merges.