You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bifromq.apache.org by "liaodn (via GitHub)" <gi...@apache.org> on 2026/03/24 09:35:33 UTC
[I] Improve Default Plugin Loading Logic in standalone.yml to Prevent Production Issues Caused by Missing Configurations [bifromq]
liaodn opened a new issue, #236:
URL: https://github.com/apache/bifromq/issues/236
During our initial production deployments, we encountered multiple incidents where critical functionality failed simply because the following plugin fields were not explicitly configured in `standalone.yml`:
- `authProviderFQN`
- `resourceThrottlerFQN`
- `settingProviderFQN`
Currently, if these fields are not explicitly declared, the system will not use any corresponding plugin at all, but instead either skip the functionality entirely or fall back to an inappropriate default behavior (e.g., using a development-only auth provider). This can easily introduce security or performance risks in production environments and significantly increases the cost of troubleshooting.
**Proposed Improvement:**
1. **When a plugin field (e.g., `authProviderFQN`) is *not configured* in `standalone.yml`:**
- Automatically discover all registered custom plugin implementations.
- Sort them by their plugin key in byte-wise alphabetical order and select the first one as the default.
- If no custom plugins exist, fall back to the current built-in default (e.g., the development-only auth provider).
2. **When a plugin is explicitly configured but fails to load** (e.g., due to class not found or initialization error):
- Do **not** crash the startup process. Instead, gracefully degrade by applying the same auto-selection logic described above.
3. Apply this behavior consistently across all three fields:
`authProviderFQN`, `resourceThrottlerFQN`, and `settingProviderFQN`.
This enhancement would greatly improve deployment reliability—especially for new or clustered production environments—while maintaining backward compatibility. Given our real-world experience with configuration oversights, we believe this change would benefit many users.
Thank you for considering this suggestion!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@bifromq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Improve Default Plugin Loading Logic in standalone.yml to Prevent Production Issues Caused by Missing Configurations [bifromq]
Posted by "Gujiawei-Edinburgh (via GitHub)" <gi...@apache.org>.
Gujiawei-Edinburgh commented on issue #236:
URL: https://github.com/apache/bifromq/issues/236#issuecomment-4122623707
> During our initial production deployments, we encountered multiple incidents where critical functionality failed simply because the following plugin fields were not explicitly configured in `standalone.yml`:
>
> * `authProviderFQN`
> * `resourceThrottlerFQN`
> * `settingProviderFQN`
>
> Currently, if these fields are not explicitly declared, the system will not use any corresponding plugin at all, but instead either skip the functionality entirely or fall back to an inappropriate default behavior (e.g., using a development-only auth provider). This can easily introduce security or performance risks in production environments and significantly increases the cost of troubleshooting.
>
> **Proposed Improvement:**
>
> 1. **When a plugin field (e.g., `authProviderFQN`) is _not configured_ in `standalone.yml`:**
>
> * Automatically discover all registered custom plugin implementations.
> * Sort them by their plugin key in byte-wise alphabetical order and select the first one as the default.
> * If no custom plugins exist, fall back to the current built-in default (e.g., the development-only auth provider).
> 2. **When a plugin is explicitly configured but fails to load** (e.g., due to class not found or initialization error):
>
> * Do **not** crash the startup process. Instead, gracefully degrade by applying the same auto-selection logic described above.
> 3. Apply this behavior consistently across all three fields:
> `authProviderFQN`, `resourceThrottlerFQN`, and `settingProviderFQN`.
>
> This enhancement would greatly improve deployment reliability—especially for new or clustered production environments—while maintaining backward compatibility. Given our real-world experience with configuration oversights, we believe this change would benefit many users.
>
> Thank you for considering this suggestion!
I think it is common in plugin development since we move part of the ownership to the users. And falling back to dev-only plugin is more intuitive from my perspective, because the user may be more familiar with the dev-only behavior which can be more predictable and detectable.
And we have to document the behavior changes as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@bifromq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Improve Default Plugin Loading Logic in standalone.yml to Prevent Production Issues Caused by Missing Configurations [bifromq]
Posted by "popduke (via GitHub)" <gi...@apache.org>.
popduke commented on issue #236:
URL: https://github.com/apache/bifromq/issues/236#issuecomment-4122813642
Yeah, we do observe some users from the local community finding the explicit *FQN config a bit cumbersome, especially during local dev/test.
Maybe we can make a tradeoff here:
* Make *FQN config optional
* If it’s explicitly set, then we treat it as a hard requirement:
* the plugin must exist at runtime
* otherwise BifroMQ just fails fast on startup
* If it’s not set, we can follow the behavior suggested by @liaodn
This way dev stays simple, but prod still has a clear and strict contract. Does this sound reasonable?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@bifromq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Improve Default Plugin Loading Logic in standalone.yml to Prevent Production Issues Caused by Missing Configurations [bifromq]
Posted by "Gujiawei-Edinburgh (via GitHub)" <gi...@apache.org>.
Gujiawei-Edinburgh commented on issue #236:
URL: https://github.com/apache/bifromq/issues/236#issuecomment-4131221665
> Yeah, we do observe some users from the local community finding the explicit *FQN config a bit cumbersome, especially during local dev/test. Maybe we can make a tradeoff here:
>
> * Make *FQN config optional
> * If it’s explicitly set, then we treat it as a hard requirement:
>
> * the plugin must exist at runtime
> * otherwise BifroMQ just fails fast on startup
> * If it’s not set, we can follow the behavior suggested by [@liaodn](https://github.com/liaodn)
> This way dev stays simple, but prod still has a clear and strict contract. Does this sound reasonable?
This tradeoff sounds reasonable. We should also make sure this behavior is clearly documented so expectations are explicit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@bifromq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Improve Default Plugin Loading Logic in standalone.yml to Prevent Production Issues Caused by Missing Configurations [bifromq]
Posted by "popduke (via GitHub)" <gi...@apache.org>.
popduke closed issue #236: Improve Default Plugin Loading Logic in standalone.yml to Prevent Production Issues Caused by Missing Configurations
URL: https://github.com/apache/bifromq/issues/236
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@bifromq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org