[
https://issues.apache.org/jira/browse/AMBARI-25912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
caijialiang updated AMBARI-25912:
---------------------------------
Description:
The AgentRegisteringQueueChecker is an interceptor used during the long
connection between the agent and server, mainly for requesting congestion
control. It internally uses AgentsRegistrationQueue to store the sessionID of
connections.
The sessionID is added to the AgentsRegistrationQueue when the ambari agent
registers to the server or sends a heartbeat.
When the long connection between the agent and server is disconnected, or when
the server completes the heartbeat request, the sessionID is removed from the
AgentsRegistrationQueue.
When the queue is full, the server returns "not allowed" to the agent.
AgentsRegistrationQueue uses ArrayBlockingQueue, which uses the same lock for
both writing and consuming, making it easy to negatively impact performance
when dealing with large clusters. Therefore, we are switching to using
LinkedBlockingQueue in order to improve performance.
was:The AgentsRegistrationQueue is used as a traffic control mechanism for
registration or heartbeat. messages involve adding to the queue, while
disconnection or completion of a heartbeat request involves removal from the
queue. ArrayBlockingQueue is used in AgentsRegistrationQueue, but as it shares
a lock between writing and consumption, it can have a negative impact on
performance when dealing with larger clusters. To address this, use
LinkedBlockingQueue to improve performance.
> performance improvement when server handle agent heartbeat and registration
> ---------------------------------------------------------------------------
>
> Key: AMBARI-25912
> URL: https://issues.apache.org/jira/browse/AMBARI-25912
> Project: Ambari
> Issue Type: Improvement
> Affects Versions: 2.8.0
> Reporter: caijialiang
> Priority: Major
>
> The AgentRegisteringQueueChecker is an interceptor used during the long
> connection between the agent and server, mainly for requesting congestion
> control. It internally uses AgentsRegistrationQueue to store the sessionID of
> connections.
> The sessionID is added to the AgentsRegistrationQueue when the ambari agent
> registers to the server or sends a heartbeat.
> When the long connection between the agent and server is disconnected, or
> when the server completes the heartbeat request, the sessionID is removed
> from the AgentsRegistrationQueue.
> When the queue is full, the server returns "not allowed" to the agent.
> AgentsRegistrationQueue uses ArrayBlockingQueue, which uses the same lock for
> both writing and consuming, making it easy to negatively impact performance
> when dealing with large clusters. Therefore, we are switching to using
> LinkedBlockingQueue in order to improve performance.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]