Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DRAFT DO NOT REVIEW] Wip limit max threads to server#7865

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
albertogpz wants to merge4 commits intoapache:develop
base:develop
Choose a base branch
Loading
fromNordix:wip/handle_max_threads_to_server

Conversation

albertogpz
Copy link
Contributor

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typicallydevelop)?

  • Is your initial contribution a single, squashed commit?

  • Doesgradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion underASF 2.0?

Works for puts, gets and transactions andthem also within functions.This solution allows to limit the number of threadshandling client requests in a server waiting fora response from a given server.For example, if we configure the system to allowat max 1/2 of the available threads to handle client requestsbusy towards a given server, supposing we have a4 servers system with MAX_THREADS=8, if at a given pointin time server1 has 4 threads busy waiting to get aresponse from server2 and another request comes to server1that would require to communicate with server2,the request will be rejected.This feature could be used in situations when a server is not respondingor is responding slowly in order to limit the number of serverthreads (in the rest of servers) to handle client requests that arebusy waiting for an answer from the problematic server.This way, even if a server is not responding or is being veryslow, there will always be some threads available to handleclient requests in the healthy servers.As a result, a non-responding server would not eventuallyprovoke a 100% traffic loss.In order to implement this feature, a new observer typehas been created (SendReceiveMessageObserver).Calls to this observer have been added beforea put, get or transaction needs to go to another server(before any change has been made locally) andafter the response has been received.With a particular implementation of this observer(see GenericDunitTest.MySendReceiveMessageObserver)that keeps track of the number of threads waiting foran answer to each servers, operations may be rejectedif the limit has been surpassed.In GenericDUnitTest that observer is set in theservers and the functionality can be testedmanually by looking at the logs.Some refactorings and renamings
@albertogpzalbertogpzforce-pushed thewip/handle_max_threads_to_server branch 2 times, most recently fromec4bbb7 to5087bb8CompareSeptember 29, 2022 15:01
…d add function to sanctioned data serializables
@albertogpzalbertogpzforce-pushed thewip/handle_max_threads_to_server branch from5087bb8 toa1ee7c3CompareSeptember 29, 2022 15:11
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@albertogpz

[8]ページ先頭

©2009-2025 Movatter.jp