Skip to content
This repository was archived by the owner on Aug 13, 2020. It is now read-only.

Tags: Khan/react-render-server

Tags

phabricator/diff/224412

Toggle phabricator/diff/224412's commit message
[WEB-751] Cache Script objects, not text

Summary:
We create additional overhead by passing strings around too often for
our JS scripts. So, this modifies things to cache a vm.Script objects
instead.

Test Plan:
`npm test`

Ran against webapp to test things worked how we want, also profiled
memory usage and observed what appears to be a significant decrease
in usage when compared with the caching approached used previously.

Reviewers: #fe-infra

Subscribers: #infrastructure

phabricator/diff/224373

Toggle phabricator/diff/224373's commit message
[WEB-752] No more timeout race

Summary:
Remove the custom timeout race for JS files and just rely on the
request timeout.

This helps simplify the JS file cache code just a little in
preparation for some more cache-related changes.

Test Plan:
`npm test`

Reviewers: #fe-infra

Subscribers: #infrastructure

phabricator/diff/224333

Toggle phabricator/diff/224333's commit message
[WEB-752] No JS cache timeouts

Summary:
The cache timeouts aren't helping anything.
If the files legitimately timeout, we would be better knowing that than
getting these "fake" timeout errors. Since we don't need the render to
return in a specific time (the calling app will cope with a slow render
using its own timeouts), we should have no timeout. This really means a 60s
timeout as it stands - I stopped short of removing the timeout race entirely
although I am tempted.

Test Plan:
- `npm test`

Reviewers: #fe-infra

Subscribers: #infrastructure

phabricator/base/224412

Toggle phabricator/base/224412's commit message
[WEB-752] No more timeout race

Summary:
Remove the custom timeout race for JS files and just rely on the
request timeout.

This helps simplify the JS file cache code just a little in
preparation for some more cache-related changes.

Test Plan: `npm test`

Reviewers: #frontend-infrastructure

Subscribers: #infrastructure

Differential Revision: https://phabricator.khanacademy.org/D54129

phabricator/diff/224036

Toggle phabricator/diff/224036's commit message
Up the timeout on cache requests to 2 seconds

Summary:
We're seeing a lot of cache requests timing out in production. This
change ups that timeout to 2 seconds (from 1 second), and adds some
recording of the actual time a request takes (since the original
request is inflight still).

This way, we can see:

 1. Does the timeout at 2 seconds alleviate the error noise?
 2. What should the timeout be based on what the actual request times are?

This also puts the instance size back to `F4` as I don't think we need to
up that just yet (if at all).

Test Plan:
In dev there is no change here.

For production, we should deploy and monitor error rates and such.
If things look unfavourable, we can migrate traffic to the previous
version (this may require Infra/SRE support for permissions to migrate).

Reviewers: john, amos, csilvers

Subscribers: #frontend-infrastructure, #infrastructure

Differential Revision: https://phabricator.khanacademy.org/D54012

phabricator/diff/224008

Toggle phabricator/diff/224008's commit message
Up the timeout on cache requests to 2 seconds

Summary:
We're seeing a lot of cache requests timing out in production. This
change ups that timeout to 2 seconds (from 1 second), and adds some
recording of the actual time a request takes (since the original
request is inflight still).

This way, we can see:

 1. Does the timeout at 2 seconds alleviate the error noise?
 2. What should the timeout be based on what the actual request times are?

This also puts the instance size back to `F4` as I don't think we need to
up that just yet (if at all).

Test Plan:
In dev there is no change here.

For production, we should deploy and monitor error rates and such.
If things look unfavourable, we can migrate traffic to the previous
version (this may require Infra/SRE support for permissions to migrate).

Reviewers: john, amos, csilvers

Subscribers: #frontend-infrastructure, #infrastructure

Differential Revision: https://phabricator.khanacademy.org/D54012

phabricator/diff/224007

Toggle phabricator/diff/224007's commit message
Up the timeout on cache requests to 2 seconds

Summary:
We're seeing a lot of cache requests timing out in production. This
change ups that timeout to 2 seconds (from 1 second), and adds some
recording of the actual time a request takes (since the original
request is inflight still).

This way, we can see:

 1. Does the timeout at 2 seconds alleviate the error noise?
 2. What should the timeout be based on what the actual request times are?

This also puts the instance size back to F4 as I don't think we need to
up that just yet (if at all).

Test Plan:
In dev there is no change here.

For production, we should deploy and monitor error rates and such.
If things look unfavourable, we can migrate traffic to the previous
version (this may require Infra/SRE support for permissions to migrate).

Reviewers: john, amos, csilvers

Subscribers: #frontend-infrastructure, #infrastructure

Differential Revision: https://phabricator.khanacademy.org/D54012

phabricator/diff/224006

Toggle phabricator/diff/224006's commit message
Up the timeout on cache requests to 2 seconds

Summary:
We're seeing a lot of cache requests timing out in production. This
change ups that timeout to 2 seconds (from 1 second), and adds some
recording of the actual time a request takes (since the original
request is inflight still).

This way, we can see:

 1. Does the timeout at 2 seconds alleviate the error noise?
 2. What should the timeout be based on what the actual request times are?

Test Plan:
In dev there is no change here.

For production, we should deploy and monitor error rates and such.
If things look unfavourable, we can migrate traffic to the previous
version (this may require Infra/SRE support for permissions to migrate).

Reviewers: john,amos,csilvers

Subscribers: #infrastructure,#fe-infra

phabricator/base/224373

Toggle phabricator/base/224373's commit message
Up the timeout on cache requests to 2 seconds

Summary:
We're seeing a lot of cache requests timing out in production. This
change ups that timeout to 2 seconds (from 1 second), and adds some
recording of the actual time a request takes (since the original
request is inflight still).

This way, we can see:

 1. Does the timeout at 2 seconds alleviate the error noise?
 2. What should the timeout be based on what the actual request times are?

This also puts the instance size back to `F4` as I don't think we need to
up that just yet (if at all).

Test Plan:
In dev there is no change here.

For production, we should deploy and monitor error rates and such.
If things look unfavourable, we can migrate traffic to the previous
version (this may require Infra/SRE support for permissions to migrate).

Reviewers: john, amos, csilvers

Reviewed By: john

Subscribers: benkraft, #frontend-infrastructure, #infrastructure

Differential Revision: https://phabricator.khanacademy.org/D54012

phabricator/base/224333

Toggle phabricator/base/224333's commit message
Up the timeout on cache requests to 2 seconds

Summary:
We're seeing a lot of cache requests timing out in production. This
change ups that timeout to 2 seconds (from 1 second), and adds some
recording of the actual time a request takes (since the original
request is inflight still).

This way, we can see:

 1. Does the timeout at 2 seconds alleviate the error noise?
 2. What should the timeout be based on what the actual request times are?

This also puts the instance size back to `F4` as I don't think we need to
up that just yet (if at all).

Test Plan:
In dev there is no change here.

For production, we should deploy and monitor error rates and such.
If things look unfavourable, we can migrate traffic to the previous
version (this may require Infra/SRE support for permissions to migrate).

Reviewers: john, amos, csilvers

Reviewed By: john

Subscribers: benkraft, #frontend-infrastructure, #infrastructure

Differential Revision: https://phabricator.khanacademy.org/D54012