-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fixes updates to traffic shaping options with shared servers #5282
Open
arjunashok
wants to merge
2
commits into
eclipse-vertx:4.x
Choose a base branch
from
arjunashok:fix-traffic-shaping
base: 4.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you update this, with
return
here to avoid repeated callsThere 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.
That is an interesting question. The repeated calls would happen if the consumer of this API invokes this method for all the shared servers.
The decision here is based on the contract/interface we would like to expose to clients invoking
updateTrafficShapingOptions
(and similar APIs that affect configuration across shared servers)Is it fair to expect clients to apply/change this setting for all the servers, while having the underlying implementation only update it when the actual server is involved? (which is what I think you are suggesting)
Alternatively, should we define the contract such that this setting should be applied/changed to ANY of the servers, and under the hood, vertx will only update it for the actual/main server? (current implementation)
It seems like we currently have a model like (1). My only concern is that for invocations that are not on a actual/main server, it will do nothing (silently).
If this is indeed the pattern we would like to follow, then I would prefer to have some signal (even if it were a log line) indicating that this was a worker server, so no updates were made. This might be useful, in the event that someone updates a server’s setting (that is not a main server) to not see the change taking effect.
I see that
updateSSLOptions
does something similar to (1), although if it were called for all the servers, we would update the SSL options for the actual server N times (where N = no. verticles)(2) comes with the assumption that this is a shared/global setting that applies to all servers, and hence can be updated on ANY of the servers. Although, one could argue that it is ambiguous for the client as to which server's configuration should be updated, and if they were to apply this to all servers, it would result in several redundant invocations for the actual server.
@vietj Do you have any thoughts or comments on this?
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.
In the latest commit, I made a change to only update the traffic-shaping options when they change. So, we address both concerns by: