Advantages of embedded node client in Spring data elasticsearch


#1

We are using spring data elasticsearch in our application. Our application will be hosted as in premise for each user. So we have an issue to host individual elastic search server for each user. Could you please let us know if we can make use of embedded node client in spring-data-elasticsearch for search operations. When we use an embedded node , the data(elastic search cluster , indexes etc..) will be created within the server , will this have any performance impact over the application server ? How should the memory allocation be taken care in this case? Is there any alternative approach available for hosting elastic search server as in-premise without compromising the security?


(Nik Everett) #2

Elasticsearch the server does better when it runs in its own process. In 2.x and above it does things like insist that it run inside the java security manager, drop its fork privileges, and fail if there are any duplicate classes defined on the classpath. You may not want your application to run with the same restrictions. You are better off not embedding Elasticsearch in your application.


#3

But the problem is we cannot use shield in our application. So how to secure elasticsearch Cluster and index when started as a separate server??? Is there any alternative approach other than using shield ??? Also how to provide data encryption ???


(Nik Everett) #4

I suggest only listening on localhost. If you need more than that I don't know what to say. Embedding Elasticsearch into your application is going to cause you tons of trouble.


(system) #5