Skip to content
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-12459] Initial analysis for active request tracking feature. #275

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fl4via
Copy link
Contributor

@fl4via fl4via commented Jan 7, 2020

Analysis for Active request tracking #663

Jira: https://issues.redhat.com/browse/WFLY-12459

Copy link
Contributor

@jstourac jstourac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've put some comments there as I think some details shall be added into the analysis.

To be honest, I am not quite sure I like approach to use filter-ref in specific hosts. Maybe I don't understand the thoughts behind this completely. Would not be easier to simply add a boolean attribute in the /subsystem=undertow/server=default-server/host=default-host or even some reference in /subsystem=undertow/server=default-server/host=default-host/settings=<something> to enable/disable such future per particular hosts?

* mailto:{email}[{author}]

=== QE Contacts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's gonna be me.

// Discuss with QE during the Kickoff state to decide this
[ ] Engineering

[ ] QE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this one may be tested by QE.

As an example, look at the cli script below:

....
subsystem=undertow/set-attribute(name="active-request-statistics-enabled", "true")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this command correct? Isn't it supposed to be rather /subsystem=undertow:write-attribute(name="active-request-statistics-enabled", "true").

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct; there is no 'set-attribute' operation.

....
See the example bellow:
----
subsystem=undertow/active-request-tracker=requestTracker:list-active-requests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the name requestTracker comes from? In previous example, there was name enabled used:

subsystem=undertow/active-request-tracker=enabled

<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that there is filter-ref element for requestTracker missing in host element.

</servlet-container>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand this correctly, that there is no 'requestTrackerinstance in thefilters` element of Undertows configuration, right?

list-active-requests
list-active-requests(format="same as an Undertow access log formatting")
list-active-requests-with-id
list-active-requests-full
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this operation different from simple list-active-requests?


The operation below will show just the requested attributes from the request:
----
subsystem=undertow/active-request-tracker=requestTracker:list-active-requests(attributes="bytes-sent,bytes-received")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In previous operations description, there is format attribute specified:

list-active-requests(format="same as an Undertow access log formatting")

does this mean that this is another possible attribute? are these attributes optional/mutual exclusive?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is there specified a complete list of attributes that will be collected for each active request somewhere?

Notice that, in order for the track to start tracking actual requests, it must be referenced as a filter inside the server as in:
----
/subsystem=undertow/server=default-server/host=default-host/filter-ref=requestTracker:add
----
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this, then this filter reference will be kind of a reference to a virtual filter, right? How is this reflected in the configuration XML? What if user defines its own filter named requestTracker? Shall we deny this name?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AIUI the intent in the above bit is to describe the automatic internal behavior as being the same as what would happen if a filter-ref was actually in the config. Not that there would actually be such a thing in the config, and thus no "add" operation to set it up.

=== Other Interested Projects

== Requirements
The new feature consists of adding a way for users to retrieve active requests, ie.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't be this use case covered by standard subsystem /metrics we already have in Wildfly? There are several undertow related values already? Or is this somehow different?

@jmesnil wdyt?

As a result, we will have a new resource in the Undertow Subsystem with the name:

.....
subsystem=undertow/active-request-tracker=enabled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this /subsystem=undertow/active-request-tracker=request-tracker?

Also AIUI this is a runtime-only resource (e.g. it does not appear in the xml config shown below). That should be stated explicitly.

AIUI this is a fixed-name resource (aka a 'singleton'). Some name like /subsystem=undertow/service=active-request-tracker is better. The general pattern of address elements is "general type"="specific name". It's better to make up a general type than to not follow the pattern. The only thing to be careful about is not using some 'general type' that later you will want to use for a resource type where the user can provide the specific name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @bstansberry I will fix this.

@fl4via fl4via force-pushed the WFLY-12459_active_request_tracking branch from 25f98fc to 0e3fbbb Compare November 15, 2024 16:12
@fl4via
Copy link
Contributor Author

fl4via commented Nov 15, 2024

I have just updated the analysis document to the latest format.

Solves wildfly#663

Signed-off-by: Flavia Rainone <frainone@redhat.com>
@fl4via fl4via force-pushed the WFLY-12459_active_request_tracking branch from 0e3fbbb to ff7dff2 Compare November 15, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants