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
Assignees
Milestone

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.

@alinaboghiu
Copy link
Member

We should pull this into our next health sprint

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment