-
Notifications
You must be signed in to change notification settings - Fork 80
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
[WFLY-19992] Enable configuration of selected XNIO/Remoting parametrs… #668
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
--- | ||
categories: | ||
- core | ||
- remoting | ||
stability-level: | ||
default | ||
issue: | ||
https://github.com/wildfly/wildfly-proposals/issues/667 | ||
feature-team: | ||
developer: | ||
tadamski | ||
sme: | ||
- | ||
outside-perspective: | ||
- | ||
promotes: | ||
promoted-by: | ||
--- | ||
= <INSERT TITLE HERE> | ||
:author: Tomasz Adamski | ||
:email: [email protected] | ||
:toc: left | ||
:icons: font | ||
:idprefix: | ||
:idseparator: - | ||
|
||
== Overview | ||
|
||
During analysis of various support cases we found out that there is no possibility to configure all XNIO/Remoting options for connections that use remoting protocol (f.e. EJB). It it worth emphasizing that this issue doesn't deal merely with the lack of options parsing that has to be implemented. There are many objects that are created by remoting f.e. Endpoints or Channels, and, what is important in the context of this issue, they can be used in both inbound and outbound scenario. So the goal of this issue is to design and document the elegant way of configuring remoting options. | ||
|
||
There already is a discussion in {https://issues.redhat.com/browse/WFCORE-6873}[jira] regarding challenges and possible solutions of this problem. In this proposal I will be describing simplest possible fix that was discussed there, that is endpoint shared by inbound and outbound connections. | ||
|
||
=== User Stories | ||
|
||
User deploys many number of applications on WildFly - the number of them exceeds the default maximum number of channels for remoting protocol. All those application utilize a remoting connection. Users are getting: "Too many channels open" exception. They would like to configure their server so that the application works correctly. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any similar problems on a standalone client? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think standalone should work fine. But imho even if it doesn't it should have another issue created. |
||
|
||
== Issue Metadata | ||
|
||
=== Related Issues | ||
|
||
https://issues.redhat.com/browse/WFCORE-6873 | ||
|
||
=== Affected Projects or Components | ||
https://github.com/wildfly/wildfly-core Remoting component | ||
|
||
=== Other Interested Projects | ||
|
||
=== Relevant Installation Types | ||
|
||
* Traditional standalone server (unzipped or provisioned by Galleon) | ||
* Managed domain | ||
* OpenShift Source-to-Image (S2I) | ||
* Bootable jar | ||
|
||
== Requirements | ||
|
||
* users would be able to configure selected options | ||
* users would be able to rely on one configuration file "standalone*.xml" for in server deployments | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not a requirement, it is part of a proposed solution. Users already use many different files to configure their application deployments. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I surely can change it, but I put it to requirement section because I think that minimalizes all this additional files is a good practice. I think f.e. Elytron did the same thing with merging their configuration options with standalone. This may require additional discussion though. @jbaesner wdyt? |
||
* configuration available in standalone*.xml configuration - no additional configuration files are neccessary | ||
|
||
=== Non-Requirements | ||
|
||
* configuration of all available xnio/remoting options - current parser supports the list of options visible {https://github.com/wildfly/wildfly-core/blob/main/remoting/subsystem/src/main/java/org/jboss/as/remoting/RemotingSubsystemRootResource.java#L62}[here] - those are not all the options available, but we should add additional ones only based on customer requirements | ||
|
||
=== Future Work | ||
|
||
* extending the configuration so that different deployments could use diffent remoting object (see deployment plan) | ||
|
||
== Backwards Compatibility | ||
|
||
* if customers were relying on wildfly-config.xml that was provided to WildFly server for remoting configuration than it will cease to work (this was not the suggested solution though). | ||
|
||
=== Default Configuration | ||
|
||
* no changes | ||
|
||
=== Importing Existing Configuration | ||
|
||
* no need to import | ||
|
||
=== Deployments | ||
|
||
* no changes expected | ||
|
||
=== Interoperability | ||
|
||
* no changes expected | ||
|
||
== Implementation Plan | ||
|
||
I'm attaching relevant parts of my implementation plan that I wrote in WFCORE-6873: | ||
|
||
=== Current status | ||
There are number of XNIO objects created in default WildFly configuration (Endpoints, connectors) which have to be configured on both client and server side to make the configuration work. During the connection establishment, client and server negotiate the parameters, so if f.e. MAX_INBOUND_CHANNELS is set to high value on the server but MAX_OUTBOUND_CHANNELS is not explicitly set then the default value would still be used. Although, completely logical, it may be confusing to users who change configuration that the parameters they have modified are not used. Even with the knowledge above, it is not always clear what objects have to be changed to make the configuration work. For example, there is an endpoint configuration in the remoting subystem (not present in default subsystem configuration) that is meant to configure subsystem endpoint (that is the endpoint that is used by the subsystems and not management). The subystem endpoint is then used to create the http-connector that is used, among others, for remoting+http protocol invocations. The problem is that the properties configured at subsystem endpoint are not propagated to the http-connector. As a result, setting MAX_INBOUND_CHANNELS on the subsystem endpoint would not result in changing the number of channels, even if client side is configured correctly. In order to make server side work, the properties have to be configured on http-connector directly. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fact that configuration properties of the HTTP connector are not inherited from the Remoting subsystem Endpoint is a separate issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree, we probably need another issue as well. |
||
|
||
There is no possibility to configure outbound endpoint in an elegant way. The outbound endpoint is obtained using Contextual API. By default, Endpoint provider looks for wildfly-config.xml file in the location provided by system variable and tries to parse this file. If no parameter is present then the empty endpoint is created. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are two ways to configure it: (1) modify the (many) relevant configuration files to accept general XNIO/Remoting properties, which involves a lot of changes and time but has the advantage of each deployment having control over its own XNIO/Remoting abstractions or (2) use system property overrides, as is aleady being done, to configure a small subset of properties that standalone application and deployment clients need to have control over, which is quick and easy to implement. Whether these are considered elegant is debatable. |
||
|
||
=== Considerations for the proposed solution | ||
|
||
We would like to avoid having many configuration files and keep the server configuration in standalone-*.xml file. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have a lot of configuration files for configuring deployments (e.g. jboss-ejb-client.xml and others) and there is no intention of eliminating these. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, my goal is not to eliminate them, but, as I wrote above, I think that minimizing the number of those additional files should be a good practice that we have to support. |
||
Even with wildfly-config.xml, we can only configure one subsystem endpoint for outbound communication (via server-wide wildfly-config.xml) and another (via remoting subsystem) for inbound communication. | ||
On the other hand, it would be preferable to support minimal configuration that is suitable for our customer use cases. Since the configuration with one subsystem endpoint and without direct possibility of outbound endpoint configuration seems to work well for vast majority of our customer it seems feasible to add minimal extension that solves the bugs described above. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there performance implications for this change? We are moving from two endpoints per server (used to create connections and channels and send traffic) down to one. On a server with a lot of inbound traffic from clients and a lot of outbound traffic from deployments, might this have a performance impact? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIUC the endpoint is just a object with data that is used to configure those connections and as such it shouldn't have impact on performance but I agree that adding the performance tests to this issue is prudent. |
||
|
||
=== Proposed solution | ||
I have proposed a solution that makes subsystem endpoint, which can be configured in remoting subsystem, to be the contextual enpoint for all outbound communication in all deployments in the server. This is very simple solution which allows only for basic configuration (essentially it enables customers to configure one subsystem endpoint which will be used for inbound and outbound communication by all deployments) but since as of now noone is asking for anything more complex and having a simplicity point in the consideration I would argue that this solution may actually be good enough. If at some point some customer asks about more complex configuration (f.e. having many different endpoints that can be used by different deployments and configured independently), we could proceed it as an another RFE. | ||
|
||
=== Possibilities of further extension | ||
|
||
As noted above, this proposal is a minimal solution that solves the problem - it enables users to configure Endpoint properties in one place but does not allow for any more complex configuration. For example a more comphrehensive fix to this problem may allow to configure a number of endpoints so that different endpoints can be chosen for inbound or outbound scenarios or chosen by various deployments. The problem with those more complex designs is that we don't have any user feedback that they need such configuration abilities and we may risk implementing non-trivial configuration extensions that would not be used. Because of that, I'm proposing to start with this simple solution first. If after it's introduction we obtain a feedback that more complex configuration is needed, we would follow in next RFE. In such scenario, we would have more data what configurations are needed by and we would be able to design the extension based on this feedback. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If there are only one or two "problem properties" (e.g. MAX_OUTBOUND_CHANNELS, MAX_INBOUND_CHANNELS) why is this solution preferable to the system property solution? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good question - tbh I consider configuring any object via property inelegant hack plus it is completely not extendable. |
||
|
||
== Admin Clients | ||
|
||
* Since the proposed does not modify management endpoint configuration it should not have an effect on admin clients. | ||
|
||
== Security Consideration | ||
|
||
[[test_plan]] | ||
== Test Plan | ||
|
||
* Suggested fix does not introduce any XML modification - it only wires remoting objects in a way so that the endpoint configured in remoting subsystem is "captured" also for outbound connection. Because of that, we may provide integration test that will emulate the behavior described in use case scenario and verify that the fix makes it work correctly. | ||
* Because this fix changes the way endpoints are configured (one endpoint for both inbound and outbound communication) it would also be prudent to create performance tests for this issue to make sure that this new design has no impact on performance. | ||
|
||
|
||
== Community Documentation | ||
|
||
The community documentation would have to add information about sharing an endpoint for inbound and outbound communication. Explanation of configuration in real world scenario, such as mentioned use case, is also necessary. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is going to be hard to explain to users - why they should use separate configuration files for their deployments - except in the case of Remoting and XNIO configuration. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I wrote in above comments, I would consider minimizing additional files a good practice that we should promote. |
||
|
||
== Release Note Content | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason that you feel this needs to come it at the default stability level from the outset?
If we can it may be advisable to come it as Preview or Community and promote to default in a second step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, to be honest I wasn't sure whether the new levels would be applicable so I choose the default one. The one reason may be that this is issue has already causes problems to the customers and it would be good to provide it as stable feature pretty soon.