Configuring Plugs during runtime

Why would you add a genserver for each plug though? Wouldn’t one be enough?

Each api can have different plugs enabled so we can’t have a large genserver that loads the configuration for every one of them.

For example, we have these two plugs which both need access to configuration values that we get during the app startup.

  • Is this api enabled plug: The config can enabled/disable certain api:s.
  • Authenticate: this one need information about which redis server it should talk to, how the redis key is formatted and which keys from redis should be loaded for this particular api.
  • The CORS headers needs to be configurable by the security team and loaded through the configuration.

because calling genservers might result in a bottleneck.

Agreed. :frowning: