I am new to using Ehcache and Teracotta. We have a stateless clustered application.
We are using Spring framework and have hibernate in the persistence layer(legacy code). We are using REST APIs. Can someone please help me understand how does Ehcache work with Teracotta in a clustered environment.
More specifically, suppose I have 4 nodes of the application running then each node will have its own Ehcache and they all sync to talk to Teracotta or there can be Ehcache servers running on different nodes(different than the application nodes) and how does Teracotta play a role here.
I apologize if this question is naive, since I am new to all this.
You will use Ehcache in each application. You can then use heap and offheap local caching if wanted.
Then, to get distributed caching, you use a clustered tier that will connect to the Terracotta server. This is where you will store distributed cache data.
You can find documentation and architecture here.