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

Facia: Decommission /lite.json endpoint & renderFrontJsonMinimal(), reduce memory consumption #27143

Open
rtyley opened this issue May 14, 2024 · 4 comments · Fixed by #27389 or #27470

Comments

@rtyley
Copy link
Member

rtyley commented May 14, 2024

See #26338 (comment) - back in November 2017, #18364 & #18365 introduced the /lite.json representation of fronts:

GET /*path/lite.json controllers.FaciaController.renderFrontJsonMinimal(path)
GET /*path.emailjson controllers.FaciaController.renderFrontJson(path)
GET /*path.emailtxt controllers.FaciaController.renderFrontJson(path)
GET /*path.json controllers.FaciaController.renderFrontJson(path)

The lite.json versions are actually not significantly smaller:

% aws --profile frontend s3 ls s3://aws-frontend-store/PROD/frontsapi/pressed/live/uk/fapi/
2024-05-14 12:38:40     501886 pressed.v2.adfree.json
2024-05-14 12:38:39     508012 pressed.v2.json
2024-05-14 12:38:40     352779 pressed.v2.lite.adfree.json
2024-05-14 12:38:39     358778 pressed.v2.lite.json

...and having 2 versions actually takes up additional memory that we could free up. Consequently I believe the the 'lite' versions should be completely removed.

Things to check...

See if the output of the endpoints that use the 'lite' versions (renderFrontHeadline(), renderFrontPressResult() & renderFrontJsonMinimal()) stays the same, depending whether they perform their own trimming that will work on the full versions of PressedPage, or if were relying on the trimmed nature of the 'lite' version at all.

@ioannakok ioannakok added this to the Health milestone May 16, 2024
@github-project-automation github-project-automation bot moved this to Triage in WebX Team May 17, 2024
@alinaboghiu alinaboghiu moved this from Triage to Next Sprint in WebX Team May 31, 2024
@alinaboghiu
Copy link
Member

We should pull this into our next health sprint

@JamieB-gu JamieB-gu moved this from Next Sprint to This Sprint in WebX Team Jul 9, 2024
@domlander domlander moved this from This Sprint to In Progress in WebX Team Jul 22, 2024
@domlander domlander self-assigned this Jul 22, 2024
@domlander domlander moved this from In Progress to This Sprint in WebX Team Jul 23, 2024
@domlander domlander moved this from This Sprint to In Progress in WebX Team Jul 23, 2024
@domlander domlander linked a pull request Aug 7, 2024 that will close this issue
@domlander domlander moved this from In Progress to This Sprint in WebX Team Aug 13, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in WebX Team Aug 23, 2024
@domlander domlander reopened this Aug 23, 2024
@github-project-automation github-project-automation bot moved this from Done to Triage in WebX Team Aug 23, 2024
@domlander domlander moved this from Triage to This Sprint in WebX Team Aug 23, 2024
@domlander domlander linked a pull request Aug 27, 2024 that will close this issue
@domlander
Copy link
Contributor

domlander commented Aug 27, 2024

Steps:

  1. Create 0% test that stops using lite versions of fronts #27389
  2. Check fronts still work correctly, then set experiment to 1%. #27435
  3. Check metrics (what are we looking for?), then set experiment to 20% (10% or 50% also options).
  4. Check metrics, then remove experiment and stop using lite versions of fronts
  5. Removed unused code and refactor

@domlander
Copy link
Contributor

domlander commented Sep 3, 2024

Cannot find any metrics for users in the 1% test: https://logs.gutools.co.uk/s/dotcom/goto/7f66b430-65e8-11ef-9afb-57c59e22107a

UPDATE: I had forgot to switch the test on! https://frontend.gutools.co.uk/dev/switchboard

Test switched on at 11:30am 3/9/24

@domlander
Copy link
Contributor

When restarting work on this ticket, give the Fairground team a heads up, as they are working on the fronts and this may affect them

@JamieB-gu JamieB-gu removed the Epic label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment