prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
424 stars 722 forks source link

Dynamic Module-level Configuration #3116

Open bretg opened 1 year ago

bretg commented 1 year ago

As we continue to build (internal) useful operational modules for Prebid Server, we find that the configuration options are not ideal. Right now we have these two options:

  1. Deploy host-level config
  2. Update the dynamic (DB-based) account-level config in many accounts

We plan to build an another option to support cross-account dynamic use cases:

  1. Dynamic (DB-based) module-level config.

Proposal

  1. Establish a new configurable query similar to what exists for accounts. e.g.
settings.database.module-query: select module_code, config from module_config where status=”active”

Where:

  1. A thread in PBS runs the module query periodically and stores the results internally. Make the assumption that data size will be monitored outside of PBS.

  2. JSON merge the module’s DB config results with any account-specific config for the module. Account config would have priority over module config.

  3. The Module interface to config doesn’t change – it sees the data in the module table as account config.

bretg commented 1 year ago

Discussed in committee. There are difficulties in the implementation around updates and thread safety.

Discussed extending to other server configuration, but that may have a different data interface.