[ 
https://issues.apache.org/jira/browse/IGNITE-20424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mikhail Petrov updated IGNITE-20424:
------------------------------------
    Description: 
All messages designated for the thin client are accumulated in the selector 
queue GridSelectorNioSessionImpl#queue before they are sent. Note that  
GridSelectorNioSessionImpl#queue for the Ignite Thin Client currently is 
unbound. If the thin client connection is slow and a huge number of heavy 
messages are about to send to the thin client, GridSelectorNioSessionImpl#queue 
growing size can lead to OOM.

See 
1. https://issues.apache.org/jira/browse/IGNITE-20327  
2. https://github.com/apache/ignite/issues/10559


We need to investigate mechanisms to limit the thin client message queue size.

Currently, two mechanisms related to the described problem have already been 
implemented:
1. GridNioServer.Builder#messageQueueSizeListener is used to limit the message 
queue size for Ignite Thick clients - if the message queue size limit is 
exceeded, the client node will be forced to leave the cluster.
2. GridNioServer.Builder#sendQueueLimit is used to block a thread that sends a 
message if the message queue size limit is exceeded. Currently is used with 
Thick Clients and Ignite REST clients.

The first approach was chosen to reuse it for thin clients.

  was:
All messages designated for the thin client are accumulated in the selector 
queue GridSelectorNioSessionImpl#queue before they are sent. Note that  
GridSelectorNioSessionImpl#queue for the Ignite Thin Client currently is 
unbound. If the thin client connection is slow and a huge number of heavy 
messages are about to send to the thin client, GridSelectorNioSessionImpl#queue 
growing size can lead to OOM.

See 
1. https://issues.apache.org/jira/browse/IGNITE-20327  
2. https://github.com/apache/ignite/issues/10559


We need to investigate mechanisms to limit the thin client message queue size.

Currently, two mechanisms related to the described problem have already been 
implemented:
1. GridNioServer.Builder#messageQueueSizeListener is used to limit the message 
queue size for Ignite Thick clients - if the message queue size limit is 
exceeded, the client node will be forced to leave the cluster.
2. GridNioServer.Builder#sendQueueLimit is used to block a thread that sends a 
message if the message queue size limit is exceeded. Currently is used with 
Thick Clients and Ignite REST clients.




> Slow thin client connection can lead to consuming of huge amount of heap 
> -------------------------------------------------------------------------
>
>                 Key: IGNITE-20424
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20424
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Mikhail Petrov
>            Assignee: Mikhail Petrov
>            Priority: Major
>              Labels: ise
>             Fix For: 2.16
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> All messages designated for the thin client are accumulated in the selector 
> queue GridSelectorNioSessionImpl#queue before they are sent. Note that  
> GridSelectorNioSessionImpl#queue for the Ignite Thin Client currently is 
> unbound. If the thin client connection is slow and a huge number of heavy 
> messages are about to send to the thin client, 
> GridSelectorNioSessionImpl#queue growing size can lead to OOM.
> See 
> 1. https://issues.apache.org/jira/browse/IGNITE-20327  
> 2. https://github.com/apache/ignite/issues/10559
> We need to investigate mechanisms to limit the thin client message queue size.
> Currently, two mechanisms related to the described problem have already been 
> implemented:
> 1. GridNioServer.Builder#messageQueueSizeListener is used to limit the 
> message queue size for Ignite Thick clients - if the message queue size limit 
> is exceeded, the client node will be forced to leave the cluster.
> 2. GridNioServer.Builder#sendQueueLimit is used to block a thread that sends 
> a message if the message queue size limit is exceeded. Currently is used with 
> Thick Clients and Ignite REST clients.
> The first approach was chosen to reuse it for thin clients.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to