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

Refactor the GET privacy-experience endpoint to be more performant #4171

Open
ThomasLaPiana opened this issue Sep 27, 2023 · 1 comment
Open
Assignees

Comments

@ThomasLaPiana
Copy link
Contributor

ThomasLaPiana commented Sep 27, 2023

Is your feature request related to a specific problem?

According to the Fides Cloud dashboard, this is the most commonly hit endpoint and also one of the worst performing

Describe the solution you'd like

A description of what you want to happen.

Describe alternatives you've considered, if any

A description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

@pattisdr
Copy link
Contributor

pattisdr commented Sep 27, 2023

Some background about this endpoint, we've just been continuing to add to the responsibilities of this endpoint over time, lots of opportunities I'm sure:

  • The PrivacyExperience is a "container" for a given region + experience type that is supplemented with content driven by the datamap at runtime.
  • When called, we apply the many potential query params to figure out the subset of Experiences we need to return.
  • We figure out which privacy notices and/or TCF contents are relevant for the given Experience by looking at our systems and privacy declarations, and attach them to the Experience (I'm thinking some backend caching might help here, with clear arguments that are looking at the right things to cause the experience to need to be recalculated. There are also a lot of things we can do to reduce number of trips to the db).
  • If the experiences endpoint is called with a fides_user_device_id, we additionally query previously saved preferences for the given user and supplement the experience with this information.
  • Different query parameters add more time to the endpoint: a new one embeds the entire gvl.json file in the response, another adds meta information including tc strings to the response.
  • If the Experience is called without any query parameters, all of this is built for each experience -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants