-
Notifications
You must be signed in to change notification settings - Fork 605
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
Enable Fastboot with USE_FASTBOOT environment variable set to 1 #1900
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
1b98fd1
to
6e49e86
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.
Looks great to me overall! I'm pushing it to my Heroku instance now, and just have the 1 comment below.
USE_FASTBOOT environment variable is used to enable Fastboot. The number of workers configurable through WEB_CONCURRENCY. https://devcenter.heroku.com/articles/node-memory-use#running-multiple-processes
Travis seems having a bad day. |
I have this deployed to staging right now with USE_FASTBOOT=TRUE, I don't see any difference in the logs really, am I supposed to? Here's what I see in the logs for a request to
And here's what I see in the logs for a request to
I'm not seeing the memory issues reported in #1827; in fact, the memory usage is lower after deploying this (previously staging had 77856b0 on it). I made sure to request |
Thanks @carols10cents. Have you deployed something else on staging-crates-io.herokuapp.com? https://staging-crates-io.herokuapp.com/policies doesn't seem to have Fastboot. Regarding logs, you should at least have logs from https://github.com/ember-fastboot/fastboot-express-middleware/blob/3febb1dbc11b4b95e2125c6866de2498e9d4d08c/src/index.js#L91, which I couldn't find a way to disable that from fastboot-app-server. |
I have not... it's still at 6e373b6. I set How can you tell if a page uses fastboot or not? |
|
||
export FASTBOOT_DISABLED | ||
|
||
if [ "${USE_FASTBOOT:-0}" = '1' ]; then |
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.
oh oops it needs to be 1
here? let me try that
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.
ember.sh is only used from npm run, but start-web.sh is doing the same check. Yes. It has to be 1
@@ -64,6 +64,13 @@ http { | |||
proxy_pass http://app_server; | |||
} | |||
|
|||
<% if ENV['USE_FASTBOOT'] %> |
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.
i saw this line and thought it just needed to be set.
I've pushed a commit to my staging area that allows me to experimentally enable FastBoot for all front-end paths (via Branch |
OK now I am seeing this in the logs for a request to
|
Regarding the log format, my only suggestions would be to see if we can remove the extra timestamp from line 2, replacing it with "FastBoot:". It would also be nice to log the request_id on that line.
|
Ok I am seeing higher memory usage now, but not outrageously so. There was a jump from 37MB to 57MB when the dynos were done restarting after I fixed the env var value, and it fluctuated as high as 86MB, but I made a point to reload |
I'm seeing 500s for that page on staging |
Scratch that, was able to successfully access from another domain. I did a quick stress test sending 1k requests to |
@jtgeibel Regarding the log message, changing that is hard because we cannot configure the logger through fastboot-app-server. I would like to send a PR for one of the Fastboot packages but it may take time. Adding a new log to indicate Fastboot access is much easier. I can do that probably in this PR if you want to. |
@kzys I think the log format is fine for now, especially for this single endpoint. There was already a related todo item on #1811 and I've linked to the comment above from there. I think we'll want to eventually add the request_id to the output before adding too many more endpoints, but since that requires upstream changes I don't think that needs to block this particular PR. I've assigned #1811 to you, in the hopes that it will enable you to edit that issue. If not, I'll try to keep it synced with our progress as things land (I believe I've addressed your other comments in that thread). |
Sounds like we're all good with this. I'm going to merge now, but not deploy til Wednesday when we're sure the cloudfront changes have gone well. @bors r+ |
📌 Commit 6e373b6 has been approved by |
Enable Fastboot with USE_FASTBOOT environment variable set to 1 This PR enables Fastboot on `/policies` like before, but only if USE_FASTBOOT is defined.
☀️ Test successful - checks-travis |
This PR enables Fastboot on
/policies
like before, but only if USE_FASTBOOT is defined.