Goal: Create a website which uses ElasticSearch to deliver its content.
Problem: There will be many users concurrently accessing the website.
Options:
Create and destroy a transport-client object for every request
Create a pool of transport-client objects which will be reused
Use a transport-client object as singleton
According to the docs here, a Node-Client is not an option for this scenario.
Technical background if it makes any difference: The website will be using Play Framework with Java. There will be a fancy JS frontend and it is expected that there will be many tiny AJAX HTTP requests harassing ElasticSearch.
Use the Transport Client as a singleton.