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

Apache Ignite Cluster Manager: Add possibility to customize messageQueueLimit via ignite.json #140

Open
scyv opened this issue Jun 7, 2024 · 2 comments

Comments

@scyv
Copy link

scyv commented Jun 7, 2024

Using Apache Ignite as Cluster Manager, it is (as far as i could see in the code) not possible to overwrite the property messageQueueLimit as io.vertx.spi.cluster.ignite.IgniteOptions is missing the mapping for it.

Not defining the limit leads to a (valid) message on the console:

System.out:
org.apache.ignite.IgniteLogger - Message queue limit is set to 0 which may lead to potential OOMEs when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to message queues growth on sender and receiver sides.

So it would be good to have the possibility to set the limit via the ignite.json file like:

ignite.json:
{
  "messageQueueLimit": 1024,     <-- here
  "discoverySpi": {... },
  "cacheConfiguration": [...],
  "metricsLogFrequency": 0,
  "shutdownOnSegmentation": true
}

If this is found eligible, i volunteer implementing this.

Thanks and Best Regards!

@zyclonite
Copy link
Member

Keep in mind that this does not affect the vert.x eventbus communication/clustering. The cluster manager only uses the shared map (ignite cache), counters (ignite atomic) and locks (ignite semaphore). So whatever you configure might only affect Ignite internals for cluster management and state.

I am not sure what would happen if you limit messages queued as i do not know if that will block or drop messages and how this affects cluster consistency and application behaviour.

Maybe you can elaborate on your thoughts a bit more

@scyv
Copy link
Author

scyv commented Jun 11, 2024

Thank you for the response and for clarifying the role of the cluster manager in Vert.x (looking at the Documentation, I could have found it myself 🙈 https://vertx.io/docs/vertx-ignite/java/ sorry for that.)

My concern arises from the warning message indicating potential OutOfMemoryErrors (OOMEs) due to unrestricted message queues. Setting a messageQueueLimit could help prevent such scenarios by capping the number of messages in the queue, thus offering a safeguard against OOMEs.

In our project we have OOMEs in an unreliable network and this warning triggered me. I wondered if it was because the messages were piling up due to the unstable network. That's where my motivation came from.

My proposal to set a messageQueueLimit is aimed at providing a configuration option to better manage resource utilization.

To proceed, I could investigate how Ignite handles full message queues and share the findings, implement the configuration option for messageQueueLimit with clear documentation on its effects and recommended usage.

Would this approach address the concerns you mentioned? If you have any specific scenarios or additional considerations, please let me know, and I'll take them into account.

Thanks again for your guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants