Yes, getReadClient() gets a Node Client that is instantiated by Spring and then injected as a dependency. I have tried the Transport Client as well and it makes no difference.
An interesting finding is that I have isolated the performance degradation to the Range filter. When my service has these filters the test using REST causes the ES node to use 9% CPU while the Java service uses 22% CPU: filtersToApply.add(FilterBuilders.termFilter(Constants.PROP_PAGE_ID, pageId)); filtersToApply.add(FilterBuilders.termFilter(Constants.PROP_GEO_CODE, meta.getGeoCode())); filtersToApply.add(FilterBuilders.termFilter(Constants.PROP_PLACEMENT_ID, meta.getPlacementId())); When I add a date range, the difference in performance increases dramatically with the REST call staying at around 9% and the Java service driving the CPU util to 81%: filtersToApply.add(FilterBuilders.rangeFilter(Constants.PROP_PUB_DATE).lte(curDate.getTime())); I've also noted that while the index search shard query rate is identical between the two tests, the total shard search query time is dramatically different with the Java service driving a much higher query time compared to the REST-based test. Jeff On Tuesday, December 16, 2014 2:38:51 PM UTC-6, Brian wrote: > > Jeff, > > Does getReadClient() get a reference to a previously created singleton > TransportClient (or NodeClient, as the case may be)? I am guessing yes, but > just asking to be sure. > > In my own set-up, I have created a thin HTTP REST layer (also using Netty, > with the LMAX Disruptor to minimize thread usage while maximizing > throughput). It contains our business logic, and issues queries and updates > to Elasticsearch via the TransportClient. It creates a singleton instance > of the TransportClient, and shares this singleton's reference throughout > the service. Using seige, I have hammered the combination of my thin server > plus Elasticsearch and don't see any performance issues as you describe. > > Just a thought... > > Regards, > Brian > > On Monday, December 15, 2014 9:27:18 AM UTC-5, Jeff Potts wrote: >> >> Yes, updated the gist. Thanks for taking a look at this. >> >> Jeff >> > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/dd88c5a7-28ec-4aa2-ad1f-2974a5ed1978%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
