ott-web-app icon indicating copy to clipboard operation
ott-web-app copied to clipboard

Limit Cleeng Watchlist to 38 items

Open marcovandeveen opened this issue 1 year ago • 0 comments

Cleeng Update Nov 2023

As part of an ongoing effort to optimize Cleeng systems, we are implementing a restriction on the size of specific JSON parameters for API endpoints that utilize said parameters. Currently, our APIs accept JSON parameters without a size restriction which causes a significant platform load and may lead to undesirable slow-downs or outages as the platform continues to grow and the amount of data to be processed increases.

Therefore, moving forward, the following changes will be implemented:

  • Payloads over 4,000 characters will be rejected globally.
  • Affected API Parameters:
    • subscriptions.externalproperties
    • user_payment_details.methodspecificparams
    • offer.externalproperties
    • user_external_data.externaldata

The size check will be implemented at the Request Handler level and the affected integrations need to be optimized so that all relevant endpoints and parameter names in their integrations adhere to these restrictions.

It's essential to note that we will start enforcing these limitations globally at the beginning of 2024.

Analysis

@dbudzins

  • subscriptions.externalproperties - Not part of the web app codebase
  • user_payment_details.methodspecificparams - Looks like the default usage in the web app should be well below 4000 characters https://github.com/jwplayer/ott-web-app/blob/develop/types/subscription.d.ts#L31
  • offer.externalproperties - Not part of the web app codebase
  • user_external_data.externaldata - We currently assume this property could be max length 5000 characters, which means we have to limit the favorites / continue watching to ~48 items per user. To support a 4000 character limit, we have to reduce that to ~38: https://github.com/jwplayer/ott-web-app/blob/develop/src/config.ts#L27

marcovandeveen avatar Nov 28 '23 08:11 marcovandeveen