Search code examples
javaspringignite

Can we use Apache ignite with spring application without running separate ignite cluster


I'm working with a project that has scalability issues due to cache management and full resource management.

I decide to use Apache Ignite as my caching layer but I don't want to up the separate cluster for that. Can we use my spring application as a cluster node, and there are several other instances together that make the ignite cluster, and also The same application act as ignite client. It will use my unused JVM.


Solution

  • Yes, you can do that.

    You need to configure Static IP Finder to only use 127.0.0.1 host, use the same localHost/localAddress, use some custom discovery port to avoid interference with any other clusters. You can also try implementing no-op Discovery, but I don't think it is worth the hassle.

    An Ignite node can do everything that client node can, so you never need to spawn a separate client if you already possess a (server) node.

    As for Spring integration, you can use IgniteSpringBean or just manage Ignite lifecycle on its own.